diff --git a/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md b/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md index ce9400e2a77b..7195c8e974b7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md +++ b/sdk/netapp/azure-resourcemanager-netapp/CHANGELOG.md @@ -1,270 +1,1064 @@ # Release History -## 2.1.0-beta.1 (Unreleased) +## 2.1.0-beta.1 (2025-11-24) + +- 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 2025-09-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). + +### Features Added + +* `models.RansomwareSuspects` was added + +* `models.BucketPatch` was added + +* `models.ElasticBackupProperties` was added + +* `models.EncryptionState` was added + +* `models.ElasticBackupPolicyProperties` was added + +* `models.ElasticSnapshot` was added + +* `models.ElasticCapacityPools` was added + +* `models.ElasticKeyVaultProperties` was added + +* `models.LdapConfiguration` was added + +* `models.RansomwareReport` was added + +* `models.ElasticVolumeUpdateProperties` was added + +* `models.ActualRansomwareProtectionState` was added + +* `models.ElasticBackup$Definition` was added + +* `models.ElasticSnapshotPolicyHourlySchedule` was added + +* `models.ElasticMountTargetProperties` was added + +* `models.Bucket$DefinitionStages` was added + +* `models.ElasticVolumeUpdate` was added + +* `models.ElasticVolume$UpdateStages` was added + +* `models.KerberosState` was added + +* `models.ElasticVolumeDataProtectionProperties` was added + +* `models.ElasticSnapshotPolicyProperties` was added + +* `models.ElasticVolumeSnapshotProperties` was added + +* `models.ElasticPoolEncryptionKeySource` was added + +* `models.ListQuotaReportResponse` was added + +* `models.ElasticServiceLevel` was added + +* `models.CacheLifeCycleState` was added + +* `models.ElasticBackupPolicy` was added + +* `models.SmbSettings` was added + +* `models.BucketServerProperties` was added + +* `models.ElasticResourceAvailabilityStatus` was added + +* `models.Cache$UpdateStages` was added + +* `models.LdapServerType` was added + +* `models.ElasticCapacityPoolUpdateProperties` was added + +* `models.ElasticNfsv3Access` was added + +* `models.RansomwareSuspectResolution` was added + +* `models.CheckElasticVolumeFilePathAvailabilityRequest` was added + +* `models.SuspectFile` was added + +* `models.VolumeLanguage` was added + +* `models.ElasticSmbEncryption` was added + +* `models.ElasticVolumeProperties` was added + +* `models.BreakthroughMode` was added + +* `models.ElasticAccount$DefinitionStages` was added + +* `models.ElasticEncryption` was added + +* `models.ElasticBackupPolicy$Definition` was added + +* `models.RansomwareReportSeverity` was added + +* `models.ElasticVolumeRevert` was added + +* `models.RansomwareReports` was added + +* `models.ActiveDirectoryConfig$Definition` was added + +* `models.SnapshotUsage` was added + +* `models.ActiveDirectoryConfig` was added + +* `models.VolumeSize` was added + +* `models.ElasticBackupPolicies` was added + +* `models.CacheMountTargetProperties` was added + +* `models.ElasticExportPolicyRule` was added + +* `models.BucketPermissions` was added + +* `models.ActiveDirectoryConfig$DefinitionStages` was added + +* `models.ElasticAccountUpdate` was added + +* `models.ElasticCapacityPoolUpdate` was added + +* `models.ElasticSnapshot$UpdateStages` was added + +* `models.CifsChangeNotifyState` was added + +* `models.ActiveDirectoryConfigUpdateProperties` was added + +* `models.ElasticAccountProperties` was added + +* `models.ElasticSnapshots` was added + +* `models.ElasticKeyVaultStatus` was added + +* `models.BucketPatchPermissions` was added + +* `models.Bucket$Definition` was added + +* `models.ElasticEncryptionIdentity` was added + +* `models.Bucket` was added + +* `models.ElasticSnapshotProperties` was added + +* `models.ActiveDirectoryConfigs` was added + +* `models.ElasticBackup$UpdateStages` was added + +* `models.CacheProperties` was added + +* `models.NfsUser` was added + +* `models.BucketGenerateCredentials` was added + +* `models.ActiveDirectoryConfig$Update` was added + +* `models.SecretPasswordIdentity` was added + +* `models.Caches` was added + +* `models.Cache$Definition` was added + +* `models.ElasticAccount$UpdateStages` was added + +* `models.ElasticBackupPolicy$Update` was added + +* `models.ElasticBackupVaults` was added + +* `models.RansomwareReportState` was added + +* `models.ElasticCapacityPool` was added + +* `models.CacheProvisioningState` was added + +* `models.ElasticExportPolicy` was added + +* `models.ElasticSnapshotPolicyWeeklySchedule` was added + +* `models.OriginClusterInformation` was added + +* `models.ElasticVolume$Definition` was added + +* `models.BucketCredentialsExpiry` was added + +* `models.CacheUpdate` was added + +* `models.ElasticRootAccess` was added + +* `models.ElasticBackupVault$Update` was added + +* `models.RansomwareSuspectsClearRequest` 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.PeeringPassphrases` was added + +* `models.Bucket$Update` was added + +* `models.ElasticAccount$Update` was added + +* `models.LdapState` was added + +* `models.Cache$Update` was added + +* `models.RansomwareProtectionPatchSettings` was added + +* `models.Cache` was added + +* `models.ElasticSnapshotPolicy$Definition` was added + +* `models.RansomwareProtectionSettings` was added + +* `models.ElasticSnapshot$Definition` was added + +* `models.ElasticBackupVaultProperties` was added + +* `models.ElasticBackupPolicy$DefinitionStages` was added + +* `models.ElasticNfsv4Access` was added + +* `models.ActiveDirectoryConfigProperties` was added + +* `models.ElasticVolumeRestorationState` was added + +* `models.ElasticVolumePolicyEnforcement` was added + +* `models.SecretPasswordKeyVaultProperties` was added + +* `models.ElasticAccount$Definition` was added + +* `models.ElasticVolumes` was added + +* `models.ElasticBackupVault$Definition` was added + +* `models.ElasticSnapshotPolicy$Update` was added + +* `models.ProtocolTypes` was added + +* `models.ElasticBackup$DefinitionStages` was added + +* `models.CifsUser` was added + +* `models.DesiredRansomwareProtectionState` was added + +* `models.ElasticSnapshotPolicies` was added + +* `models.ElasticAccount` was added + +* `models.QuotaReport` was added + +* `models.CheckElasticResourceAvailabilityReason` was added + +* `models.ElasticCapacityPoolProperties` was added + +* `models.ActiveDirectoryConfigUpdate` was added + +* `models.BucketServerPatchProperties` was added + +* `models.ElasticVolume$DefinitionStages` was added + +* `models.CacheUpdateProperties` was added + +* `models.ElasticAccountUpdateProperties` was added + +* `models.ElasticCapacityPool$DefinitionStages` was added + +* `models.CredentialsStatus` was added + +* `models.ElasticSmbProperties` was added + +* `models.LargeVolumeType` was added + +* `models.PolicyStatus` was added + +* `models.ElasticVolumeBackupProperties` was added + +* `models.ElasticBackup` was added + +* `models.ChangeZoneRequest` was added + +* `models.ElasticBackupVault$DefinitionStages` was added + +* `models.ElasticSnapshot$Update` was added + +* `models.CheckElasticResourceAvailabilityResponse` was added + +* `models.SmbEncryptionState` was added + +* `models.ElasticBackupVault` was added + +* `models.ElasticUnixAccessRule` was added + +* `models.ActiveDirectoryConfig$UpdateStages` was added + +* `models.ElasticVolume` was added + +* `models.ElasticVolume$Update` was added + +* `models.RansomwareReportProperties` was added + +* `models.ElasticBackupPolicyState` was added + +* `models.ElasticSnapshotPolicyMonthlySchedule` was added + +* `models.ExternalReplicationSetupStatus` was added + +* `models.GlobalFileLockingState` was added + +* `models.Cache$DefinitionStages` was added + +* `models.ElasticVolumeDataProtectionPatchProperties` was added + +* `models.ElasticAccounts` was added + +* `models.ElasticSmbPatchProperties` was added + +* `models.Bucket$UpdateStages` was added + +* `models.Buckets` was added + +* `models.ElasticSnapshot$DefinitionStages` was added + +* `models.FileSystemUser` was added + +* `models.ElasticBackupVault$UpdateStages` was added + +* `models.SnapshotDirectoryVisibility` was added + +* `models.ElasticBackupPolicy$UpdateStages` was added + +* `models.ElasticEncryptionConfiguration` was added + +* `models.EnableWriteBackState` was added + +* `models.DayOfWeek` was added + +* `models.ElasticCapacityPool$Definition` was added + +* `models.ElasticSnapshotPolicy$DefinitionStages` was added + +* `models.ElasticBackupType` was added + +* `models.ElasticProtocolType` was added + +* `models.ElasticSnapshotPolicy$UpdateStages` was added + +#### `models.NetAppAccount$Definition` was modified + +* `withLdapConfiguration(models.LdapConfiguration)` was added + +#### `models.Volume$Definition` was modified + +* `withLdapServerType(models.LdapServerType)` was added +* `withBreakthroughMode(models.BreakthroughMode)` was added +* `withLargeVolumeType(models.LargeVolumeType)` was added +* `withLanguage(models.VolumeLanguage)` was added + +#### `models.ReplicationObject` was modified + +* `externalReplicationSetupStatus()` was added +* `mirrorState()` was added +* `relationshipStatus()` was added +* `externalReplicationSetupInfo()` was added + +#### `models.NetAppAccountPatch` was modified + +* `withLdapConfiguration(models.LdapConfiguration)` was added +* `ldapConfiguration()` was added + +#### `models.NetAppAccount$Update` was modified + +* `withLdapConfiguration(models.LdapConfiguration)` was added + +#### `models.VolumeGroupVolumeProperties` was modified + +* `withLanguage(models.VolumeLanguage)` was added +* `language()` was added +* `ldapServerType()` was added +* `withLdapServerType(models.LdapServerType)` was added +* `breakthroughMode()` was added +* `withLargeVolumeType(models.LargeVolumeType)` was added +* `largeVolumeType()` was added +* `withBreakthroughMode(models.BreakthroughMode)` was added + +#### `models.Volume` was modified + +* `ldapServerType()` was added +* `listQuotaReport(com.azure.core.util.Context)` was added +* `listQuotaReport()` was added +* `language()` was added +* `largeVolumeType()` was added +* `breakthroughMode()` was added + +#### `models.VolumePropertiesDataProtection` was modified + +* `withRansomwareProtection(models.RansomwareProtectionSettings)` was added +* `ransomwareProtection()` was added + +#### `NetAppFilesManager` was modified + +* `elasticAccounts()` was added +* `elasticVolumes()` was added +* `elasticSnapshotPolicies()` was added +* `elasticCapacityPools()` was added +* `elasticBackupPolicies()` was added +* `caches()` was added +* `activeDirectoryConfigs()` was added +* `buckets()` was added +* `elasticSnapshots()` was added +* `ransomwareReports()` was added +* `elasticBackups()` was added +* `elasticBackupVaults()` was added + +#### `models.VolumePatchPropertiesDataProtection` was modified + +* `withRansomwareProtection(models.RansomwareProtectionPatchSettings)` was added +* `ransomwareProtection()` was added + +#### `models.Volumes` was modified + +* `listQuotaReport(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `listQuotaReport(java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was added + +#### `models.NetAppAccount` was modified + +* `ldapConfiguration()` was added + +## 2.0.0 (2025-11-19) + +- 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 2025-09-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). + +### Breaking Changes + +#### `models.VolumeQuotaRulesList` was removed + +#### `models.BackupPoliciesList` was removed + +#### `models.SnapshotsList` was removed + +#### `models.UsagesListResult` was removed + +#### `models.OperationListResult` was removed + +#### `models.RegionInfosList` was removed + +#### `models.VolumeList` was removed + +#### `models.CapacityPoolList` was removed + +#### `models.NetAppAccountList` was removed + +#### `models.SnapshotPoliciesList` was removed + +#### `models.VolumeGroupList` was removed + +#### `models.RelationshipStatus` was removed + +#### `models.BackupsList` was removed + +#### `models.BackupVaultsList` was removed + +#### `models.SubscriptionQuotaItemList` was removed + +#### `models.SubvolumesList` was removed + +#### `models.ListReplications` was removed + +#### `models.MetricSpecification` was modified + +* `MetricSpecification()` was changed to private access +* `withSupportedAggregationTypes(java.util.List)` was removed +* `withResourceIdDimensionNameOverride(java.lang.String)` was removed +* `withEnableRegionalMdmAccount(java.lang.Boolean)` was removed +* `withAggregationType(java.lang.String)` was removed +* `withFillGapWithZero(java.lang.Boolean)` was removed +* `withDisplayName(java.lang.String)` was removed +* `withIsInternal(java.lang.Boolean)` was removed +* `withSourceMdmNamespace(java.lang.String)` was removed +* `withSourceMdmAccount(java.lang.String)` was removed +* `withDimensions(java.util.List)` was removed +* `withInternalMetricName(java.lang.String)` was removed +* `withUnit(java.lang.String)` was removed +* `withSupportedTimeGrainTypes(java.util.List)` was removed +* `withDisplayDescription(java.lang.String)` was removed +* `withName(java.lang.String)` was removed +* `withCategory(java.lang.String)` was removed + +#### `models.ReplicationStatus` was modified + +* `models.RelationshipStatus relationshipStatus()` -> `models.VolumeReplicationRelationshipStatus relationshipStatus()` + +#### `models.OperationDisplay` was modified + +* `OperationDisplay()` was changed to private access +* `withOperation(java.lang.String)` was removed +* `withDescription(java.lang.String)` was removed +* `withResource(java.lang.String)` was removed +* `withProvider(java.lang.String)` was removed + +#### `models.CapacityPool$Update` was modified + +* `withCustomThroughputMibps(java.lang.Float)` was removed + +#### `models.CapacityPool` was modified + +* `java.lang.Float customThroughputMibps()` -> `java.lang.Integer customThroughputMibps()` + +#### `models.ProvisioningState` was modified + +* `models.ProvisioningState[] values()` -> `java.util.Collection values()` +* `toString()` was removed +* `valueOf(java.lang.String)` was removed + +#### `models.NetAppAccountPatch` was modified + +* `withTags(java.util.Map)` was removed +* `withLocation(java.lang.String)` was removed + +#### `models.RegionInfoAvailabilityZoneMappingsItem` was modified + +* `RegionInfoAvailabilityZoneMappingsItem()` was changed to private access +* `withAvailabilityZone(java.lang.String)` was removed +* `withIsAvailable(java.lang.Boolean)` was removed + +#### `models.CapacityPoolPatch` was modified + +* `withCustomThroughputMibps(java.lang.Float)` was removed +* `java.lang.Float customThroughputMibps()` -> `java.lang.Integer customThroughputMibps()` +* `withLocation(java.lang.String)` was removed +* `withTags(java.util.Map)` was removed + +#### `models.Dimension` was modified + +* `Dimension()` was changed to private access +* `withName(java.lang.String)` was removed +* `withDisplayName(java.lang.String)` was removed + +#### `models.ServiceSpecification` was modified + +* `ServiceSpecification()` was changed to private access +* `withLogSpecifications(java.util.List)` was removed +* `withMetricSpecifications(java.util.List)` was removed + +#### `models.BackupStatus` was modified + +* `models.RelationshipStatus relationshipStatus()` -> `models.VolumeBackupRelationshipStatus relationshipStatus()` + +#### `models.Volume` was modified + +* `listReplications(com.azure.core.util.Context)` was removed + +#### `models.VolumePatch` was modified + +* `withLocation(java.lang.String)` was removed +* `withTags(java.util.Map)` was removed + +#### `models.CapacityPool$Definition` was modified + +* `withCustomThroughputMibps(java.lang.Float)` was removed + +#### `models.UsageName` was modified + +* `UsageName()` was changed to private access +* `withValue(java.lang.String)` was removed +* `withLocalizedValue(java.lang.String)` was removed + +#### `models.LogSpecification` was modified + +* `LogSpecification()` was changed to private access +* `withName(java.lang.String)` was removed +* `withDisplayName(java.lang.String)` was removed + +#### `models.NicInfo` was modified + +* `NicInfo()` was changed to private access +* `withVolumeResourceIds(java.util.List)` was removed + +#### `models.VolumeBackups` was modified + +* `VolumeBackups()` was changed to private access +* `withBackupsCount(java.lang.Integer)` was removed +* `withPolicyEnabled(java.lang.Boolean)` was removed +* `withVolumeName(java.lang.String)` was removed +* `withVolumeResourceId(java.lang.String)` was removed + +#### `models.DestinationReplication` was modified + +* `DestinationReplication()` was changed to private access +* `withZone(java.lang.String)` was removed +* `withReplicationType(models.ReplicationType)` was removed +* `withResourceId(java.lang.String)` was removed +* `withRegion(java.lang.String)` was removed + +#### `models.RestoreStatus` was modified + +* `models.RelationshipStatus relationshipStatus()` -> `models.VolumeRestoreRelationshipStatus relationshipStatus()` + +#### `models.BackupPolicyPatch` was modified + +* `withTags(java.util.Map)` was removed +* `withLocation(java.lang.String)` was removed + +#### `models.Volumes` was modified + +* `listReplications(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.Snapshots` was modified + +* `update(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.Object)` was removed +* `update(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.Object,com.azure.core.util.Context)` was removed ### Features Added -### Breaking Changes +* `models.RansomwareSuspects` was added + +* `models.BucketPatch` was added + +* `models.ElasticBackupProperties` was added + +* `models.EncryptionState` was added + +* `models.ElasticBackupPolicyProperties` was added + +* `models.ElasticSnapshot` was added + +* `models.ElasticCapacityPools` was added + +* `models.ElasticKeyVaultProperties` was added + +* `models.LdapConfiguration` was added + +* `models.RansomwareReport` was added + +* `models.ElasticVolumeUpdateProperties` was added + +* `models.ActualRansomwareProtectionState` was added + +* `models.ElasticBackup$Definition` was added + +* `models.ElasticSnapshotPolicyHourlySchedule` was added + +* `models.ElasticMountTargetProperties` was added + +* `models.Bucket$DefinitionStages` was added + +* `models.ElasticVolumeUpdate` was added + +* `models.ElasticVolume$UpdateStages` was added + +* `models.KerberosState` was added + +* `models.ElasticVolumeDataProtectionProperties` was added + +* `models.ElasticSnapshotPolicyProperties` was added + +* `models.ElasticVolumeSnapshotProperties` was added + +* `models.ElasticPoolEncryptionKeySource` was added + +* `models.ListQuotaReportResponse` was added + +* `models.ElasticServiceLevel` was added + +* `models.CacheLifeCycleState` was added + +* `models.ElasticBackupPolicy` was added + +* `models.SmbSettings` was added + +* `models.BucketServerProperties` was added + +* `models.ElasticResourceAvailabilityStatus` was added + +* `models.Cache$UpdateStages` was added + +* `models.LdapServerType` was added + +* `models.ReplicationMirrorState` was added + +* `models.ElasticCapacityPoolUpdateProperties` was added + +* `models.ElasticNfsv3Access` was added + +* `models.RansomwareSuspectResolution` was added + +* `models.CheckElasticVolumeFilePathAvailabilityRequest` was added + +* `models.SuspectFile` was added + +* `models.VolumeLanguage` was added + +* `models.ElasticSmbEncryption` was added + +* `models.ElasticVolumeProperties` was added + +* `models.BreakthroughMode` was added + +* `models.ElasticAccount$DefinitionStages` was added + +* `models.ElasticEncryption` was added + +* `models.ElasticBackupPolicy$Definition` was added + +* `models.RansomwareReportSeverity` was added + +* `models.ElasticVolumeRevert` was added + +* `models.RansomwareReports` was added + +* `models.ActiveDirectoryConfig$Definition` was added + +* `models.SnapshotUsage` was added + +* `models.ActiveDirectoryConfig` was added + +* `models.VolumeSize` was added + +* `models.ElasticBackupPolicies` was added + +* `models.CacheMountTargetProperties` was added + +* `models.ElasticExportPolicyRule` was added + +* `models.BucketPermissions` was added + +* `models.ActiveDirectoryConfig$DefinitionStages` was added + +* `models.ElasticAccountUpdate` was added + +* `models.ElasticCapacityPoolUpdate` was added + +* `models.ElasticSnapshot$UpdateStages` was added + +* `models.CifsChangeNotifyState` was added + +* `models.ActiveDirectoryConfigUpdateProperties` was added + +* `models.ElasticAccountProperties` was added + +* `models.ElasticSnapshots` was added + +* `models.ElasticKeyVaultStatus` was added + +* `models.BucketPatchPermissions` was added + +* `models.Bucket$Definition` was added + +* `models.ElasticEncryptionIdentity` was added + +* `models.Bucket` was added + +* `models.ElasticSnapshotProperties` was added + +* `models.ActiveDirectoryConfigs` was added + +* `models.ElasticBackup$UpdateStages` was added + +* `models.CacheProperties` was added + +* `models.Exclude` was added + +* `models.NfsUser` was added + +* `models.BucketGenerateCredentials` was added + +* `models.ActiveDirectoryConfig$Update` was added -### Bugs Fixed +* `models.SecretPasswordIdentity` was added -### Other Changes +* `models.Caches` was added -## 2.0.0 (2025-11-14) +* `models.Cache$Definition` was added -- Azure Resource Manager NetAppFiles client library for Java. This package contains Microsoft Azure SDK for NetAppFiles Management SDK. Microsoft NetApp Files Azure Resource Provider specification. Package api-version 2025-09-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +* `models.ElasticAccount$UpdateStages` was added -### Breaking Changes +* `models.ElasticBackupPolicy$Update` was added -#### `models.SnapshotPoliciesList` was removed +* `models.ElasticBackupVaults` was added -#### `models.VolumeQuotaRulesList` was removed +* `models.RansomwareReportState` was added -#### `models.BackupPoliciesList` was removed +* `models.ElasticCapacityPool` was added -#### `models.SnapshotsList` was removed +* `models.CacheProvisioningState` was added -#### `models.VolumeGroupList` was removed +* `models.ElasticExportPolicy` was added -#### `models.RelationshipStatus` was removed +* `models.ElasticSnapshotPolicyWeeklySchedule` was added -#### `models.UsagesListResult` was removed +* `models.OriginClusterInformation` was added -#### `models.OperationListResult` was removed +* `models.ElasticVolume$Definition` was added -#### `models.BackupsList` was removed +* `models.BucketCredentialsExpiry` was added -#### `models.BackupVaultsList` was removed +* `models.CacheUpdate` was added -#### `models.SubscriptionQuotaItemList` was removed +* `models.ElasticRootAccess` was added -#### `models.RegionInfosList` was removed +* `models.ElasticBackupVault$Update` was added -#### `models.VolumeList` was removed +* `models.RansomwareSuspectsClearRequest` was added -#### `models.CapacityPoolList` was removed +* `models.ElasticBackups` was added -#### `models.SubvolumesList` was removed +* `models.ElasticSnapshotPolicy` was added -#### `models.ListReplications` was removed +* `models.CheckElasticResourceAvailabilityStatus` was added -#### `models.NetAppAccountList` was removed +* `models.SecretPassword` was added -#### `models.ServiceSpecification` was modified +* `models.NetAppResourceQuotaLimitsAccounts` was added -* `ServiceSpecification()` was changed to private access -* `withMetricSpecifications(java.util.List)` was removed -* `withLogSpecifications(java.util.List)` was removed +* `models.ElasticBackup$Update` was added -#### `models.MetricSpecification` was modified +* `models.ElasticCapacityPool$Update` was added -* `MetricSpecification()` was changed to private access -* `withInternalMetricName(java.lang.String)` was removed -* `withIsInternal(java.lang.Boolean)` was removed -* `withFillGapWithZero(java.lang.Boolean)` was removed -* `withSourceMdmNamespace(java.lang.String)` was removed -* `withEnableRegionalMdmAccount(java.lang.Boolean)` was removed -* `withSourceMdmAccount(java.lang.String)` was removed -* `withDimensions(java.util.List)` was removed -* `withAggregationType(java.lang.String)` was removed -* `withCategory(java.lang.String)` was removed -* `withDisplayDescription(java.lang.String)` was removed -* `withSupportedTimeGrainTypes(java.util.List)` was removed -* `withUnit(java.lang.String)` was removed -* `withDisplayName(java.lang.String)` was removed -* `withResourceIdDimensionNameOverride(java.lang.String)` was removed -* `withSupportedAggregationTypes(java.util.List)` was removed -* `withName(java.lang.String)` was removed +* `models.ElasticSnapshotPolicyDailySchedule` was added -#### `models.BackupStatus` was modified +* `models.ElasticCapacityPool$UpdateStages` was added -* `models.RelationshipStatus relationshipStatus()` -> `models.VolumeBackupRelationshipStatus relationshipStatus()` +* `models.PeeringPassphrases` was added -#### `models.ReplicationStatus` was modified +* `models.Bucket$Update` was added -* `models.RelationshipStatus relationshipStatus()` -> `models.VolumeReplicationRelationshipStatus relationshipStatus()` +* `models.ElasticAccount$Update` was added -#### `models.Volume` was modified +* `models.MountTargetProperties` was added -* `listReplications(com.azure.core.util.Context)` was removed +* `models.LdapState` was added -#### `models.OperationDisplay` was modified +* `models.Cache$Update` was added -* `OperationDisplay()` was changed to private access -* `withProvider(java.lang.String)` was removed -* `withOperation(java.lang.String)` was removed -* `withDescription(java.lang.String)` was removed -* `withResource(java.lang.String)` was removed +* `models.RansomwareProtectionPatchSettings` was added -#### `models.VolumePatch` was modified +* `models.Cache` was added -* `withLocation(java.lang.String)` was removed -* `withTags(java.util.Map)` was removed +* `models.ElasticSnapshotPolicy$Definition` was added -#### `models.CapacityPool$Definition` was modified +* `models.RansomwareProtectionSettings` was added -* `withCustomThroughputMibps(java.lang.Float)` was removed +* `models.ElasticSnapshot$Definition` was added -#### `models.UsageName` was modified +* `models.ElasticBackupVaultProperties` was added -* `UsageName()` was changed to private access -* `withLocalizedValue(java.lang.String)` was removed -* `withValue(java.lang.String)` was removed +* `models.ElasticBackupPolicy$DefinitionStages` was added -#### `models.LogSpecification` was modified +* `models.ElasticNfsv4Access` was added -* `LogSpecification()` was changed to private access -* `withName(java.lang.String)` was removed -* `withDisplayName(java.lang.String)` was removed +* `models.ActiveDirectoryConfigProperties` was added -#### `models.CapacityPool$Update` was modified +* `models.ElasticVolumeRestorationState` was added -* `withCustomThroughputMibps(java.lang.Float)` was removed +* `models.ElasticVolumePolicyEnforcement` was added -#### `models.CapacityPool` was modified +* `models.SecretPasswordKeyVaultProperties` was added -* `java.lang.Float customThroughputMibps()` -> `java.lang.Integer customThroughputMibps()` +* `models.ElasticAccount$Definition` was added -#### `models.ProvisioningState` was modified +* `models.ElasticVolumes` was added -* `models.ProvisioningState[] values()` -> `java.util.Collection values()` -* `toString()` was removed -* `valueOf(java.lang.String)` was removed +* `models.ElasticBackupVault$Definition` was added -#### `models.NicInfo` was modified +* `models.ElasticSnapshotPolicy$Update` was added -* `NicInfo()` was changed to private access -* `withVolumeResourceIds(java.util.List)` was removed +* `models.ProtocolTypes` was added -#### `models.VolumeBackups` was modified +* `models.ElasticBackup$DefinitionStages` was added -* `VolumeBackups()` was changed to private access -* `withVolumeName(java.lang.String)` was removed -* `withBackupsCount(java.lang.Integer)` was removed -* `withPolicyEnabled(java.lang.Boolean)` was removed -* `withVolumeResourceId(java.lang.String)` was removed +* `models.CifsUser` was added -#### `models.DestinationReplication` was modified +* `models.DesiredRansomwareProtectionState` was added -* `DestinationReplication()` was changed to private access -* `withResourceId(java.lang.String)` was removed -* `withReplicationType(models.ReplicationType)` was removed -* `withRegion(java.lang.String)` was removed -* `withZone(java.lang.String)` was removed +* `models.ElasticSnapshotPolicies` was added -#### `models.RestoreStatus` was modified +* `models.ElasticAccount` was added -* `models.RelationshipStatus relationshipStatus()` -> `models.VolumeRestoreRelationshipStatus relationshipStatus()` +* `models.QuotaReport` was added -#### `models.BackupPolicyPatch` was modified +* `models.ListReplicationsRequest` was added -* `withTags(java.util.Map)` was removed -* `withLocation(java.lang.String)` was removed +* `models.CheckElasticResourceAvailabilityReason` was added -#### `models.Volumes` was modified +* `models.ElasticCapacityPoolProperties` was added -* `listReplications(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `models.ActiveDirectoryConfigUpdate` was added -#### `models.NetAppAccountPatch` was modified +* `models.BucketServerPatchProperties` was added -* `withLocation(java.lang.String)` was removed -* `withTags(java.util.Map)` was removed +* `models.ElasticVolume$DefinitionStages` was added -#### `models.RegionInfoAvailabilityZoneMappingsItem` was modified +* `models.VolumeReplicationRelationshipStatus` was added -* `RegionInfoAvailabilityZoneMappingsItem()` was changed to private access -* `withIsAvailable(java.lang.Boolean)` was removed -* `withAvailabilityZone(java.lang.String)` was removed +* `models.CacheUpdateProperties` was added -#### `models.CapacityPoolPatch` was modified +* `models.ElasticAccountUpdateProperties` was added -* `withCustomThroughputMibps(java.lang.Float)` was removed -* `java.lang.Float customThroughputMibps()` -> `java.lang.Integer customThroughputMibps()` -* `withTags(java.util.Map)` was removed -* `withLocation(java.lang.String)` was removed +* `models.ElasticCapacityPool$DefinitionStages` was added -#### `models.Dimension` was modified +* `models.CredentialsStatus` was added -* `Dimension()` was changed to private access -* `withName(java.lang.String)` was removed -* `withDisplayName(java.lang.String)` was removed +* `models.ElasticSmbProperties` was added -#### `models.Snapshots` was modified +* `models.LargeVolumeType` was added -* `update(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.Object,com.azure.core.util.Context)` was removed -* `update(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.Object)` was removed +* `models.PolicyStatus` was added -### Features Added +* `models.ElasticVolumeBackupProperties` was added -* `models.NetAppResourceQuotaLimitsAccounts` was added +* `models.ElasticBackup` was added -* `models.MountTargetProperties` was added +* `models.ChangeZoneRequest` was added -* `models.ReplicationMirrorState` was added +* `models.ElasticBackupVault$DefinitionStages` was added -* `models.ListReplicationsRequest` was added +* `models.ElasticSnapshot$Update` was added -* `models.VolumeReplicationRelationshipStatus` was added +* `models.CheckElasticResourceAvailabilityResponse` was added -* `models.Exclude` was added +* `models.SmbEncryptionState` was added + +* `models.ElasticBackupVault` was added + +* `models.ElasticUnixAccessRule` was added + +* `models.ActiveDirectoryConfig$UpdateStages` was added + +* `models.ElasticVolume` was added + +* `models.ElasticVolume$Update` was added + +* `models.RansomwareReportProperties` was added + +* `models.ElasticBackupPolicyState` was added + +* `models.ElasticSnapshotPolicyMonthlySchedule` was added + +* `models.ExternalReplicationSetupStatus` was added + +* `models.GlobalFileLockingState` was added + +* `models.Cache$DefinitionStages` was added + +* `models.ElasticVolumeDataProtectionPatchProperties` was added + +* `models.ElasticAccounts` was added + +* `models.ElasticSmbPatchProperties` was added + +* `models.Bucket$UpdateStages` was added + +* `models.Buckets` was added + +* `models.ElasticSnapshot$DefinitionStages` was added + +* `models.FileSystemUser` was added + +* `models.ElasticBackupVault$UpdateStages` was added + +* `models.SnapshotDirectoryVisibility` was added + +* `models.ElasticBackupPolicy$UpdateStages` was added + +* `models.ElasticEncryptionConfiguration` was added + +* `models.EnableWriteBackState` was added * `models.VolumeBackupRelationshipStatus` was added -* `models.VolumeRestoreRelationshipStatus` was added +* `models.DayOfWeek` was added -#### `models.SnapshotPolicyVolumeList` was modified +* `models.ElasticCapacityPool$Definition` was added -* `nextLink()` was added +* `models.ElasticSnapshotPolicy$DefinitionStages` was added -#### `models.Volume` was modified +* `models.VolumeRestoreRelationshipStatus` was added -* `listReplications(models.ListReplicationsRequest,com.azure.core.util.Context)` was added +* `models.ElasticBackupType` was added -#### `models.VolumePatch` was modified +* `models.ElasticProtocolType` was added -* `tags()` was added -* `location()` was added +* `models.ElasticSnapshotPolicy$UpdateStages` was added -#### `models.CapacityPool$Definition` was modified +#### `models.NetAppAccount$Definition` was modified -* `withCustomThroughputMibps(java.lang.Integer)` was added +* `withLdapConfiguration(models.LdapConfiguration)` was added -#### `models.CapacityPool$Update` was modified +#### `models.SnapshotPolicyVolumeList` was modified -* `withCustomThroughputMibps(java.lang.Integer)` was added +* `nextLink()` was added -#### `NetAppFilesManager` was modified +#### `models.CapacityPool$Update` was modified -* `netAppResourceQuotaLimitsAccounts()` was added +* `withCustomThroughputMibps(java.lang.Integer)` was added #### `models.VolumeGroupDetails` was modified * `systemData()` was added -#### `models.ProvisioningState` was modified +#### `models.Volume$Definition` was modified -* `ProvisioningState()` was added +* `withBreakthroughMode(models.BreakthroughMode)` was added +* `withLdapServerType(models.LdapServerType)` was added +* `withLargeVolumeType(models.LargeVolumeType)` was added +* `withLanguage(models.VolumeLanguage)` was added -#### `models.BackupPolicyPatch` was modified +#### `models.ProvisioningState` was modified -* `location()` was added -* `tags()` was added +* `ProvisioningState()` was added -#### `models.Volumes` was modified +#### `models.ReplicationObject` was modified -* `listReplications(java.lang.String,java.lang.String,java.lang.String,java.lang.String,models.ListReplicationsRequest,com.azure.core.util.Context)` was added +* `mirrorState()` was added +* `relationshipStatus()` was added +* `externalReplicationSetupInfo()` was added +* `externalReplicationSetupStatus()` was added #### `models.NetAppAccountPatch` was modified +* `ldapConfiguration()` was added +* `withLdapConfiguration(models.LdapConfiguration)` was added * `tags()` was added * `location()` was added +#### `models.NetAppAccount$Update` was modified + +* `withLdapConfiguration(models.LdapConfiguration)` was added + #### `models.CapacityPoolPatch` was modified * `withCustomThroughputMibps(java.lang.Integer)` was added * `location()` was added * `tags()` was added +#### `models.VolumeGroupVolumeProperties` was modified + +* `withLdapServerType(models.LdapServerType)` was added +* `largeVolumeType()` was added +* `withLanguage(models.VolumeLanguage)` was added +* `withBreakthroughMode(models.BreakthroughMode)` was added +* `language()` was added +* `ldapServerType()` was added +* `withLargeVolumeType(models.LargeVolumeType)` was added +* `breakthroughMode()` was added + #### `models.Replication` was modified * `mirrorState()` was added @@ -275,6 +1069,66 @@ * `usage()` was added +#### `models.Volume` was modified + +* `largeVolumeType()` was added +* `language()` was added +* `breakthroughMode()` was added +* `listReplications(models.ListReplicationsRequest,com.azure.core.util.Context)` was added +* `ldapServerType()` was added +* `listQuotaReport(com.azure.core.util.Context)` was added +* `listQuotaReport()` was added + +#### `models.VolumePatch` was modified + +* `location()` was added +* `tags()` was added + +#### `models.CapacityPool$Definition` was modified + +* `withCustomThroughputMibps(java.lang.Integer)` was added + +#### `models.VolumePropertiesDataProtection` was modified + +* `withRansomwareProtection(models.RansomwareProtectionSettings)` was added +* `ransomwareProtection()` was added + +#### `NetAppFilesManager` was modified + +* `activeDirectoryConfigs()` was added +* `elasticBackupPolicies()` was added +* `elasticCapacityPools()` was added +* `elasticBackups()` was added +* `elasticSnapshotPolicies()` was added +* `elasticVolumes()` was added +* `elasticBackupVaults()` was added +* `caches()` was added +* `elasticSnapshots()` was added +* `ransomwareReports()` was added +* `buckets()` was added +* `elasticAccounts()` was added +* `netAppResourceQuotaLimitsAccounts()` was added + +#### `models.VolumePatchPropertiesDataProtection` was modified + +* `ransomwareProtection()` was added +* `withRansomwareProtection(models.RansomwareProtectionPatchSettings)` was added + +#### `models.BackupPolicyPatch` was modified + +* `location()` was added +* `tags()` was added + +#### `models.Volumes` was modified + +* `listReplications(java.lang.String,java.lang.String,java.lang.String,java.lang.String,models.ListReplicationsRequest,com.azure.core.util.Context)` was added +* `listQuotaReport(java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was added +* `listQuotaReport(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.NetAppAccount` was modified + +* `ldapConfiguration()` was added + ## 1.10.0-beta.1 (2025-10-15) - Azure Resource Manager NetAppFiles client library for Java. This package contains Microsoft Azure SDK for NetAppFiles Management SDK. Microsoft NetApp Files Azure Resource Provider specification. Package tag package-preview-2025-07-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/netapp/azure-resourcemanager-netapp/README.md b/sdk/netapp/azure-resourcemanager-netapp/README.md index 0b8c251666c9..c3de9f22d1a4 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 2025-09-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 2025-09-01-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.0.0 + 2.1.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 9efb1f0e562a..73fd32d47dd2 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md +++ b/sdk/netapp/azure-resourcemanager-netapp/SAMPLE.md @@ -14,6 +14,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) @@ -52,6 +61,93 @@ - [MigrateBackups](#backupsundervolume_migratebackups) +## Buckets + +- [CreateOrUpdate](#buckets_createorupdate) +- [Delete](#buckets_delete) +- [GenerateCredentials](#buckets_generatecredentials) +- [Get](#buckets_get) +- [List](#buckets_list) +- [Update](#buckets_update) + +## Caches + +- [CreateOrUpdate](#caches_createorupdate) +- [Delete](#caches_delete) +- [Get](#caches_get) +- [ListByCapacityPools](#caches_listbycapacitypools) +- [ListPeeringPassphrases](#caches_listpeeringpassphrases) +- [PoolChange](#caches_poolchange) +- [Update](#caches_update) + +## ElasticAccounts + +- [CreateOrUpdate](#elasticaccounts_createorupdate) +- [Delete](#elasticaccounts_delete) +- [GetByResourceGroup](#elasticaccounts_getbyresourcegroup) +- [List](#elasticaccounts_list) +- [ListByResourceGroup](#elasticaccounts_listbyresourcegroup) +- [Update](#elasticaccounts_update) + +## ElasticBackupPolicies + +- [CreateOrUpdate](#elasticbackuppolicies_createorupdate) +- [Delete](#elasticbackuppolicies_delete) +- [Get](#elasticbackuppolicies_get) +- [ListByElasticAccount](#elasticbackuppolicies_listbyelasticaccount) +- [Update](#elasticbackuppolicies_update) + +## ElasticBackupVaults + +- [CreateOrUpdate](#elasticbackupvaults_createorupdate) +- [Delete](#elasticbackupvaults_delete) +- [Get](#elasticbackupvaults_get) +- [ListByElasticAccount](#elasticbackupvaults_listbyelasticaccount) +- [Update](#elasticbackupvaults_update) + +## ElasticBackups + +- [CreateOrUpdate](#elasticbackups_createorupdate) +- [Delete](#elasticbackups_delete) +- [Get](#elasticbackups_get) +- [ListByVault](#elasticbackups_listbyvault) +- [Update](#elasticbackups_update) + +## ElasticCapacityPools + +- [ChangeZone](#elasticcapacitypools_changezone) +- [CheckVolumeFilePathAvailability](#elasticcapacitypools_checkvolumefilepathavailability) +- [CreateOrUpdate](#elasticcapacitypools_createorupdate) +- [Delete](#elasticcapacitypools_delete) +- [Get](#elasticcapacitypools_get) +- [ListByElasticAccount](#elasticcapacitypools_listbyelasticaccount) +- [Update](#elasticcapacitypools_update) + +## ElasticSnapshotPolicies + +- [CreateOrUpdate](#elasticsnapshotpolicies_createorupdate) +- [Delete](#elasticsnapshotpolicies_delete) +- [Get](#elasticsnapshotpolicies_get) +- [ListByElasticAccount](#elasticsnapshotpolicies_listbyelasticaccount) +- [ListElasticVolumes](#elasticsnapshotpolicies_listelasticvolumes) +- [Update](#elasticsnapshotpolicies_update) + +## ElasticSnapshots + +- [CreateOrUpdate](#elasticsnapshots_createorupdate) +- [Delete](#elasticsnapshots_delete) +- [Get](#elasticsnapshots_get) +- [ListByElasticVolume](#elasticsnapshots_listbyelasticvolume) + +## ElasticVolumes + +- [CreateOrUpdate](#elasticvolumes_createorupdate) +- [Delete](#elasticvolumes_delete) +- [Get](#elasticvolumes_get) +- [ListByElasticPool](#elasticvolumes_listbyelasticpool) +- [Revert](#elasticvolumes_revert) +- [Update](#elasticvolumes_update) + ## NetAppResource - [CheckFilePathAvailability](#netappresource_checkfilepathavailability) @@ -93,6 +189,12 @@ - [List](#pools_list) - [Update](#pools_update) +## RansomwareReports + +- [ClearSuspects](#ransomwarereports_clearsuspects) +- [Get](#ransomwarereports_get) +- [List](#ransomwarereports_list) + ## SnapshotPolicies - [Create](#snapshotpolicies_create) @@ -148,6 +250,7 @@ - [Get](#volumes_get) - [List](#volumes_list) - [ListGetGroupIdListForLdapUser](#volumes_listgetgroupidlistforldapuser) +- [ListQuotaReport](#volumes_listquotareport) - [ListReplications](#volumes_listreplications) - [PeerExternalCluster](#volumes_peerexternalcluster) - [PerformReplicationTransfer](#volumes_performreplicationtransfer) @@ -175,7 +278,7 @@ import java.util.Arrays; */ public final class AccountsChangeKeyVaultSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_ChangeKeyVault.json + * x-ms-original-file: 2025-09-01-preview/Accounts_ChangeKeyVault.json */ /** * Sample code: Accounts_ChangeKeyVault. @@ -207,7 +310,7 @@ import java.util.Arrays; */ public final class AccountsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01-preview/Accounts_CreateOrUpdate.json */ /** * Sample code: Accounts_CreateOrUpdate. @@ -219,7 +322,7 @@ public final class AccountsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-09-01/Accounts_CreateOrUpdateAD.json + * x-ms-original-file: 2025-09-01-preview/Accounts_CreateOrUpdateAD.json */ /** * Sample code: Accounts_CreateOrUpdateWithActiveDirectory. @@ -255,7 +358,7 @@ public final class AccountsCreateOrUpdateSamples { */ public final class AccountsDeleteSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_Delete.json + * x-ms-original-file: 2025-09-01-preview/Accounts_Delete.json */ /** * Sample code: Accounts_Delete. @@ -276,7 +379,7 @@ public final class AccountsDeleteSamples { */ public final class AccountsGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_Get.json + * x-ms-original-file: 2025-09-01-preview/Accounts_Get.json */ /** * Sample code: Accounts_Get. @@ -297,7 +400,7 @@ public final class AccountsGetByResourceGroupSamples { */ public final class AccountsGetChangeKeyVaultInformationSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_GetChangeKeyVaultInformation.json + * x-ms-original-file: 2025-09-01-preview/Accounts_GetChangeKeyVaultInformation.json */ /** * Sample code: Accounts_GetChangeKeyVaultInformation. @@ -319,7 +422,7 @@ public final class AccountsGetChangeKeyVaultInformationSamples { */ public final class AccountsListSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_ListBySubscription.json + * x-ms-original-file: 2025-09-01-preview/Accounts_ListBySubscription.json */ /** * Sample code: Accounts_ListBySubscription. @@ -340,7 +443,7 @@ public final class AccountsListSamples { */ public final class AccountsListByResourceGroupSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_List.json + * x-ms-original-file: 2025-09-01-preview/Accounts_List.json */ /** * Sample code: Accounts_List. @@ -361,7 +464,7 @@ public final class AccountsListByResourceGroupSamples { */ public final class AccountsRenewCredentialsSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_RenewCredentials.json + * x-ms-original-file: 2025-09-01-preview/Accounts_RenewCredentials.json */ /** * Sample code: Accounts_RenewCredentials. @@ -384,7 +487,7 @@ import com.azure.resourcemanager.netapp.models.EncryptionTransitionRequest; */ public final class AccountsTransitionToCmkSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_TransitionEncryptionKey.json + * x-ms-original-file: 2025-09-01-preview/Accounts_TransitionEncryptionKey.json */ /** * Sample code: Accounts_MigrateEncryptionKey. @@ -414,7 +517,7 @@ import java.util.Map; */ public final class AccountsUpdateSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_Update.json + * x-ms-original-file: 2025-09-01-preview/Accounts_Update.json */ /** * Sample code: Accounts_Update. @@ -442,6 +545,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: 2025-09-01-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: 2025-09-01-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: 2025-09-01-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: 2025-09-01-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: 2025-09-01-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: 2025-09-01-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 @@ -450,7 +738,7 @@ public final class AccountsUpdateSamples { */ public final class BackupPoliciesCreateSamples { /* - * x-ms-original-file: 2025-09-01/BackupPolicies_Create.json + * x-ms-original-file: 2025-09-01-preview/BackupPolicies_Create.json */ /** * Sample code: BackupPolicies_Create. @@ -479,7 +767,7 @@ public final class BackupPoliciesCreateSamples { */ public final class BackupPoliciesDeleteSamples { /* - * x-ms-original-file: 2025-09-01/BackupPolicies_Delete.json + * x-ms-original-file: 2025-09-01-preview/BackupPolicies_Delete.json */ /** * Sample code: BackupPolicies_Delete. @@ -501,7 +789,7 @@ public final class BackupPoliciesDeleteSamples { */ public final class BackupPoliciesGetSamples { /* - * x-ms-original-file: 2025-09-01/BackupPolicies_Get.json + * x-ms-original-file: 2025-09-01-preview/BackupPolicies_Get.json */ /** * Sample code: Backups_Get. @@ -523,7 +811,7 @@ public final class BackupPoliciesGetSamples { */ public final class BackupPoliciesListSamples { /* - * x-ms-original-file: 2025-09-01/BackupPolicies_List.json + * x-ms-original-file: 2025-09-01-preview/BackupPolicies_List.json */ /** * Sample code: BackupPolicies_List. @@ -542,399 +830,1975 @@ public final class BackupPoliciesListSamples { import com.azure.resourcemanager.netapp.models.BackupPolicy; /** - * Samples for BackupPolicies Update. + * Samples for BackupPolicies Update. + */ +public final class BackupPoliciesUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/BackupPolicies_Update.json + */ + /** + * Sample code: BackupPolicies_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupPoliciesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + BackupPolicy resource = manager.backupPolicies() + .getWithResponse("myRG", "account1", "backupPolicyName", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withDailyBackupsToKeep(5) + .withWeeklyBackupsToKeep(10) + .withMonthlyBackupsToKeep(10) + .withEnabled(false) + .apply(); + } +} +``` + +### BackupVaults_CreateOrUpdate + +```java +/** + * Samples for BackupVaults CreateOrUpdate. + */ +public final class BackupVaultsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/BackupVaults_Create.json + */ + /** + * Sample code: BackupVault_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupVaultCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backupVaults() + .define("backupVault1") + .withRegion("eastus") + .withExistingNetAppAccount("myRG", "account1") + .create(); + } +} +``` + +### BackupVaults_Delete + +```java +/** + * Samples for BackupVaults Delete. + */ +public final class BackupVaultsDeleteSamples { + /* + * x-ms-original-file: 2025-09-01-preview/BackupVaults_Delete.json + */ + /** + * Sample code: BackupVaults_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupVaultsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backupVaults().delete("resourceGroup", "account1", "backupVault1", com.azure.core.util.Context.NONE); + } +} +``` + +### BackupVaults_Get + +```java +/** + * Samples for BackupVaults Get. + */ +public final class BackupVaultsGetSamples { + /* + * x-ms-original-file: 2025-09-01-preview/BackupVaults_Get.json + */ + /** + * Sample code: BackupVaults_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupVaultsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backupVaults().getWithResponse("myRG", "account1", "backupVault1", com.azure.core.util.Context.NONE); + } +} +``` + +### BackupVaults_ListByNetAppAccount + +```java +/** + * Samples for BackupVaults ListByNetAppAccount. + */ +public final class BackupVaultsListByNetAppAccountSamples { + /* + * x-ms-original-file: 2025-09-01-preview/BackupVaults_List.json + */ + /** + * Sample code: BackupVaults_List. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupVaultsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backupVaults().listByNetAppAccount("myRG", "account1", com.azure.core.util.Context.NONE); + } +} +``` + +### BackupVaults_Update + +```java +import com.azure.resourcemanager.netapp.models.BackupVault; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for BackupVaults Update. + */ +public final class BackupVaultsUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/BackupVaults_Update.json + */ + /** + * Sample code: BackupVaults_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupVaultsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + BackupVault resource = manager.backupVaults() + .getWithResponse("myRG", "account1", "backupVault1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("Tag1", "Value1")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Backups_Create + +```java +/** + * Samples for Backups Create. + */ +public final class BackupsCreateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/BackupsUnderBackupVault_Create.json + */ + /** + * Sample code: BackupsUnderBackupVault_Create. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsUnderBackupVaultCreate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backups() + .define("backup1") + .withExistingBackupVault("myRG", "account1", "backupVault1") + .withVolumeResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPool/pool1/volumes/volume1") + .withLabel("myLabel") + .create(); + } +} +``` + +### Backups_Delete + +```java +/** + * Samples for Backups Delete. + */ +public final class BackupsDeleteSamples { + /* + * x-ms-original-file: 2025-09-01-preview/BackupsUnderBackupVault_Delete.json + */ + /** + * Sample code: BackupsUnderBackupVault_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsUnderBackupVaultDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backups() + .delete("resourceGroup", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE); + } +} +``` + +### Backups_Get + +```java +/** + * Samples for Backups Get. + */ +public final class BackupsGetSamples { + /* + * x-ms-original-file: 2025-09-01-preview/BackupsUnderBackupVault_Get.json + */ + /** + * Sample code: BackupsUnderBackupVault_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsUnderBackupVaultGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backups() + .getWithResponse("myRG", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE); + } +} +``` + +### Backups_GetLatestStatus + +```java +/** + * Samples for Backups GetLatestStatus. + */ +public final class BackupsGetLatestStatusSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Volumes_LatestBackupStatus.json + */ + /** + * Sample code: Volumes_BackupStatus. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesBackupStatus(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backups() + .getLatestStatusWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } +} +``` + +### Backups_GetVolumeLatestRestoreStatus + +```java +/** + * Samples for Backups GetVolumeLatestRestoreStatus. + */ +public final class BackupsGetVolumeLatestRestoreStatusSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Volumes_LatestRestoreStatus.json + */ + /** + * Sample code: Volumes_RestoreStatus. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesRestoreStatus(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backups() + .getVolumeLatestRestoreStatusWithResponse("myRG", "account1", "pool1", "volume1", + com.azure.core.util.Context.NONE); + } +} +``` + +### Backups_ListByVault + +```java +/** + * Samples for Backups ListByVault. + */ +public final class BackupsListByVaultSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Backups_ListByVault.json + */ + /** + * Sample code: Backups_ListByVault. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsListByVault(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backups().listByVault("myRG", "account1", "backupVault1", null, com.azure.core.util.Context.NONE); + } +} +``` + +### Backups_Update + +```java +import com.azure.resourcemanager.netapp.models.Backup; + +/** + * Samples for Backups Update. + */ +public final class BackupsUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/BackupsUnderBackupVault_Update.json + */ + /** + * Sample code: BackupsUnderBackupVault_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsUnderBackupVaultUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + Backup resource = manager.backups() + .getWithResponse("myRG", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } +} +``` + +### BackupsUnderAccount_MigrateBackups + +```java +import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; + +/** + * Samples for BackupsUnderAccount MigrateBackups. + */ +public final class BackupsUnderAccountMigrateBackupsSamples { + /* + * x-ms-original-file: 2025-09-01-preview/BackupsUnderAccount_Migrate.json + */ + /** + * Sample code: BackupsUnderAccount_Migrate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsUnderAccountMigrate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backupsUnderAccounts() + .migrateBackups("myRG", "account1", new BackupsMigrationRequest().withBackupVaultId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupVaults/backupVault1"), + com.azure.core.util.Context.NONE); + } +} +``` + +### BackupsUnderBackupVault_RestoreFiles + +```java +import com.azure.resourcemanager.netapp.models.BackupRestoreFiles; +import java.util.Arrays; + +/** + * Samples for BackupsUnderBackupVault RestoreFiles. + */ +public final class BackupsUnderBackupVaultRestoreFilesSamples { + /* + * x-ms-original-file: 2025-09-01-preview/BackupsUnderBackupVault_SingleFileRestore.json + */ + /** + * Sample code: Backups_SingleFileRestore. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsSingleFileRestore(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backupsUnderBackupVaults() + .restoreFiles("myRG", "account1", "backupVault1", "backup1", new BackupRestoreFiles() + .withFileList(Arrays.asList("/dir1/customer1.db", "/dir1/customer2.db")) + .withDestinationVolumeId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1"), + com.azure.core.util.Context.NONE); + } +} +``` + +### BackupsUnderVolume_MigrateBackups + +```java +import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; + +/** + * Samples for BackupsUnderVolume MigrateBackups. + */ +public final class BackupsUnderVolumeMigrateBackupsSamples { + /* + * x-ms-original-file: 2025-09-01-preview/BackupsUnderVolume_Migrate.json + */ + /** + * Sample code: BackupsUnderVolume_Migrate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void backupsUnderVolumeMigrate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.backupsUnderVolumes() + .migrateBackups("myRG", "account1", "pool1", "volume1", new BackupsMigrationRequest().withBackupVaultId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupVaults/backupVault1"), + com.azure.core.util.Context.NONE); + } +} +``` + +### Buckets_CreateOrUpdate + +```java +import com.azure.resourcemanager.netapp.models.BucketPermissions; +import com.azure.resourcemanager.netapp.models.BucketServerProperties; +import com.azure.resourcemanager.netapp.models.FileSystemUser; +import com.azure.resourcemanager.netapp.models.NfsUser; + +/** + * Samples for Buckets CreateOrUpdate. + */ +public final class BucketsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Buckets_CreateOrUpdate.json + */ + /** + * Sample code: Buckets_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void bucketsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.buckets() + .define("bucket1") + .withExistingVolume("myRG", "account1", "pool1", "volume1") + .withPath("/path") + .withFileSystemUser(new FileSystemUser().withNfsUser(new NfsUser().withUserId(1001L).withGroupId(1000L))) + .withServer(new BucketServerProperties().withFqdn("fullyqualified.domainname.com") + .withCertificateObject("")) + .withPermissions(BucketPermissions.READ_ONLY) + .create(); + } +} +``` + +### Buckets_Delete + +```java +/** + * Samples for Buckets Delete. + */ +public final class BucketsDeleteSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Buckets_Delete.json + */ + /** + * Sample code: Buckets_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void bucketsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.buckets().delete("myRG", "account1", "pool1", "volume1", "bucket1", com.azure.core.util.Context.NONE); + } +} +``` + +### Buckets_GenerateCredentials + +```java +import com.azure.resourcemanager.netapp.models.BucketCredentialsExpiry; + +/** + * Samples for Buckets GenerateCredentials. + */ +public final class BucketsGenerateCredentialsSamples { + /* + * x-ms-original-file: 2025-09-01-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: 2025-09-01-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: 2025-09-01-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_Update + +```java +import com.azure.resourcemanager.netapp.models.Bucket; +import com.azure.resourcemanager.netapp.models.BucketPatchPermissions; +import com.azure.resourcemanager.netapp.models.BucketServerPatchProperties; + +/** + * Samples for Buckets Update. + */ +public final class BucketsUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-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("")) + .withPermissions(BucketPatchPermissions.READ_WRITE) + .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 java.util.Arrays; + +/** + * Samples for Caches CreateOrUpdate. + */ +public final class CachesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-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: 2025-09-01-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: 2025-09-01-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_ListByCapacityPools + +```java +/** + * Samples for Caches ListByCapacityPools. + */ +public final class CachesListByCapacityPoolsSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Caches_ListByCapacityPools.json + */ + /** + * Sample code: Caches_List. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void cachesList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.caches().listByCapacityPools("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); + } +} +``` + +### Caches_ListPeeringPassphrases + +```java +/** + * Samples for Caches ListPeeringPassphrases. + */ +public final class CachesListPeeringPassphrasesSamples { + /* + * x-ms-original-file: 2025-09-01-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: 2025-09-01-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_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: 2025-09-01-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(); + } +} +``` + +### 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: 2025-09-01-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: 2025-09-01-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: 2025-09-01-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: 2025-09-01-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: 2025-09-01-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: 2025-09-01-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: 2025-09-01-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: 2025-09-01-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: 2025-09-01-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: 2025-09-01-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.ElasticBackupPolicyProperties; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState; + +/** + * Samples for ElasticBackupPolicies Update. + */ +public final class ElasticBackupPoliciesUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-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 ElasticBackupPolicyProperties().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: 2025-09-01-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: 2025-09-01-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: 2025-09-01-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: 2025-09-01-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: 2025-09-01-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: 2025-09-01-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: 2025-09-01-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: 2025-09-01-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: 2025-09-01-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: 2025-09-01-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: 2025-09-01-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: 2025-09-01-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-filepth"), + 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: 2025-09-01-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: 2025-09-01-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: 2025-09-01-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: 2025-09-01-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: 2025-09-01-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: 2025-09-01-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 BackupPoliciesUpdateSamples { +public final class ElasticSnapshotPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-01/BackupPolicies_Update.json + * x-ms-original-file: 2025-09-01-preview/ElasticSnapshotPolicies_CreateOrUpdate.json */ /** - * Sample code: BackupPolicies_Update. + * Sample code: ElasticSnapshotPolicies_CreateOrUpdate. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupPoliciesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - BackupPolicy resource = manager.backupPolicies() - .getWithResponse("myRG", "account1", "backupPolicyName", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withDailyBackupsToKeep(5) - .withWeeklyBackupsToKeep(10) - .withMonthlyBackupsToKeep(10) - .withEnabled(false) - .apply(); + 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(); } } ``` -### BackupVaults_CreateOrUpdate +### ElasticSnapshotPolicies_Delete ```java /** - * Samples for BackupVaults CreateOrUpdate. + * Samples for ElasticSnapshotPolicies Delete. */ -public final class BackupVaultsCreateOrUpdateSamples { +public final class ElasticSnapshotPoliciesDeleteSamples { /* - * x-ms-original-file: 2025-09-01/BackupVaults_Create.json + * x-ms-original-file: 2025-09-01-preview/ElasticSnapshotPolicies_Delete.json */ /** - * Sample code: BackupVault_CreateOrUpdate. + * Sample code: ElasticSnapshotPolicies_Delete. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupVaultCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupVaults() - .define("backupVault1") - .withRegion("eastus") - .withExistingNetAppAccount("myRG", "account1") - .create(); + public static void elasticSnapshotPoliciesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshotPolicies() + .delete("resourceGroup", "accountName", "snapshotPolicyName", com.azure.core.util.Context.NONE); } } ``` -### BackupVaults_Delete +### ElasticSnapshotPolicies_Get ```java /** - * Samples for BackupVaults Delete. + * Samples for ElasticSnapshotPolicies Get. */ -public final class BackupVaultsDeleteSamples { +public final class ElasticSnapshotPoliciesGetSamples { /* - * x-ms-original-file: 2025-09-01/BackupVaults_Delete.json + * x-ms-original-file: 2025-09-01-preview/ElasticSnapshotPolicies_Get.json */ /** - * Sample code: BackupVaults_Delete. + * Sample code: ElasticSnapshotPolicies_Get. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupVaultsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupVaults().delete("resourceGroup", "account1", "backupVault1", com.azure.core.util.Context.NONE); + public static void elasticSnapshotPoliciesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshotPolicies() + .getWithResponse("myRG", "account1", "snapshotPolicyName", com.azure.core.util.Context.NONE); } } ``` -### BackupVaults_Get +### ElasticSnapshotPolicies_ListByElasticAccount ```java /** - * Samples for BackupVaults Get. + * Samples for ElasticSnapshotPolicies ListByElasticAccount. */ -public final class BackupVaultsGetSamples { +public final class ElasticSnapshotPoliciesListByElasticAccountSamples { /* - * x-ms-original-file: 2025-09-01/BackupVaults_Get.json + * x-ms-original-file: 2025-09-01-preview/ElasticSnapshotPolicies_ListByElasticAccount.json */ /** - * Sample code: BackupVaults_Get. + * Sample code: ElasticSnapshotPolicies_ListByElasticAccount. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupVaultsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupVaults().getWithResponse("myRG", "account1", "backupVault1", com.azure.core.util.Context.NONE); + public static void + elasticSnapshotPoliciesListByElasticAccount(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshotPolicies().listByElasticAccount("myRG", "account1", com.azure.core.util.Context.NONE); } } ``` -### BackupVaults_ListByNetAppAccount +### ElasticSnapshotPolicies_ListElasticVolumes ```java /** - * Samples for BackupVaults ListByNetAppAccount. + * Samples for ElasticSnapshotPolicies ListElasticVolumes. */ -public final class BackupVaultsListByNetAppAccountSamples { +public final class ElasticSnapshotPoliciesListElasticVolumesSamples { /* - * x-ms-original-file: 2025-09-01/BackupVaults_List.json + * x-ms-original-file: 2025-09-01-preview/ElasticSnapshotPolicies_ListElasticVolumes.json */ /** - * Sample code: BackupVaults_List. + * Sample code: ElasticSnapshotPolicies_ListElasticVolumes. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupVaultsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupVaults().listByNetAppAccount("myRG", "account1", com.azure.core.util.Context.NONE); + public static void + elasticSnapshotPoliciesListElasticVolumes(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshotPolicies() + .listElasticVolumes("myRG", "account1", "snapshotPolicyName", com.azure.core.util.Context.NONE); } } ``` -### BackupVaults_Update +### ElasticSnapshotPolicies_Update ```java -import com.azure.resourcemanager.netapp.models.BackupVault; -import java.util.HashMap; -import java.util.Map; +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.util.Arrays; /** - * Samples for BackupVaults Update. + * Samples for ElasticSnapshotPolicies Update. */ -public final class BackupVaultsUpdateSamples { +public final class ElasticSnapshotPoliciesUpdateSamples { /* - * x-ms-original-file: 2025-09-01/BackupVaults_Update.json + * x-ms-original-file: 2025-09-01-preview/ElasticSnapshotPolicies_Update.json */ /** - * Sample code: BackupVaults_Update. + * Sample code: ElasticSnapshotPolicies_Update. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupVaultsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - BackupVault resource = manager.backupVaults() - .getWithResponse("myRG", "account1", "backupVault1", com.azure.core.util.Context.NONE) + 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().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; + resource.update() + .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)) + .apply(); } } ``` -### Backups_Create +### ElasticSnapshots_CreateOrUpdate ```java /** - * Samples for Backups Create. + * Samples for ElasticSnapshots CreateOrUpdate. */ -public final class BackupsCreateSamples { +public final class ElasticSnapshotsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-01/BackupsUnderBackupVault_Create.json + * x-ms-original-file: 2025-09-01-preview/ElasticSnapshots_CreateOrUpdate.json */ /** - * Sample code: BackupsUnderBackupVault_Create. + * Sample code: ElasticSnapshots_CreateOrUpdate. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupsUnderBackupVaultCreate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backups() - .define("backup1") - .withExistingBackupVault("myRG", "account1", "backupVault1") - .withVolumeResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPool/pool1/volumes/volume1") - .withLabel("myLabel") + public static void elasticSnapshotsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshots() + .define("snapshot1") + .withExistingElasticVolume("myRG", "account1", "pool1", "volume1") .create(); } } ``` -### Backups_Delete +### ElasticSnapshots_Delete ```java /** - * Samples for Backups Delete. + * Samples for ElasticSnapshots Delete. */ -public final class BackupsDeleteSamples { +public final class ElasticSnapshotsDeleteSamples { /* - * x-ms-original-file: 2025-09-01/BackupsUnderBackupVault_Delete.json + * x-ms-original-file: 2025-09-01-preview/ElasticSnapshots_Delete.json */ /** - * Sample code: BackupsUnderBackupVault_Delete. + * Sample code: ElasticSnapshots_Delete. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupsUnderBackupVaultDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backups() - .delete("resourceGroup", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE); + public static void elasticSnapshotsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshots() + .delete("myRG", "account1", "pool1", "volume1", "snapshot1", com.azure.core.util.Context.NONE); } } ``` -### Backups_Get +### ElasticSnapshots_Get ```java /** - * Samples for Backups Get. + * Samples for ElasticSnapshots Get. */ -public final class BackupsGetSamples { +public final class ElasticSnapshotsGetSamples { /* - * x-ms-original-file: 2025-09-01/BackupsUnderBackupVault_Get.json + * x-ms-original-file: 2025-09-01-preview/ElasticSnapshots_Get.json */ /** - * Sample code: BackupsUnderBackupVault_Get. + * Sample code: ElasticSnapshots_Get. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupsUnderBackupVaultGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backups() - .getWithResponse("myRG", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE); + public static void elasticSnapshotsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshots() + .getWithResponse("myRG", "account1", "pool1", "volume1", "snapshot1", com.azure.core.util.Context.NONE); } } ``` -### Backups_GetLatestStatus +### ElasticSnapshots_ListByElasticVolume ```java /** - * Samples for Backups GetLatestStatus. + * Samples for ElasticSnapshots ListByElasticVolume. */ -public final class BackupsGetLatestStatusSamples { +public final class ElasticSnapshotsListByElasticVolumeSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_LatestBackupStatus.json + * x-ms-original-file: 2025-09-01-preview/ElasticSnapshots_ListByElasticVolume.json */ /** - * Sample code: Volumes_BackupStatus. + * Sample code: ElasticSnapshots_ListByElasticVolume. * * @param manager Entry point to NetAppFilesManager. */ - public static void volumesBackupStatus(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backups() - .getLatestStatusWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + public static void + elasticSnapshotsListByElasticVolume(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshots() + .listByElasticVolume("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); } } ``` -### Backups_GetVolumeLatestRestoreStatus +### 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 Backups GetVolumeLatestRestoreStatus. + * Samples for ElasticVolumes CreateOrUpdate. */ -public final class BackupsGetVolumeLatestRestoreStatusSamples { +public final class ElasticVolumesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_LatestRestoreStatus.json + * x-ms-original-file: 2025-09-01-preview/ElasticVolumes_CreateOrUpdate.json */ /** - * Sample code: Volumes_RestoreStatus. + * Sample code: ElasticVolumes_CreateOrUpdate. * * @param manager Entry point to NetAppFilesManager. */ - public static void volumesRestoreStatus(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backups() - .getVolumeLatestRestoreStatusWithResponse("myRG", "account1", "pool1", "volume1", - com.azure.core.util.Context.NONE); + public static void elasticVolumesCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticVolumes() + .define("volume1") + .withRegion("eastus") + .withExistingElasticCapacityPool("myRG", "account1", "pool1") + .withProperties(new ElasticVolumeProperties().withFilePath("my-unique-file-path") + .withSize(107374182400L) + .withExportPolicy( + new ElasticExportPolicy().withRules(Arrays.asList(new ElasticExportPolicyRule().withRuleIndex(1) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("0.0.0.0/0")) + .withRootAccess(ElasticRootAccess.DISABLED)))) + .withProtocolTypes(Arrays.asList(ElasticProtocolType.NFSV3)) + .withDataProtection(new ElasticVolumeDataProtectionProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticSnapshotPolicies/policy1")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticBackupPolicies/elasticBackupPolicy1") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) + .withElasticBackupVaultResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticBackupVaults/elasticBackupVault1")))) + .create(); } } ``` -### Backups_ListByVault +### ElasticVolumes_Delete ```java /** - * Samples for Backups ListByVault. + * Samples for ElasticVolumes Delete. */ -public final class BackupsListByVaultSamples { +public final class ElasticVolumesDeleteSamples { /* - * x-ms-original-file: 2025-09-01/BackupsUnderBackupVault_List.json + * x-ms-original-file: 2025-09-01-preview/ElasticVolumes_Delete.json */ /** - * Sample code: Backups_List. + * Sample code: ElasticVolumes_Delete. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backups().listByVault("myRG", "account1", "backupVault1", null, com.azure.core.util.Context.NONE); + public static void elasticVolumesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticVolumes().delete("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); } } ``` -### Backups_Update +### ElasticVolumes_Get ```java -import com.azure.resourcemanager.netapp.models.Backup; - /** - * Samples for Backups Update. + * Samples for ElasticVolumes Get. */ -public final class BackupsUpdateSamples { +public final class ElasticVolumesGetSamples { /* - * x-ms-original-file: 2025-09-01/BackupsUnderBackupVault_Update.json + * x-ms-original-file: 2025-09-01-preview/ElasticVolumes_Get.json */ /** - * Sample code: BackupsUnderBackupVault_Update. + * Sample code: ElasticVolumes_Get. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupsUnderBackupVaultUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - Backup resource = manager.backups() - .getWithResponse("myRG", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().apply(); + public static void elasticVolumesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticVolumes() + .getWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); } } ``` -### BackupsUnderAccount_MigrateBackups +### ElasticVolumes_ListByElasticPool ```java -import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; - /** - * Samples for BackupsUnderAccount MigrateBackups. + * Samples for ElasticVolumes ListByElasticPool. */ -public final class BackupsUnderAccountMigrateBackupsSamples { +public final class ElasticVolumesListByElasticPoolSamples { /* - * x-ms-original-file: 2025-09-01/BackupsUnderAccount_Migrate.json + * x-ms-original-file: 2025-09-01-preview/ElasticVolumes_ListByElasticPool.json */ /** - * Sample code: BackupsUnderAccount_Migrate. + * Sample code: ElasticVolumes_ListByElasticPool. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupsUnderAccountMigrate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupsUnderAccounts() - .migrateBackups("myRG", "account1", new BackupsMigrationRequest().withBackupVaultId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupVaults/backupVault1"), - com.azure.core.util.Context.NONE); + public static void elasticVolumesListByElasticPool(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticVolumes().listByElasticPool("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); } } ``` -### BackupsUnderBackupVault_RestoreFiles +### ElasticVolumes_Revert ```java -import com.azure.resourcemanager.netapp.models.BackupRestoreFiles; -import java.util.Arrays; +import com.azure.resourcemanager.netapp.models.ElasticVolumeRevert; /** - * Samples for BackupsUnderBackupVault RestoreFiles. + * Samples for ElasticVolumes Revert. */ -public final class BackupsUnderBackupVaultRestoreFilesSamples { +public final class ElasticVolumesRevertSamples { /* - * x-ms-original-file: 2025-09-01/BackupsUnderBackupVault_SingleFileRestore.json + * x-ms-original-file: 2025-09-01-preview/ElasticVolumes_Revert.json */ /** - * Sample code: Backups_SingleFileRestore. + * Sample code: ElasticVolumes_Revert. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupsSingleFileRestore(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupsUnderBackupVaults() - .restoreFiles("myRG", "account1", "backupVault1", "backup1", new BackupRestoreFiles() - .withFileList(Arrays.asList("/dir1/customer1.db", "/dir1/customer2.db")) - .withDestinationVolumeId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool1/volumes/volume1"), + 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); } } ``` -### BackupsUnderVolume_MigrateBackups +### ElasticVolumes_Update ```java -import com.azure.resourcemanager.netapp.models.BackupsMigrationRequest; +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 BackupsUnderVolume MigrateBackups. + * Samples for ElasticVolumes Update. */ -public final class BackupsUnderVolumeMigrateBackupsSamples { +public final class ElasticVolumesUpdateSamples { /* - * x-ms-original-file: 2025-09-01/BackupsUnderVolume_Migrate.json + * x-ms-original-file: 2025-09-01-preview/ElasticVolumes_Update.json */ /** - * Sample code: BackupsUnderVolume_Migrate. + * Sample code: ElasticVolumes_Update. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupsUnderVolumeMigrate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { - manager.backupsUnderVolumes() - .migrateBackups("myRG", "account1", "pool1", "volume1", new BackupsMigrationRequest().withBackupVaultId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/backupVaults/backupVault1"), - com.azure.core.util.Context.NONE); + public static void elasticVolumesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticVolume resource = manager.elasticVolumes() + .getWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new ElasticVolumeUpdateProperties() + .withExportPolicy( + new ElasticExportPolicy().withRules(Arrays.asList(new ElasticExportPolicyRule().withRuleIndex(1) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("0.0.0.0/0")) + .withRootAccess(ElasticRootAccess.DISABLED)))) + .withDataProtection(new ElasticVolumeDataProtectionPatchProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticSnapshotPolicies/policy1")))) + .apply(); } } ``` @@ -949,7 +2813,7 @@ import com.azure.resourcemanager.netapp.models.FilePathAvailabilityRequest; */ public final class NetAppResourceCheckFilePathAvailabilitySamples { /* - * x-ms-original-file: 2025-09-01/CheckFilePathAvailability.json + * x-ms-original-file: 2025-09-01-preview/CheckFilePathAvailability.json */ /** * Sample code: CheckFilePathAvailability. @@ -961,7 +2825,7 @@ public final class NetAppResourceCheckFilePathAvailabilitySamples { .checkFilePathAvailabilityWithResponse("eastus", new FilePathAvailabilityRequest() .withName("my-exact-filepth") .withSubnetId( - "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), com.azure.core.util.Context.NONE); } } @@ -978,7 +2842,7 @@ import com.azure.resourcemanager.netapp.models.ResourceNameAvailabilityRequest; */ public final class NetAppResourceCheckNameAvailabilitySamples { /* - * x-ms-original-file: 2025-09-01/CheckNameAvailability.json + * x-ms-original-file: 2025-09-01-preview/CheckNameAvailability.json */ /** * Sample code: CheckNameAvailability. @@ -1007,7 +2871,7 @@ import com.azure.resourcemanager.netapp.models.QuotaAvailabilityRequest; */ public final class NetAppResourceCheckQuotaAvailabilitySamples { /* - * x-ms-original-file: 2025-09-01/CheckQuotaAvailability.json + * x-ms-original-file: 2025-09-01-preview/CheckQuotaAvailability.json */ /** * Sample code: CheckQuotaAvailability. @@ -1035,7 +2899,7 @@ import com.azure.resourcemanager.netapp.models.QueryNetworkSiblingSetRequest; */ public final class NetAppResourceQueryNetworkSiblingSetSamples { /* - * x-ms-original-file: 2025-09-01/NetworkSiblingSet_Query.json + * x-ms-original-file: 2025-09-01-preview/NetworkSiblingSet_Query.json */ /** * Sample code: NetworkSiblingSet_Query. @@ -1047,7 +2911,7 @@ public final class NetAppResourceQueryNetworkSiblingSetSamples { .queryNetworkSiblingSetWithResponse("eastus", new QueryNetworkSiblingSetRequest() .withNetworkSiblingSetId("9760acf5-4638-11e7-9bdb-020073ca3333") .withSubnetId( - "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet"), + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet"), com.azure.core.util.Context.NONE); } } @@ -1061,7 +2925,7 @@ public final class NetAppResourceQueryNetworkSiblingSetSamples { */ public final class NetAppResourceQueryRegionInfoSamples { /* - * x-ms-original-file: 2025-09-01/RegionInfo.json + * x-ms-original-file: 2025-09-01-preview/RegionInfo.json */ /** * Sample code: RegionInfo_Query. @@ -1085,7 +2949,7 @@ import com.azure.resourcemanager.netapp.models.UpdateNetworkSiblingSetRequest; */ public final class NetAppResourceUpdateNetworkSiblingSetSamples { /* - * x-ms-original-file: 2025-09-01/NetworkSiblingSet_Update.json + * x-ms-original-file: 2025-09-01-preview/NetworkSiblingSet_Update.json */ /** * Sample code: NetworkFeatures_Update. @@ -1097,7 +2961,7 @@ public final class NetAppResourceUpdateNetworkSiblingSetSamples { .updateNetworkSiblingSet("eastus", new UpdateNetworkSiblingSetRequest() .withNetworkSiblingSetId("9760acf5-4638-11e7-9bdb-020073ca3333") .withSubnetId( - "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet") + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet") .withNetworkSiblingSetStateId("12345_44420.8001578125") .withNetworkFeatures(NetworkFeatures.STANDARD), com.azure.core.util.Context.NONE); } @@ -1112,7 +2976,7 @@ public final class NetAppResourceUpdateNetworkSiblingSetSamples { */ public final class NetAppResourceQuotaLimitsGetSamples { /* - * x-ms-original-file: 2025-09-01/NetAppResourceQuotaLimits_Get.json + * x-ms-original-file: 2025-09-01-preview/NetAppResourceQuotaLimits_Get.json */ /** * Sample code: QuotaLimits. @@ -1134,7 +2998,7 @@ public final class NetAppResourceQuotaLimitsGetSamples { */ public final class NetAppResourceQuotaLimitsListSamples { /* - * x-ms-original-file: 2025-09-01/NetAppResourceQuotaLimits_List.json + * x-ms-original-file: 2025-09-01-preview/NetAppResourceQuotaLimits_List.json */ /** * Sample code: QuotaLimits. @@ -1155,7 +3019,7 @@ public final class NetAppResourceQuotaLimitsListSamples { */ public final class NetAppResourceQuotaLimitsAccountGetSamples { /* - * x-ms-original-file: 2025-09-01/NetAppResourceQuotaLimitsAccount_Get.json + * x-ms-original-file: 2025-09-01-preview/NetAppResourceQuotaLimitsAccount_Get.json */ /** * Sample code: QuotaLimits. @@ -1177,7 +3041,7 @@ public final class NetAppResourceQuotaLimitsAccountGetSamples { */ public final class NetAppResourceQuotaLimitsAccountListSamples { /* - * x-ms-original-file: 2025-09-01/NetAppResourceQuotaLimitsAccount_List.json + * x-ms-original-file: 2025-09-01-preview/NetAppResourceQuotaLimitsAccount_List.json */ /** * Sample code: QuotaLimits. @@ -1198,7 +3062,7 @@ public final class NetAppResourceQuotaLimitsAccountListSamples { */ public final class NetAppResourceRegionInfosGetSamples { /* - * x-ms-original-file: 2025-09-01/RegionInfos_Get.json + * x-ms-original-file: 2025-09-01-preview/RegionInfos_Get.json */ /** * Sample code: RegionInfos_Get. @@ -1219,7 +3083,7 @@ public final class NetAppResourceRegionInfosGetSamples { */ public final class NetAppResourceRegionInfosListSamples { /* - * x-ms-original-file: 2025-09-01/RegionInfos_List.json + * x-ms-original-file: 2025-09-01-preview/RegionInfos_List.json */ /** * Sample code: RegionInfos_List. @@ -1240,7 +3104,7 @@ public final class NetAppResourceRegionInfosListSamples { */ public final class NetAppResourceUsagesGetSamples { /* - * x-ms-original-file: 2025-09-01/Usages_Get.json + * x-ms-original-file: 2025-09-01-preview/Usages_Get.json */ /** * Sample code: Usages_Get. @@ -1262,7 +3126,7 @@ public final class NetAppResourceUsagesGetSamples { */ public final class NetAppResourceUsagesListSamples { /* - * x-ms-original-file: 2025-09-01/Usages_List.json + * x-ms-original-file: 2025-09-01-preview/Usages_List.json */ /** * Sample code: Usages_List. @@ -1283,7 +3147,7 @@ public final class NetAppResourceUsagesListSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: 2025-09-01/OperationList.json + * x-ms-original-file: 2025-09-01-preview/OperationList.json */ /** * Sample code: OperationList. @@ -1307,7 +3171,7 @@ import com.azure.resourcemanager.netapp.models.ServiceLevel; */ public final class PoolsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-01/Pools_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01-preview/Pools_CreateOrUpdate.json */ /** * Sample code: Pools_CreateOrUpdate. @@ -1326,7 +3190,7 @@ public final class PoolsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2025-09-01/Pools_CreateOrUpdate_CustomThroughput.json + * x-ms-original-file: 2025-09-01-preview/Pools_CreateOrUpdate_CustomThroughput.json */ /** * Sample code: Pools_CreateOrUpdate_CustomThroughput. @@ -1356,7 +3220,7 @@ public final class PoolsCreateOrUpdateSamples { */ public final class PoolsDeleteSamples { /* - * x-ms-original-file: 2025-09-01/Pools_Delete.json + * x-ms-original-file: 2025-09-01-preview/Pools_Delete.json */ /** * Sample code: Pools_Delete. @@ -1377,7 +3241,7 @@ public final class PoolsDeleteSamples { */ public final class PoolsGetSamples { /* - * x-ms-original-file: 2025-09-01/Pools_Get_CustomThroughput.json + * x-ms-original-file: 2025-09-01-preview/Pools_Get_CustomThroughput.json */ /** * Sample code: Pools_Get_CustomThroughput. @@ -1389,7 +3253,7 @@ public final class PoolsGetSamples { } /* - * x-ms-original-file: 2025-09-01/Pools_Get.json + * x-ms-original-file: 2025-09-01-preview/Pools_Get.json */ /** * Sample code: Pools_Get. @@ -1410,7 +3274,7 @@ public final class PoolsGetSamples { */ public final class PoolsListSamples { /* - * x-ms-original-file: 2025-09-01/Pools_List.json + * x-ms-original-file: 2025-09-01-preview/Pools_List.json */ /** * Sample code: Pools_List. @@ -1433,7 +3297,7 @@ import com.azure.resourcemanager.netapp.models.CapacityPool; */ public final class PoolsUpdateSamples { /* - * x-ms-original-file: 2025-09-01/Pools_Update.json + * x-ms-original-file: 2025-09-01-preview/Pools_Update.json */ /** * Sample code: Pools_Update. @@ -1447,7 +3311,7 @@ public final class PoolsUpdateSamples { } /* - * x-ms-original-file: 2025-09-01/Pools_Update_CustomThroughput.json + * x-ms-original-file: 2025-09-01-preview/Pools_Update_CustomThroughput.json */ /** * Sample code: Pools_Update_CustomThroughput. @@ -1463,6 +3327,79 @@ public final class PoolsUpdateSamples { } ``` +### RansomwareReports_ClearSuspects + +```java +import com.azure.resourcemanager.netapp.models.RansomwareSuspectResolution; +import com.azure.resourcemanager.netapp.models.RansomwareSuspectsClearRequest; +import java.util.Arrays; + +/** + * Samples for RansomwareReports ClearSuspects. + */ +public final class RansomwareReportsClearSuspectsSamples { + /* + * x-ms-original-file: 2025-09-01-preview/RansomwareReports_ClearSuspects.json + */ + /** + * Sample code: RansomwareReports_ClearSuspects. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void ransomwareReportsClearSuspects(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.ransomwareReports() + .clearSuspects("myRG", "account1", "pool1", "volume1", "ransomwareReport1", + new RansomwareSuspectsClearRequest().withResolution(RansomwareSuspectResolution.POTENTIAL_THREAT) + .withExtensions(Arrays.asList(".threat")), + com.azure.core.util.Context.NONE); + } +} +``` + +### RansomwareReports_Get + +```java +/** + * Samples for RansomwareReports Get. + */ +public final class RansomwareReportsGetSamples { + /* + * x-ms-original-file: 2025-09-01-preview/RansomwareReports_Get.json + */ + /** + * Sample code: RansomwareReports_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void ransomwareReportsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.ransomwareReports() + .getWithResponse("myRG", "account1", "pool1", "volume1", "ransomwareReport1", + com.azure.core.util.Context.NONE); + } +} +``` + +### RansomwareReports_List + +```java +/** + * Samples for RansomwareReports List. + */ +public final class RansomwareReportsListSamples { + /* + * x-ms-original-file: 2025-09-01-preview/RansomwareReports_List.json + */ + /** + * Sample code: RansomwareReports_List. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void ransomwareReportsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.ransomwareReports().list("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } +} +``` + ### SnapshotPolicies_Create ```java @@ -1476,7 +3413,7 @@ import com.azure.resourcemanager.netapp.models.WeeklySchedule; */ public final class SnapshotPoliciesCreateSamples { /* - * x-ms-original-file: 2025-09-01/SnapshotPolicies_Create.json + * x-ms-original-file: 2025-09-01-preview/SnapshotPolicies_Create.json */ /** * Sample code: SnapshotPolicies_Create. @@ -1508,7 +3445,7 @@ public final class SnapshotPoliciesCreateSamples { */ public final class SnapshotPoliciesDeleteSamples { /* - * x-ms-original-file: 2025-09-01/SnapshotPolicies_Delete.json + * x-ms-original-file: 2025-09-01-preview/SnapshotPolicies_Delete.json */ /** * Sample code: SnapshotPolicies_Delete. @@ -1530,7 +3467,7 @@ public final class SnapshotPoliciesDeleteSamples { */ public final class SnapshotPoliciesGetSamples { /* - * x-ms-original-file: 2025-09-01/SnapshotPolicies_Get.json + * x-ms-original-file: 2025-09-01-preview/SnapshotPolicies_Get.json */ /** * Sample code: SnapshotPolicies_Get. @@ -1552,7 +3489,7 @@ public final class SnapshotPoliciesGetSamples { */ public final class SnapshotPoliciesListSamples { /* - * x-ms-original-file: 2025-09-01/SnapshotPolicies_List.json + * x-ms-original-file: 2025-09-01-preview/SnapshotPolicies_List.json */ /** * Sample code: SnapshotPolicies_List. @@ -1573,7 +3510,7 @@ public final class SnapshotPoliciesListSamples { */ public final class SnapshotPoliciesListVolumesSamples { /* - * x-ms-original-file: 2025-09-01/SnapshotPolicies_ListVolumes.json + * x-ms-original-file: 2025-09-01-preview/SnapshotPolicies_ListVolumes.json */ /** * Sample code: SnapshotPolicies_ListVolumes. @@ -1601,7 +3538,7 @@ import com.azure.resourcemanager.netapp.models.WeeklySchedule; */ public final class SnapshotPoliciesUpdateSamples { /* - * x-ms-original-file: 2025-09-01/SnapshotPolicies_Update.json + * x-ms-original-file: 2025-09-01-preview/SnapshotPolicies_Update.json */ /** * Sample code: SnapshotPolicies_Update. @@ -1633,7 +3570,7 @@ public final class SnapshotPoliciesUpdateSamples { */ public final class SnapshotsCreateSamples { /* - * x-ms-original-file: 2025-09-01/Snapshots_Create.json + * x-ms-original-file: 2025-09-01-preview/Snapshots_Create.json */ /** * Sample code: Snapshots_Create. @@ -1658,7 +3595,7 @@ public final class SnapshotsCreateSamples { */ public final class SnapshotsDeleteSamples { /* - * x-ms-original-file: 2025-09-01/Snapshots_Delete.json + * x-ms-original-file: 2025-09-01-preview/Snapshots_Delete.json */ /** * Sample code: Snapshots_Delete. @@ -1680,7 +3617,7 @@ public final class SnapshotsDeleteSamples { */ public final class SnapshotsGetSamples { /* - * x-ms-original-file: 2025-09-01/Snapshots_Get.json + * x-ms-original-file: 2025-09-01-preview/Snapshots_Get.json */ /** * Sample code: Snapshots_Get. @@ -1702,7 +3639,7 @@ public final class SnapshotsGetSamples { */ public final class SnapshotsListSamples { /* - * x-ms-original-file: 2025-09-01/Snapshots_List.json + * x-ms-original-file: 2025-09-01-preview/Snapshots_List.json */ /** * Sample code: Snapshots_List. @@ -1726,7 +3663,7 @@ import java.util.Arrays; */ public final class SnapshotsRestoreFilesSamples { /* - * x-ms-original-file: 2025-09-01/Snapshots_SingleFileRestore.json + * x-ms-original-file: 2025-09-01-preview/Snapshots_SingleFileRestore.json */ /** * Sample code: Snapshots_SingleFileRestore. @@ -1750,7 +3687,7 @@ public final class SnapshotsRestoreFilesSamples { */ public final class SubvolumesCreateSamples { /* - * x-ms-original-file: 2025-09-01/Subvolumes_Create.json + * x-ms-original-file: 2025-09-01-preview/Subvolumes_Create.json */ /** * Sample code: Subvolumes_Create. @@ -1775,7 +3712,7 @@ public final class SubvolumesCreateSamples { */ public final class SubvolumesDeleteSamples { /* - * x-ms-original-file: 2025-09-01/Subvolumes_Delete.json + * x-ms-original-file: 2025-09-01-preview/Subvolumes_Delete.json */ /** * Sample code: Subvolumes_Delete. @@ -1797,7 +3734,7 @@ public final class SubvolumesDeleteSamples { */ public final class SubvolumesGetSamples { /* - * x-ms-original-file: 2025-09-01/Subvolumes_Get.json + * x-ms-original-file: 2025-09-01-preview/Subvolumes_Get.json */ /** * Sample code: Subvolumes_Get. @@ -1819,7 +3756,7 @@ public final class SubvolumesGetSamples { */ public final class SubvolumesGetMetadataSamples { /* - * x-ms-original-file: 2025-09-01/Subvolumes_Metadata.json + * x-ms-original-file: 2025-09-01-preview/Subvolumes_Metadata.json */ /** * Sample code: Subvolumes_Metadata. @@ -1841,7 +3778,7 @@ public final class SubvolumesGetMetadataSamples { */ public final class SubvolumesListByVolumeSamples { /* - * x-ms-original-file: 2025-09-01/Subvolumes_List.json + * x-ms-original-file: 2025-09-01-preview/Subvolumes_List.json */ /** * Sample code: Subvolumes_List. @@ -1864,7 +3801,7 @@ import com.azure.resourcemanager.netapp.models.SubvolumeInfo; */ public final class SubvolumesUpdateSamples { /* - * x-ms-original-file: 2025-09-01/Subvolumes_Update.json + * x-ms-original-file: 2025-09-01-preview/Subvolumes_Update.json */ /** * Sample code: Subvolumes_Update. @@ -1896,7 +3833,7 @@ import java.util.Arrays; */ public final class VolumeGroupsCreateSamples { /* - * x-ms-original-file: 2025-09-01/VolumeGroups_Create_SapHana.json + * x-ms-original-file: 2025-09-01-preview/VolumeGroups_Create_SapHana.json */ /** * Sample code: VolumeGroups_Create_SapHana. @@ -2056,7 +3993,7 @@ public final class VolumeGroupsCreateSamples { } /* - * x-ms-original-file: 2025-09-01/VolumeGroups_Create_Oracle.json + * x-ms-original-file: 2025-09-01-preview/VolumeGroups_Create_Oracle.json */ /** * Sample code: VolumeGroups_Create_Oracle. @@ -2409,7 +4346,7 @@ public final class VolumeGroupsCreateSamples { */ public final class VolumeGroupsDeleteSamples { /* - * x-ms-original-file: 2025-09-01/VolumeGroups_Delete.json + * x-ms-original-file: 2025-09-01-preview/VolumeGroups_Delete.json */ /** * Sample code: VolumeGroups_Delete. @@ -2430,7 +4367,7 @@ public final class VolumeGroupsDeleteSamples { */ public final class VolumeGroupsGetSamples { /* - * x-ms-original-file: 2025-09-01/VolumeGroups_Get_SapHana.json + * x-ms-original-file: 2025-09-01-preview/VolumeGroups_Get_SapHana.json */ /** * Sample code: VolumeGroups_Get_SapHana. @@ -2442,7 +4379,7 @@ public final class VolumeGroupsGetSamples { } /* - * x-ms-original-file: 2025-09-01/VolumeGroups_Get_Oracle.json + * x-ms-original-file: 2025-09-01-preview/VolumeGroups_Get_Oracle.json */ /** * Sample code: VolumeGroups_Get_Oracle. @@ -2463,7 +4400,7 @@ public final class VolumeGroupsGetSamples { */ public final class VolumeGroupsListByNetAppAccountSamples { /* - * x-ms-original-file: 2025-09-01/VolumeGroups_List_Oracle.json + * x-ms-original-file: 2025-09-01-preview/VolumeGroups_List_Oracle.json */ /** * Sample code: VolumeGroups_List_Oracle. @@ -2475,7 +4412,7 @@ public final class VolumeGroupsListByNetAppAccountSamples { } /* - * x-ms-original-file: 2025-09-01/VolumeGroups_List_SapHana.json + * x-ms-original-file: 2025-09-01-preview/VolumeGroups_List_SapHana.json */ /** * Sample code: VolumeGroups_List_SapHana. @@ -2498,7 +4435,7 @@ import com.azure.resourcemanager.netapp.models.Type; */ public final class VolumeQuotaRulesCreateSamples { /* - * x-ms-original-file: 2025-09-01/VolumeQuotaRules_Create.json + * x-ms-original-file: 2025-09-01-preview/VolumeQuotaRules_Create.json */ /** * Sample code: VolumeQuotaRules_Create. @@ -2526,7 +4463,7 @@ public final class VolumeQuotaRulesCreateSamples { */ public final class VolumeQuotaRulesDeleteSamples { /* - * x-ms-original-file: 2025-09-01/VolumeQuotaRules_Delete.json + * x-ms-original-file: 2025-09-01-preview/VolumeQuotaRules_Delete.json */ /** * Sample code: VolumeQuotaRules_Delete. @@ -2548,7 +4485,7 @@ public final class VolumeQuotaRulesDeleteSamples { */ public final class VolumeQuotaRulesGetSamples { /* - * x-ms-original-file: 2025-09-01/VolumeQuotaRules_Get.json + * x-ms-original-file: 2025-09-01-preview/VolumeQuotaRules_Get.json */ /** * Sample code: VolumeQuotaRules_Get. @@ -2571,7 +4508,7 @@ public final class VolumeQuotaRulesGetSamples { */ public final class VolumeQuotaRulesListByVolumeSamples { /* - * x-ms-original-file: 2025-09-01/VolumeQuotaRules_List.json + * x-ms-original-file: 2025-09-01-preview/VolumeQuotaRules_List.json */ /** * Sample code: VolumeQuotaRules_List. @@ -2595,7 +4532,7 @@ import com.azure.resourcemanager.netapp.models.VolumeQuotaRule; */ public final class VolumeQuotaRulesUpdateSamples { /* - * x-ms-original-file: 2025-09-01/VolumeQuotaRules_Update.json + * x-ms-original-file: 2025-09-01-preview/VolumeQuotaRules_Update.json */ /** * Sample code: VolumeQuotaRules_Update. @@ -2620,7 +4557,7 @@ public final class VolumeQuotaRulesUpdateSamples { */ public final class VolumesAuthorizeExternalReplicationSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_AuthorizeExternalReplication.json + * x-ms-original-file: 2025-09-01-preview/Volumes_AuthorizeExternalReplication.json */ /** * Sample code: Volumes_AuthorizeExternalReplication. @@ -2645,7 +4582,7 @@ import com.azure.resourcemanager.netapp.models.AuthorizeRequest; */ public final class VolumesAuthorizeReplicationSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_AuthorizeReplication.json + * x-ms-original-file: 2025-09-01-preview/Volumes_AuthorizeReplication.json */ /** * Sample code: Volumes_AuthorizeReplication. @@ -2672,7 +4609,7 @@ import com.azure.resourcemanager.netapp.models.BreakFileLocksRequest; */ public final class VolumesBreakFileLocksSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_BreakFileLocks.json + * x-ms-original-file: 2025-09-01-preview/Volumes_BreakFileLocks.json */ /** * Sample code: Volumes_BreakFileLocks. @@ -2698,7 +4635,7 @@ import com.azure.resourcemanager.netapp.models.BreakReplicationRequest; */ public final class VolumesBreakReplicationSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_BreakReplication.json + * x-ms-original-file: 2025-09-01-preview/Volumes_BreakReplication.json */ /** * Sample code: Volumes_BreakReplication. @@ -2723,7 +4660,7 @@ import com.azure.resourcemanager.netapp.models.ServiceLevel; */ public final class VolumesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01-preview/Volumes_CreateOrUpdate.json */ /** * Sample code: Volumes_CreateOrUpdate. @@ -2738,7 +4675,7 @@ public final class VolumesCreateOrUpdateSamples { .withCreationToken("my-unique-file-path") .withUsageThreshold(107374182400L) .withSubnetId( - "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") .withServiceLevel(ServiceLevel.PREMIUM) .create(); } @@ -2753,7 +4690,7 @@ public final class VolumesCreateOrUpdateSamples { */ public final class VolumesDeleteSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_Delete.json + * x-ms-original-file: 2025-09-01-preview/Volumes_Delete.json */ /** * Sample code: Volumes_Delete. @@ -2774,7 +4711,7 @@ public final class VolumesDeleteSamples { */ public final class VolumesDeleteReplicationSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_DeleteReplication.json + * x-ms-original-file: 2025-09-01-preview/Volumes_DeleteReplication.json */ /** * Sample code: Volumes_DeleteReplication. @@ -2795,7 +4732,7 @@ public final class VolumesDeleteReplicationSamples { */ public final class VolumesFinalizeExternalReplicationSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_FinalizeExternalReplication.json + * x-ms-original-file: 2025-09-01-preview/Volumes_FinalizeExternalReplication.json */ /** * Sample code: Volumes_FinalizeExternalReplication. @@ -2817,7 +4754,7 @@ public final class VolumesFinalizeExternalReplicationSamples { */ public final class VolumesFinalizeRelocationSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_FinalizeRelocation.json + * x-ms-original-file: 2025-09-01-preview/Volumes_FinalizeRelocation.json */ /** * Sample code: Volumes_FinalizeRelocation. @@ -2838,7 +4775,19 @@ public final class VolumesFinalizeRelocationSamples { */ public final class VolumesGetSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_Get.json + * x-ms-original-file: 2025-09-01-preview/Volumes_ExtraLargeVolumes_Get.json + */ + /** + * Sample code: Volumes_ExtralargeVolumeGet. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesExtralargeVolumeGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes().getWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01-preview/Volumes_Get.json */ /** * Sample code: Volumes_Get. @@ -2859,7 +4808,19 @@ public final class VolumesGetSamples { */ public final class VolumesListSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_List.json + * x-ms-original-file: 2025-09-01-preview/Volumes_ExtraLargeVolumes_List.json + */ + /** + * Sample code: Volumes_ExtralargeVolumeList. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesExtralargeVolumeList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes().list("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01-preview/Volumes_List.json */ /** * Sample code: Volumes_List. @@ -2882,7 +4843,7 @@ import com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserRequest; */ public final class VolumesListGetGroupIdListForLdapUserSamples { /* - * x-ms-original-file: 2025-09-01/GroupIdListForLDAPUser.json + * x-ms-original-file: 2025-09-01-preview/GroupIdListForLDAPUser.json */ /** * Sample code: GetGroupIdListForUser. @@ -2897,6 +4858,27 @@ public final class VolumesListGetGroupIdListForLdapUserSamples { } ``` +### Volumes_ListQuotaReport + +```java +/** + * Samples for Volumes ListQuotaReport. + */ +public final class VolumesListQuotaReportSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Volumes_ListQuotaReport.json + */ + /** + * Sample code: ListQuotaReport. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void listQuotaReport(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes().listQuotaReport("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } +} +``` + ### Volumes_ListReplications ```java @@ -2908,7 +4890,7 @@ import com.azure.resourcemanager.netapp.models.ListReplicationsRequest; */ public final class VolumesListReplicationsSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_ListReplications.json + * x-ms-original-file: 2025-09-01-preview/Volumes_ListReplications.json */ /** * Sample code: Volumes_ListReplications. @@ -2934,7 +4916,7 @@ import java.util.Arrays; */ public final class VolumesPeerExternalClusterSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_PeerExternalCluster.json + * x-ms-original-file: 2025-09-01-preview/Volumes_PeerExternalCluster.json */ /** * Sample code: Volumes_PeerExternalCluster. @@ -2959,7 +4941,7 @@ public final class VolumesPeerExternalClusterSamples { */ public final class VolumesPerformReplicationTransferSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_PerformReplicationTransfer.json + * x-ms-original-file: 2025-09-01-preview/Volumes_PerformReplicationTransfer.json */ /** * Sample code: Volumes_PerformReplicationTransfer. @@ -2983,7 +4965,7 @@ import com.azure.resourcemanager.netapp.models.PoolChangeRequest; */ public final class VolumesPoolChangeSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_PoolChange.json + * x-ms-original-file: 2025-09-01-preview/Volumes_PoolChange.json */ /** * Sample code: Volumes_AuthorizeReplication. @@ -3007,7 +4989,7 @@ public final class VolumesPoolChangeSamples { */ public final class VolumesPopulateAvailabilityZoneSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_PopulateAvailabilityZones.json + * x-ms-original-file: 2025-09-01-preview/Volumes_PopulateAvailabilityZones.json */ /** * Sample code: Volumes_PopulateAvailabilityZones. @@ -3029,7 +5011,7 @@ public final class VolumesPopulateAvailabilityZoneSamples { */ public final class VolumesReInitializeReplicationSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_ReInitializeReplication.json + * x-ms-original-file: 2025-09-01-preview/Volumes_ReInitializeReplication.json */ /** * Sample code: Volumes_ReInitializeReplication. @@ -3053,7 +5035,7 @@ import com.azure.resourcemanager.netapp.models.ReestablishReplicationRequest; */ public final class VolumesReestablishReplicationSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_ReestablishReplication.json + * x-ms-original-file: 2025-09-01-preview/Volumes_ReestablishReplication.json */ /** * Sample code: Volumes_ReestablishReplication. @@ -3080,7 +5062,7 @@ import com.azure.resourcemanager.netapp.models.RelocateVolumeRequest; */ public final class VolumesRelocateSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_Relocate.json + * x-ms-original-file: 2025-09-01-preview/Volumes_Relocate.json */ /** * Sample code: Volumes_Relocate. @@ -3103,7 +5085,7 @@ public final class VolumesRelocateSamples { */ public final class VolumesReplicationStatusSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_ReplicationStatus.json + * x-ms-original-file: 2025-09-01-preview/Volumes_ReplicationStatus.json */ /** * Sample code: Volumes_ReplicationStatus. @@ -3125,7 +5107,7 @@ public final class VolumesReplicationStatusSamples { */ public final class VolumesResetCifsPasswordSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_ResetCifsPassword.json + * x-ms-original-file: 2025-09-01-preview/Volumes_ResetCifsPassword.json */ /** * Sample code: Volumes_ResetCifsPassword. @@ -3146,7 +5128,7 @@ public final class VolumesResetCifsPasswordSamples { */ public final class VolumesResyncReplicationSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_ResyncReplication.json + * x-ms-original-file: 2025-09-01-preview/Volumes_ResyncReplication.json */ /** * Sample code: Volumes_ResyncReplication. @@ -3169,7 +5151,7 @@ import com.azure.resourcemanager.netapp.models.VolumeRevert; */ public final class VolumesRevertSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_Revert.json + * x-ms-original-file: 2025-09-01-preview/Volumes_Revert.json */ /** * Sample code: Volumes_Revert. @@ -3193,7 +5175,7 @@ public final class VolumesRevertSamples { */ public final class VolumesRevertRelocationSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_RevertRelocation.json + * x-ms-original-file: 2025-09-01-preview/Volumes_RevertRelocation.json */ /** * Sample code: Volumes_RevertRelocation. @@ -3214,7 +5196,7 @@ public final class VolumesRevertRelocationSamples { */ public final class VolumesSplitCloneFromParentSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_SplitClone.json + * x-ms-original-file: 2025-09-01-preview/Volumes_SplitClone.json */ /** * Sample code: Volumes_SplitClone. @@ -3238,7 +5220,7 @@ import com.azure.resourcemanager.netapp.models.Volume; */ public final class VolumesUpdateSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_Update.json + * x-ms-original-file: 2025-09-01-preview/Volumes_Update.json */ /** * Sample code: Volumes_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/pom.xml b/sdk/netapp/azure-resourcemanager-netapp/pom.xml index 004fd9aa4790..fbc8f73dfe8e 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 2025-09-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 2025-09-01-preview. https://github.com/Azure/azure-sdk-for-java @@ -45,6 +45,7 @@ UTF-8 0 0 + true diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java index 75a5d99763eb..c9dd2c1cdbd6 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java @@ -26,12 +26,23 @@ 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; import com.azure.resourcemanager.netapp.implementation.BackupsUnderAccountsImpl; import com.azure.resourcemanager.netapp.implementation.BackupsUnderBackupVaultsImpl; import com.azure.resourcemanager.netapp.implementation.BackupsUnderVolumesImpl; +import com.azure.resourcemanager.netapp.implementation.BucketsImpl; +import com.azure.resourcemanager.netapp.implementation.CachesImpl; +import com.azure.resourcemanager.netapp.implementation.ElasticAccountsImpl; +import com.azure.resourcemanager.netapp.implementation.ElasticBackupPoliciesImpl; +import com.azure.resourcemanager.netapp.implementation.ElasticBackupVaultsImpl; +import com.azure.resourcemanager.netapp.implementation.ElasticBackupsImpl; +import com.azure.resourcemanager.netapp.implementation.ElasticCapacityPoolsImpl; +import com.azure.resourcemanager.netapp.implementation.ElasticSnapshotPoliciesImpl; +import com.azure.resourcemanager.netapp.implementation.ElasticSnapshotsImpl; +import com.azure.resourcemanager.netapp.implementation.ElasticVolumesImpl; import com.azure.resourcemanager.netapp.implementation.NetAppManagementClientBuilder; import com.azure.resourcemanager.netapp.implementation.NetAppResourceQuotaLimitsAccountsImpl; import com.azure.resourcemanager.netapp.implementation.NetAppResourceQuotaLimitsImpl; @@ -40,6 +51,7 @@ import com.azure.resourcemanager.netapp.implementation.NetAppResourcesImpl; import com.azure.resourcemanager.netapp.implementation.OperationsImpl; import com.azure.resourcemanager.netapp.implementation.PoolsImpl; +import com.azure.resourcemanager.netapp.implementation.RansomwareReportsImpl; import com.azure.resourcemanager.netapp.implementation.SnapshotPoliciesImpl; import com.azure.resourcemanager.netapp.implementation.SnapshotsImpl; import com.azure.resourcemanager.netapp.implementation.SubvolumesImpl; @@ -47,12 +59,23 @@ 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; import com.azure.resourcemanager.netapp.models.BackupsUnderAccounts; import com.azure.resourcemanager.netapp.models.BackupsUnderBackupVaults; import com.azure.resourcemanager.netapp.models.BackupsUnderVolumes; +import com.azure.resourcemanager.netapp.models.Buckets; +import com.azure.resourcemanager.netapp.models.Caches; +import com.azure.resourcemanager.netapp.models.ElasticAccounts; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicies; +import com.azure.resourcemanager.netapp.models.ElasticBackupVaults; +import com.azure.resourcemanager.netapp.models.ElasticBackups; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPools; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicies; +import com.azure.resourcemanager.netapp.models.ElasticSnapshots; +import com.azure.resourcemanager.netapp.models.ElasticVolumes; import com.azure.resourcemanager.netapp.models.NetAppResourceQuotaLimits; import com.azure.resourcemanager.netapp.models.NetAppResourceQuotaLimitsAccounts; import com.azure.resourcemanager.netapp.models.NetAppResourceRegionInfos; @@ -60,6 +83,7 @@ import com.azure.resourcemanager.netapp.models.NetAppResources; import com.azure.resourcemanager.netapp.models.Operations; import com.azure.resourcemanager.netapp.models.Pools; +import com.azure.resourcemanager.netapp.models.RansomwareReports; import com.azure.resourcemanager.netapp.models.SnapshotPolicies; import com.azure.resourcemanager.netapp.models.Snapshots; import com.azure.resourcemanager.netapp.models.Subvolumes; @@ -97,8 +121,32 @@ public final class NetAppFilesManager { private VolumeQuotaRules volumeQuotaRules; + private RansomwareReports ransomwareReports; + private BackupVaults backupVaults; + private Buckets buckets; + + private Caches caches; + + private ElasticAccounts elasticAccounts; + + private ElasticCapacityPools elasticCapacityPools; + + private ElasticVolumes elasticVolumes; + + private ElasticSnapshots elasticSnapshots; + + private ElasticSnapshotPolicies elasticSnapshotPolicies; + + private ElasticBackupVaults elasticBackupVaults; + + private ElasticBackupPolicies elasticBackupPolicies; + + private ElasticBackups elasticBackups; + + private ActiveDirectoryConfigs activeDirectoryConfigs; + private NetAppResourceQuotaLimits netAppResourceQuotaLimits; private NetAppResourceRegionInfos netAppResourceRegionInfos; @@ -443,6 +491,18 @@ public VolumeQuotaRules volumeQuotaRules() { return volumeQuotaRules; } + /** + * Gets the resource collection API of RansomwareReports. + * + * @return Resource collection API of RansomwareReports. + */ + public RansomwareReports ransomwareReports() { + if (this.ransomwareReports == null) { + this.ransomwareReports = new RansomwareReportsImpl(clientObject.getRansomwareReports(), this); + } + return ransomwareReports; + } + /** * Gets the resource collection API of BackupVaults. It manages BackupVault. * @@ -455,6 +515,140 @@ public BackupVaults backupVaults() { return backupVaults; } + /** + * Gets the resource collection API of Buckets. It manages Bucket. + * + * @return Resource collection API of Buckets. + */ + public Buckets buckets() { + if (this.buckets == null) { + this.buckets = new BucketsImpl(clientObject.getBuckets(), this); + } + return buckets; + } + + /** + * Gets the resource collection API of Caches. It manages Cache. + * + * @return Resource collection API of Caches. + */ + public Caches caches() { + if (this.caches == null) { + this.caches = new CachesImpl(clientObject.getCaches(), this); + } + return caches; + } + + /** + * Gets the resource collection API of ElasticAccounts. It manages ElasticAccount. + * + * @return Resource collection API of ElasticAccounts. + */ + public ElasticAccounts elasticAccounts() { + if (this.elasticAccounts == null) { + this.elasticAccounts = new ElasticAccountsImpl(clientObject.getElasticAccounts(), this); + } + return elasticAccounts; + } + + /** + * Gets the resource collection API of ElasticCapacityPools. It manages ElasticCapacityPool. + * + * @return Resource collection API of ElasticCapacityPools. + */ + public ElasticCapacityPools elasticCapacityPools() { + if (this.elasticCapacityPools == null) { + this.elasticCapacityPools = new ElasticCapacityPoolsImpl(clientObject.getElasticCapacityPools(), this); + } + return elasticCapacityPools; + } + + /** + * Gets the resource collection API of ElasticVolumes. It manages ElasticVolume. + * + * @return Resource collection API of ElasticVolumes. + */ + public ElasticVolumes elasticVolumes() { + if (this.elasticVolumes == null) { + this.elasticVolumes = new ElasticVolumesImpl(clientObject.getElasticVolumes(), this); + } + return elasticVolumes; + } + + /** + * Gets the resource collection API of ElasticSnapshots. It manages ElasticSnapshot. + * + * @return Resource collection API of ElasticSnapshots. + */ + public ElasticSnapshots elasticSnapshots() { + if (this.elasticSnapshots == null) { + this.elasticSnapshots = new ElasticSnapshotsImpl(clientObject.getElasticSnapshots(), this); + } + return elasticSnapshots; + } + + /** + * Gets the resource collection API of ElasticSnapshotPolicies. It manages ElasticSnapshotPolicy. + * + * @return Resource collection API of ElasticSnapshotPolicies. + */ + public ElasticSnapshotPolicies elasticSnapshotPolicies() { + if (this.elasticSnapshotPolicies == null) { + this.elasticSnapshotPolicies + = new ElasticSnapshotPoliciesImpl(clientObject.getElasticSnapshotPolicies(), this); + } + return elasticSnapshotPolicies; + } + + /** + * Gets the resource collection API of ElasticBackupVaults. It manages ElasticBackupVault. + * + * @return Resource collection API of ElasticBackupVaults. + */ + public ElasticBackupVaults elasticBackupVaults() { + if (this.elasticBackupVaults == null) { + this.elasticBackupVaults = new ElasticBackupVaultsImpl(clientObject.getElasticBackupVaults(), this); + } + return elasticBackupVaults; + } + + /** + * Gets the resource collection API of ElasticBackupPolicies. It manages ElasticBackupPolicy. + * + * @return Resource collection API of ElasticBackupPolicies. + */ + public ElasticBackupPolicies elasticBackupPolicies() { + if (this.elasticBackupPolicies == null) { + this.elasticBackupPolicies = new ElasticBackupPoliciesImpl(clientObject.getElasticBackupPolicies(), this); + } + return elasticBackupPolicies; + } + + /** + * Gets the resource collection API of ElasticBackups. It manages ElasticBackup. + * + * @return Resource collection API of ElasticBackups. + */ + public ElasticBackups elasticBackups() { + if (this.elasticBackups == null) { + this.elasticBackups = new ElasticBackupsImpl(clientObject.getElasticBackups(), this); + } + return elasticBackups; + } + + /** + * Gets the resource collection API of ActiveDirectoryConfigs. It manages ActiveDirectoryConfig. + * + * @return Resource collection API of ActiveDirectoryConfigs. + */ + public ActiveDirectoryConfigs activeDirectoryConfigs() { + if (this.activeDirectoryConfigs == null) { + this.activeDirectoryConfigs + = new ActiveDirectoryConfigsImpl(clientObject.getActiveDirectoryConfigs(), this); + } + return activeDirectoryConfigs; + } + /** * Gets the resource collection API of NetAppResourceQuotaLimits. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ActiveDirectoryConfigsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ActiveDirectoryConfigsClient.java new file mode 100644 index 000000000000..ab9def2b0953 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ActiveDirectoryConfigsClient.java @@ -0,0 +1,272 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.fluent.models.ActiveDirectoryConfigInner; +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigUpdate; + +/** + * An instance of this class provides access to all the operations defined in ActiveDirectoryConfigsClient. + */ +public interface ActiveDirectoryConfigsClient { + /** + * Get the details of the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified active directory configuration along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String activeDirectoryConfigName, Context context); + + /** + * Get the details of the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified active directory configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ActiveDirectoryConfigInner getByResourceGroup(String resourceGroupName, String activeDirectoryConfigName); + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ActiveDirectoryConfigInner> beginCreateOrUpdate( + String resourceGroupName, String activeDirectoryConfigName, ActiveDirectoryConfigInner body); + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ActiveDirectoryConfigInner> beginCreateOrUpdate( + String resourceGroupName, String activeDirectoryConfigName, ActiveDirectoryConfigInner body, Context context); + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ActiveDirectoryConfigInner createOrUpdate(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigInner body); + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ActiveDirectoryConfigInner createOrUpdate(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigInner body, Context context); + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ActiveDirectoryConfigInner> beginUpdate(String resourceGroupName, + String activeDirectoryConfigName, ActiveDirectoryConfigUpdate body); + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ActiveDirectoryConfigInner> beginUpdate(String resourceGroupName, + String activeDirectoryConfigName, ActiveDirectoryConfigUpdate body, Context context); + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ActiveDirectoryConfigInner update(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigUpdate body); + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ActiveDirectoryConfigInner update(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigUpdate body, Context context); + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String activeDirectoryConfigName); + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String activeDirectoryConfigName, + Context context); + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String activeDirectoryConfigName); + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String activeDirectoryConfigName, Context context); + + /** + * List all active directory configurations within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List all active directory configurations within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List all active directory configurations within the subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List all active directory configurations within the subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BucketsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BucketsClient.java new file mode 100644 index 000000000000..a604c10979b3 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/BucketsClient.java @@ -0,0 +1,360 @@ +// Copyright (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.BucketGenerateCredentialsInner; +import com.azure.resourcemanager.netapp.fluent.models.BucketInner; +import com.azure.resourcemanager.netapp.models.BucketCredentialsExpiry; +import com.azure.resourcemanager.netapp.models.BucketPatch; + +/** + * An instance of this class provides access to all the operations defined in BucketsClient. + */ +public interface BucketsClient { + /** + * Get the details of the specified volume's bucket. A bucket allows additional services, such as AI services, + * connect to the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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's bucket along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String bucketName, Context context); + + /** + * Get the details of the specified volume's bucket. A bucket allows additional services, such as AI services, + * connect to the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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's bucket. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BucketInner get(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName); + + /** + * Creates or updates a bucket for a volume. A bucket allows additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of bucket resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, BucketInner> beginCreateOrUpdate(String resourceGroupName, String accountName, + String poolName, String volumeName, String bucketName, BucketInner body); + + /** + * Creates or updates a bucket for a volume. A bucket allows additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of bucket resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, BucketInner> beginCreateOrUpdate(String resourceGroupName, String accountName, + String poolName, String volumeName, String bucketName, BucketInner body, Context context); + + /** + * Creates or updates a bucket for a volume. A bucket allows additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BucketInner createOrUpdate(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName, BucketInner body); + + /** + * Creates or updates a bucket for a volume. A bucket allows additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BucketInner createOrUpdate(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName, BucketInner body, Context context); + + /** + * Updates the details of a volume bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of bucket resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, BucketInner> beginUpdate(String resourceGroupName, String accountName, + String poolName, String volumeName, String bucketName, BucketPatch body); + + /** + * Updates the details of a volume bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of bucket resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, BucketInner> beginUpdate(String resourceGroupName, String accountName, + String poolName, String volumeName, String bucketName, BucketPatch body, Context context); + + /** + * Updates the details of a volume bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BucketInner update(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName, BucketPatch body); + + /** + * Updates the details of a volume bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BucketInner update(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName, BucketPatch body, Context context); + + /** + * Delete a volume's bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 bucketName); + + /** + * Delete a volume's bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 bucketName, Context context); + + /** + * Delete a volume's bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 bucketName); + + /** + * Delete a volume's bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 bucketName, + Context context); + + /** + * Describes all buckets belonging to a volume. Buckets allow additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of volume bucket resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * Describes all buckets belonging to a volume. Buckets allow additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of volume bucket resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String accountName, String poolName, String volumeName, + Context context); + + /** + * Generate the access key and secret key used for accessing the specified volume bucket. Also return expiry date + * and time of key pair (in UTC). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket's Access and Secret key pair expiry time expressed as the number of days from now. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket Access Key, Secret Key, and Expiry date and time of the key pair along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response generateCredentialsWithResponse(String resourceGroupName, + String accountName, String poolName, String volumeName, String bucketName, BucketCredentialsExpiry body, + Context context); + + /** + * Generate the access key and secret key used for accessing the specified volume bucket. Also return expiry date + * and time of key pair (in UTC). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket's Access and Secret key pair expiry time expressed as the number of days from now. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket Access Key, Secret Key, and Expiry date and time of the key pair. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BucketGenerateCredentialsInner generateCredentials(String resourceGroupName, String accountName, String poolName, + String volumeName, String bucketName, BucketCredentialsExpiry body); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/CachesClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/CachesClient.java new file mode 100644 index 000000000000..3b9f98aa04e7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/CachesClient.java @@ -0,0 +1,390 @@ +// Copyright (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.CacheInner; +import com.azure.resourcemanager.netapp.fluent.models.PeeringPassphrasesInner; +import com.azure.resourcemanager.netapp.models.CacheUpdate; +import com.azure.resourcemanager.netapp.models.PoolChangeRequest; + +/** + * An instance of this class provides access to all the operations defined in CachesClient. + */ +public interface CachesClient { + /** + * Get the details of the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 Cache along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String accountName, String poolName, + String cacheName, Context context); + + /** + * Get the details of the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 Cache. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CacheInner get(String resourceGroupName, String accountName, String poolName, String cacheName); + + /** + * Create or update the specified Cache within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @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 cache resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CacheInner> beginCreateOrUpdate(String resourceGroupName, String accountName, + String poolName, String cacheName, CacheInner body); + + /** + * Create or update the specified Cache within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @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 cache resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CacheInner> beginCreateOrUpdate(String resourceGroupName, String accountName, + String poolName, String cacheName, CacheInner body, Context context); + + /** + * Create or update the specified Cache within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @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 cache resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CacheInner createOrUpdate(String resourceGroupName, String accountName, String poolName, String cacheName, + CacheInner body); + + /** + * Create or update the specified Cache within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @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 cache resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CacheInner createOrUpdate(String resourceGroupName, String accountName, String poolName, String cacheName, + CacheInner body, Context context); + + /** + * Patch the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @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 cache resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CacheInner> beginUpdate(String resourceGroupName, String accountName, + String poolName, String cacheName, CacheUpdate body); + + /** + * Patch the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @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 cache resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CacheInner> beginUpdate(String resourceGroupName, String accountName, + String poolName, String cacheName, CacheUpdate body, Context context); + + /** + * Patch the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @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 cache resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CacheInner update(String resourceGroupName, String accountName, String poolName, String cacheName, + CacheUpdate body); + + /** + * Patch the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @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 cache resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CacheInner update(String resourceGroupName, String accountName, String poolName, String cacheName, CacheUpdate body, + Context context); + + /** + * Delete the specified cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 cacheName); + + /** + * Delete the specified cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 cacheName, Context context); + + /** + * Delete the specified cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 cacheName); + + /** + * Delete the specified cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 cacheName, Context context); + + /** + * List all Caches within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 Cache resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCapacityPools(String resourceGroupName, String accountName, String poolName); + + /** + * List all Caches within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 Cache resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCapacityPools(String resourceGroupName, String accountName, String poolName, + Context context); + + /** + * This operation will list the cluster peering command, cluster peering passphrase and the vserver peering command. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response containing peering passphrases and commands for cluster and vserver peering along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listPeeringPassphrasesWithResponse(String resourceGroupName, String accountName, + String poolName, String cacheName, Context context); + + /** + * This operation will list the cluster peering command, cluster peering passphrase and the vserver peering command. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response containing peering passphrases and commands for cluster and vserver peering. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PeeringPassphrasesInner listPeeringPassphrases(String resourceGroupName, String accountName, String poolName, + String cacheName); + + /** + * Moves Cache to another Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body Move cache to the pool supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CacheInner> beginPoolChange(String resourceGroupName, String accountName, + String poolName, String cacheName, PoolChangeRequest body); + + /** + * Moves Cache to another Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body Move cache to the pool supplied in the body of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CacheInner> beginPoolChange(String resourceGroupName, String accountName, + String poolName, String cacheName, PoolChangeRequest body, Context context); + + /** + * Moves Cache to another Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body Move cache to the pool supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CacheInner poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, + PoolChangeRequest body); + + /** + * Moves Cache to another Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body Move cache to the pool supplied in the body of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CacheInner poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, + PoolChangeRequest body, Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticAccountsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticAccountsClient.java new file mode 100644 index 000000000000..1b42177183db --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticAccountsClient.java @@ -0,0 +1,269 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.fluent.models.ElasticAccountInner; +import com.azure.resourcemanager.netapp.models.ElasticAccountUpdate; + +/** + * An instance of this class provides access to all the operations defined in ElasticAccountsClient. + */ +public interface ElasticAccountsClient { + /** + * Get the NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Account along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String accountName, + Context context); + + /** + * Get the NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticAccountInner getByResourceGroup(String resourceGroupName, String accountName); + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticAccountInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, ElasticAccountInner body); + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticAccountInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, ElasticAccountInner body, Context context); + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticAccountInner createOrUpdate(String resourceGroupName, String accountName, ElasticAccountInner body); + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticAccountInner createOrUpdate(String resourceGroupName, String accountName, ElasticAccountInner body, + Context context); + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticAccountInner> beginUpdate(String resourceGroupName, + String accountName, ElasticAccountUpdate body); + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticAccountInner> beginUpdate(String resourceGroupName, + String accountName, ElasticAccountUpdate body, Context context); + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticAccountInner update(String resourceGroupName, String accountName, ElasticAccountUpdate body); + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticAccountInner update(String resourceGroupName, String accountName, ElasticAccountUpdate body, + Context context); + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String accountName); + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, Context context); + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName); + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, Context context); + + /** + * List and describe all NetApp elastic accounts in the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List and describe all NetApp elastic accounts in the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List and describe all NetApp elastic accounts in the subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List and describe all NetApp elastic accounts in the subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupPoliciesClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupPoliciesClient.java new file mode 100644 index 000000000000..89294ce811df --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupPoliciesClient.java @@ -0,0 +1,268 @@ +// Copyright (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; + +/** + * 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, ElasticBackupPolicyInner 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, 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 netApp Elastic Backup Policy resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupPolicyInner update(String resourceGroupName, String accountName, String backupPolicyName, + ElasticBackupPolicyInner 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, + ElasticBackupPolicyInner body, Context context); + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, + String backupPolicyName); + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, + String backupPolicyName, Context context); + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String backupPolicyName); + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String backupPolicyName, Context context); + + /** + * List and describe all Elastic Backup Policies in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByElasticAccount(String resourceGroupName, String accountName); + + /** + * List and describe all Elastic Backup Policies in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByElasticAccount(String resourceGroupName, String accountName, + Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupVaultsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupVaultsClient.java new file mode 100644 index 000000000000..5cc09f89bd27 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupVaultsClient.java @@ -0,0 +1,268 @@ +// Copyright (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; + +/** + * 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, ElasticBackupVaultInner 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, 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 netApp elastic backup vault resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupVaultInner update(String resourceGroupName, String accountName, String backupVaultName, + ElasticBackupVaultInner 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, + ElasticBackupVaultInner body, Context context); + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, + String backupVaultName); + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String backupVaultName, + Context context); + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String backupVaultName); + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String backupVaultName, Context context); + + /** + * List and describe all Elastic Backup Vaults in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByElasticAccount(String resourceGroupName, String accountName); + + /** + * List and describe all Elastic Backup Vaults in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByElasticAccount(String resourceGroupName, String accountName, + Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupsClient.java new file mode 100644 index 000000000000..ea1cbfc596b4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupsClient.java @@ -0,0 +1,284 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupInner; + +/** + * An instance of this class provides access to all the operations defined in ElasticBackupsClient. + */ +public interface ElasticBackupsClient { + /** + * Get the specified Elastic Backup under Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Elastic Backup under Elastic Backup Vault along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String accountName, String backupVaultName, + String backupName, Context context); + + /** + * Get the specified Elastic Backup under Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Elastic Backup under Elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupInner get(String resourceGroupName, String accountName, String backupVaultName, String backupName); + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticBackupInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String backupVaultName, String backupName, ElasticBackupInner body); + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticBackupInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String backupVaultName, String backupName, ElasticBackupInner body, Context context); + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupInner createOrUpdate(String resourceGroupName, String accountName, String backupVaultName, + String backupName, ElasticBackupInner body); + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupInner createOrUpdate(String resourceGroupName, String accountName, String backupVaultName, + String backupName, ElasticBackupInner body, Context context); + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticBackupInner> beginUpdate(String resourceGroupName, + String accountName, String backupVaultName, String backupName, ElasticBackupInner body); + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticBackupInner> beginUpdate(String resourceGroupName, + String accountName, String backupVaultName, String backupName, ElasticBackupInner body, Context context); + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupInner update(String resourceGroupName, String accountName, String backupVaultName, String backupName, + ElasticBackupInner body); + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticBackupInner update(String resourceGroupName, String accountName, String backupVaultName, String backupName, + ElasticBackupInner body, Context context); + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String backupVaultName, + String backupName); + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String backupVaultName, + String backupName, Context context); + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String backupVaultName, String backupName); + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String backupVaultName, String backupName, + Context context); + + /** + * List all elastic backups Under an elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByVault(String resourceGroupName, String accountName, String backupVaultName); + + /** + * List all elastic backups Under an elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByVault(String resourceGroupName, String accountName, String backupVaultName, + Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticCapacityPoolsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticCapacityPoolsClient.java new file mode 100644 index 000000000000..c3188ddaecef --- /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 long-running operation. + */ + @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 long-running operation. + */ + @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 the response. + */ + @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 the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticCapacityPoolInner changeZone(String resourceGroupName, String accountName, String poolName, + ChangeZoneRequest body, Context context); + + /** + * Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding availability of a resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response checkVolumeFilePathAvailabilityWithResponse( + String resourceGroupName, String accountName, String poolName, + CheckElasticVolumeFilePathAvailabilityRequest body, Context context); + + /** + * Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding availability of a resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CheckElasticResourceAvailabilityResponseInner checkVolumeFilePathAvailability(String resourceGroupName, + String accountName, String poolName, CheckElasticVolumeFilePathAvailabilityRequest body); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticSnapshotPoliciesClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticSnapshotPoliciesClient.java new file mode 100644 index 000000000000..b41249b994bf --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticSnapshotPoliciesClient.java @@ -0,0 +1,300 @@ +// Copyright (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; + +/** + * 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, ElasticSnapshotPolicyInner 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, 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 netApp Elastic Snapshot Policy under an Elastic Account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticSnapshotPolicyInner update(String resourceGroupName, String accountName, String snapshotPolicyName, + ElasticSnapshotPolicyInner 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, + ElasticSnapshotPolicyInner body, Context context); + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, + String snapshotPolicyName); + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context); + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String snapshotPolicyName); + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String snapshotPolicyName, Context context); + + /** + * List ElasticSnapshotPolicy resources by ElasticAccount. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByElasticAccount(String resourceGroupName, String accountName); + + /** + * List ElasticSnapshotPolicy resources by ElasticAccount. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByElasticAccount(String resourceGroupName, String accountName, + Context context); + + /** + * Get elastic volumes associated with Elastic Snapshot Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic volumes associated with Elastic Snapshot Policy as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listElasticVolumes(String resourceGroupName, String accountName, + String snapshotPolicyName); + + /** + * Get elastic volumes associated with Elastic Snapshot Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic volumes associated with Elastic Snapshot Policy as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listElasticVolumes(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticSnapshotsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticSnapshotsClient.java new file mode 100644 index 000000000000..b2021a544dba --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticSnapshotsClient.java @@ -0,0 +1,229 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotInner; + +/** + * An instance of this class provides access to all the operations defined in ElasticSnapshotsClient. + */ +public interface ElasticSnapshotsClient { + /** + * Get a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshot along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName, Context context); + + /** + * Get a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticSnapshotInner get(String resourceGroupName, String accountName, String poolName, String volumeName, + String snapshotName); + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Snapshot under an Elastic Volume. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticSnapshotInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String poolName, String volumeName, String snapshotName, ElasticSnapshotInner body); + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Snapshot under an Elastic Volume. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ElasticSnapshotInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String poolName, String volumeName, String snapshotName, ElasticSnapshotInner body, + Context context); + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp Elastic Snapshot under an Elastic Volume. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticSnapshotInner createOrUpdate(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName, ElasticSnapshotInner body); + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp Elastic Snapshot under an Elastic Volume. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticSnapshotInner createOrUpdate(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName, ElasticSnapshotInner body, Context context); + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName); + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName, Context context); + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName); + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName, + Context context); + + /** + * List ElasticSnapshot resources by ElasticVolume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByElasticVolume(String resourceGroupName, String accountName, + String poolName, String volumeName); + + /** + * List ElasticSnapshot resources by ElasticVolume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByElasticVolume(String resourceGroupName, String accountName, + String poolName, String volumeName, Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticVolumesClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticVolumesClient.java new file mode 100644 index 000000000000..6c2a45df398f --- /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 long-running operation. + */ + @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 long-running operation. + */ + @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 the response. + */ + @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 the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ElasticVolumeInner revert(String resourceGroupName, String accountName, String poolName, String volumeName, + ElasticVolumeRevert body, Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppManagementClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppManagementClient.java index 9dc942a052a9..57bd68b86eac 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppManagementClient.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppManagementClient.java @@ -109,6 +109,13 @@ public interface NetAppManagementClient { */ VolumeQuotaRulesClient getVolumeQuotaRules(); + /** + * Gets the RansomwareReportsClient object to access its operations. + * + * @return the RansomwareReportsClient object. + */ + RansomwareReportsClient getRansomwareReports(); + /** * Gets the BackupVaultsClient object to access its operations. * @@ -116,6 +123,83 @@ public interface NetAppManagementClient { */ BackupVaultsClient getBackupVaults(); + /** + * Gets the BucketsClient object to access its operations. + * + * @return the BucketsClient object. + */ + BucketsClient getBuckets(); + + /** + * Gets the CachesClient object to access its operations. + * + * @return the CachesClient object. + */ + CachesClient getCaches(); + + /** + * Gets the ElasticAccountsClient object to access its operations. + * + * @return the ElasticAccountsClient object. + */ + ElasticAccountsClient getElasticAccounts(); + + /** + * Gets the ElasticCapacityPoolsClient object to access its operations. + * + * @return the ElasticCapacityPoolsClient object. + */ + ElasticCapacityPoolsClient getElasticCapacityPools(); + + /** + * Gets the ElasticVolumesClient object to access its operations. + * + * @return the ElasticVolumesClient object. + */ + ElasticVolumesClient getElasticVolumes(); + + /** + * Gets the ElasticSnapshotsClient object to access its operations. + * + * @return the ElasticSnapshotsClient object. + */ + ElasticSnapshotsClient getElasticSnapshots(); + + /** + * Gets the ElasticSnapshotPoliciesClient object to access its operations. + * + * @return the ElasticSnapshotPoliciesClient object. + */ + ElasticSnapshotPoliciesClient getElasticSnapshotPolicies(); + + /** + * Gets the ElasticBackupVaultsClient object to access its operations. + * + * @return the ElasticBackupVaultsClient object. + */ + ElasticBackupVaultsClient getElasticBackupVaults(); + + /** + * Gets the ElasticBackupPoliciesClient object to access its operations. + * + * @return the ElasticBackupPoliciesClient object. + */ + ElasticBackupPoliciesClient getElasticBackupPolicies(); + + /** + * Gets the ElasticBackupsClient object to access its operations. + * + * @return the ElasticBackupsClient object. + */ + ElasticBackupsClient getElasticBackups(); + + /** + * Gets the ActiveDirectoryConfigsClient object to access its operations. + * + * @return the ActiveDirectoryConfigsClient object. + */ + ActiveDirectoryConfigsClient getActiveDirectoryConfigs(); + /** * Gets the NetAppResourceQuotaLimitsClient object to access its operations. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/RansomwareReportsClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/RansomwareReportsClient.java new file mode 100644 index 000000000000..8c3d4a0f5852 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/RansomwareReportsClient.java @@ -0,0 +1,197 @@ +// Copyright (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.RansomwareReportInner; +import com.azure.resourcemanager.netapp.models.RansomwareSuspectsClearRequest; + +/** + * An instance of this class provides access to all the operations defined in RansomwareReportsClient. + */ +public interface RansomwareReportsClient { + /** + * Get details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String ransomwareReportName, Context context); + + /** + * Get details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RansomwareReportInner get(String resourceGroupName, String accountName, String poolName, String volumeName, + String ransomwareReportName); + + /** + * List all ransomware reports for the volume + * Returns a list of the Advanced Ransomware Protection (ARP) reports for the volume. + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Advanced Ransomware Protection (ARP) reports as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String accountName, String poolName, + String volumeName); + + /** + * List all ransomware reports for the volume + * Returns a list of the Advanced Ransomware Protection (ARP) reports for the volume. + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Advanced Ransomware Protection (ARP) reports as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context); + + /** + * "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should evaluate the report to + * determine whether the activity is acceptable (false positive) or whether an attack seems malicious. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data",. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param body Clear suspects request object supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginClearSuspects(String resourceGroupName, String accountName, String poolName, + String volumeName, String ransomwareReportName, RansomwareSuspectsClearRequest body); + + /** + * "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should evaluate the report to + * determine whether the activity is acceptable (false positive) or whether an attack seems malicious. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data",. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param body Clear suspects request object supplied in the body of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginClearSuspects(String resourceGroupName, String accountName, String poolName, + String volumeName, String ransomwareReportName, RansomwareSuspectsClearRequest body, Context context); + + /** + * "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should evaluate the report to + * determine whether the activity is acceptable (false positive) or whether an attack seems malicious. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data",. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param body Clear suspects request object supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void clearSuspects(String resourceGroupName, String accountName, String poolName, String volumeName, + String ransomwareReportName, RansomwareSuspectsClearRequest body); + + /** + * "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should evaluate the report to + * determine whether the activity is acceptable (false positive) or whether an attack seems malicious. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data",. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param body Clear suspects request object supplied in the body of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void clearSuspects(String resourceGroupName, String accountName, String poolName, String volumeName, + String ransomwareReportName, RansomwareSuspectsClearRequest body, Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VolumesClient.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VolumesClient.java index 4d0e89ff44f0..b0fb9bac0327 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VolumesClient.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/VolumesClient.java @@ -13,6 +13,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.netapp.fluent.models.ClusterPeerCommandResponseInner; import com.azure.resourcemanager.netapp.fluent.models.GetGroupIdListForLdapUserResponseInner; +import com.azure.resourcemanager.netapp.fluent.models.ListQuotaReportResponseInner; import com.azure.resourcemanager.netapp.fluent.models.ReplicationInner; import com.azure.resourcemanager.netapp.fluent.models.ReplicationStatusInner; import com.azure.resourcemanager.netapp.fluent.models.SvmPeerCommandResponseInner; @@ -1694,4 +1695,70 @@ SyncPoller, Void> beginRevertRelocation(String resourceGroupNam @ServiceMethod(returns = ReturnType.SINGLE) void revertRelocation(String resourceGroupName, String accountName, String poolName, String volumeName, Context context); + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ListQuotaReportResponseInner> + beginListQuotaReport(String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ListQuotaReportResponseInner> beginListQuotaReport( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context); + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ListQuotaReportResponseInner listQuotaReport(String resourceGroupName, String accountName, String poolName, + String volumeName); + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ListQuotaReportResponseInner listQuotaReport(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/models/AccountProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountProperties.java index 667ce9fe0bd8..3f77b6afdc9e 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.LdapConfiguration; import com.azure.resourcemanager.netapp.models.MultiAdStatus; import java.io.IOException; import java.util.List; @@ -51,6 +52,11 @@ public final class AccountProperties implements JsonSerializable writer.writeJson(element)); jsonWriter.writeJsonField("encryption", this.encryption); jsonWriter.writeStringField("nfsV4IDDomain", this.nfsV4IdDomain); + jsonWriter.writeJsonField("ldapConfiguration", this.ldapConfiguration); return jsonWriter.writeEndObject(); } @@ -203,6 +233,8 @@ public static AccountProperties fromJson(JsonReader jsonReader) throws IOExcepti deserializedAccountProperties.nfsV4IdDomain = reader.getString(); } else if ("multiAdStatus".equals(fieldName)) { deserializedAccountProperties.multiAdStatus = MultiAdStatus.fromString(reader.getString()); + } else if ("ldapConfiguration".equals(fieldName)) { + deserializedAccountProperties.ldapConfiguration = LdapConfiguration.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ActiveDirectoryConfigInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ActiveDirectoryConfigInner.java new file mode 100644 index 000000000000..fdbfdf2c2060 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ActiveDirectoryConfigInner.java @@ -0,0 +1,245 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigProperties; +import com.azure.resourcemanager.netapp.models.ManagedServiceIdentity; +import java.io.IOException; +import java.util.Map; + +/** + * Active Directory Configuration resource. + */ +@Fluent +public final class ActiveDirectoryConfigInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private ActiveDirectoryConfigProperties properties; + + /* + * "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields." + * ) + */ + private String etag; + + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentity identity; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ActiveDirectoryConfigInner class. + */ + public ActiveDirectoryConfigInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ActiveDirectoryConfigProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ActiveDirectoryConfigInner object itself. + */ + public ActiveDirectoryConfigInner withProperties(ActiveDirectoryConfigProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). + * + * @return the etag value. + */ + public String etag() { + return this.etag; + } + + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the ActiveDirectoryConfigInner object itself. + */ + public ActiveDirectoryConfigInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ActiveDirectoryConfigInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ActiveDirectoryConfigInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + if (identity() != null) { + identity().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActiveDirectoryConfigInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActiveDirectoryConfigInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ActiveDirectoryConfigInner. + */ + public static ActiveDirectoryConfigInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActiveDirectoryConfigInner deserializedActiveDirectoryConfigInner = new ActiveDirectoryConfigInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedActiveDirectoryConfigInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedActiveDirectoryConfigInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedActiveDirectoryConfigInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedActiveDirectoryConfigInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedActiveDirectoryConfigInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedActiveDirectoryConfigInner.properties + = ActiveDirectoryConfigProperties.fromJson(reader); + } else if ("etag".equals(fieldName)) { + deserializedActiveDirectoryConfigInner.etag = reader.getString(); + } else if ("identity".equals(fieldName)) { + deserializedActiveDirectoryConfigInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedActiveDirectoryConfigInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedActiveDirectoryConfigInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketGenerateCredentialsInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketGenerateCredentialsInner.java new file mode 100644 index 000000000000..c0b2d5a0e60c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketGenerateCredentialsInner.java @@ -0,0 +1,117 @@ +// Copyright (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.util.CoreUtils; +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; + +/** + * Bucket Access Key, Secret Key, and Expiry date and time of the key pair. + */ +@Immutable +public final class BucketGenerateCredentialsInner implements JsonSerializable { + /* + * The Access Key that is required along with the Secret Key to access the bucket. + */ + private String accessKey; + + /* + * The Secret Key that is required along with the Access Key to access the bucket. + */ + private String secretKey; + + /* + * The bucket's Access and Secret key pair expiry date and time (in UTC). + */ + private OffsetDateTime keyPairExpiry; + + /** + * Creates an instance of BucketGenerateCredentialsInner class. + */ + private BucketGenerateCredentialsInner() { + } + + /** + * Get the accessKey property: The Access Key that is required along with the Secret Key to access the bucket. + * + * @return the accessKey value. + */ + public String accessKey() { + return this.accessKey; + } + + /** + * Get the secretKey property: The Secret Key that is required along with the Access Key to access the bucket. + * + * @return the secretKey value. + */ + public String secretKey() { + return this.secretKey; + } + + /** + * Get the keyPairExpiry property: The bucket's Access and Secret key pair expiry date and time (in UTC). + * + * @return the keyPairExpiry value. + */ + public OffsetDateTime keyPairExpiry() { + return this.keyPairExpiry; + } + + /** + * 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 BucketGenerateCredentialsInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BucketGenerateCredentialsInner 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 BucketGenerateCredentialsInner. + */ + public static BucketGenerateCredentialsInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BucketGenerateCredentialsInner deserializedBucketGenerateCredentialsInner + = new BucketGenerateCredentialsInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("accessKey".equals(fieldName)) { + deserializedBucketGenerateCredentialsInner.accessKey = reader.getString(); + } else if ("secretKey".equals(fieldName)) { + deserializedBucketGenerateCredentialsInner.secretKey = reader.getString(); + } else if ("keyPairExpiry".equals(fieldName)) { + deserializedBucketGenerateCredentialsInner.keyPairExpiry = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedBucketGenerateCredentialsInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketInner.java new file mode 100644 index 000000000000..a6675476ea2f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketInner.java @@ -0,0 +1,281 @@ +// Copyright (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.BucketPermissions; +import com.azure.resourcemanager.netapp.models.BucketServerProperties; +import com.azure.resourcemanager.netapp.models.CredentialsStatus; +import com.azure.resourcemanager.netapp.models.FileSystemUser; +import com.azure.resourcemanager.netapp.models.ProvisioningState; +import java.io.IOException; + +/** + * Bucket resource. + */ +@Fluent +public final class BucketInner extends ProxyResource { + /* + * Bucket properties + */ + private BucketProperties innerProperties; + + /* + * 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 BucketInner class. + */ + public BucketInner() { + } + + /** + * Get the innerProperties property: Bucket properties. + * + * @return the innerProperties value. + */ + private BucketProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the 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; + } + + /** + * Get the path property: The volume path mounted inside the bucket. The default is the root path '/' if no value is + * provided when the bucket is created. + * + * @return the path value. + */ + public String path() { + return this.innerProperties() == null ? null : this.innerProperties().path(); + } + + /** + * Set the path property: The volume path mounted inside the bucket. The default is the root path '/' if no value is + * provided when the bucket is created. + * + * @param path the path value to set. + * @return the BucketInner object itself. + */ + public BucketInner withPath(String path) { + if (this.innerProperties() == null) { + this.innerProperties = new BucketProperties(); + } + this.innerProperties().withPath(path); + return this; + } + + /** + * Get the fileSystemUser property: File System user having access to volume data. For Unix, this is the user's uid + * and gid. For Windows, this is the user's username. Note that the Unix and Windows user details are mutually + * exclusive, meaning one or other must be supplied, but not both. + * + * @return the fileSystemUser value. + */ + public FileSystemUser fileSystemUser() { + return this.innerProperties() == null ? null : this.innerProperties().fileSystemUser(); + } + + /** + * Set the fileSystemUser property: File System user having access to volume data. For Unix, this is the user's uid + * and gid. For Windows, this is the user's username. Note that the Unix and Windows user details are mutually + * exclusive, meaning one or other must be supplied, but not both. + * + * @param fileSystemUser the fileSystemUser value to set. + * @return the BucketInner object itself. + */ + public BucketInner withFileSystemUser(FileSystemUser fileSystemUser) { + if (this.innerProperties() == null) { + this.innerProperties = new BucketProperties(); + } + this.innerProperties().withFileSystemUser(fileSystemUser); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the status property: The bucket credentials status. There states: + * + * "NoCredentialsSet": Access and Secret key pair have not been generated. + * "CredentialsExpired": Access and Secret key pair have expired. + * "Active": The certificate has been installed and credentials are unexpired. + * + * @return the status value. + */ + public CredentialsStatus status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Get the server property: Properties of the server managing the lifecycle of volume buckets. + * + * @return the server value. + */ + public BucketServerProperties server() { + return this.innerProperties() == null ? null : this.innerProperties().server(); + } + + /** + * Set the server property: Properties of the server managing the lifecycle of volume buckets. + * + * @param server the server value to set. + * @return the BucketInner object itself. + */ + public BucketInner withServer(BucketServerProperties server) { + if (this.innerProperties() == null) { + this.innerProperties = new BucketProperties(); + } + this.innerProperties().withServer(server); + return this; + } + + /** + * Get the permissions property: Access permissions for the bucket. Either ReadOnly or ReadWrite. The default is + * ReadOnly if no value is provided during bucket creation. + * + * @return the permissions value. + */ + public BucketPermissions permissions() { + return this.innerProperties() == null ? null : this.innerProperties().permissions(); + } + + /** + * Set the permissions property: Access permissions for the bucket. Either ReadOnly or ReadWrite. The default is + * ReadOnly if no value is provided during bucket creation. + * + * @param permissions the permissions value to set. + * @return the BucketInner object itself. + */ + public BucketInner withPermissions(BucketPermissions permissions) { + if (this.innerProperties() == null) { + this.innerProperties = new BucketProperties(); + } + this.innerProperties().withPermissions(permissions); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BucketInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BucketInner 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 BucketInner. + */ + public static BucketInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BucketInner deserializedBucketInner = new BucketInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedBucketInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedBucketInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedBucketInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedBucketInner.innerProperties = BucketProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedBucketInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedBucketInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketPatchProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketPatchProperties.java new file mode 100644 index 000000000000..54a536995baa --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketPatchProperties.java @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.BucketPatchPermissions; +import com.azure.resourcemanager.netapp.models.BucketServerPatchProperties; +import com.azure.resourcemanager.netapp.models.FileSystemUser; +import com.azure.resourcemanager.netapp.models.ProvisioningState; +import java.io.IOException; + +/** + * Bucket resource properties for a Patch operation. + */ +@Fluent +public final class BucketPatchProperties implements JsonSerializable { + /* + * The volume path mounted inside the bucket. + */ + private String path; + + /* + * File System user having access to volume data. For Unix, this is the user's uid and gid. For Windows, this is the + * user's username. Note that the Unix and Windows user details are mutually exclusive, meaning one or other must be + * supplied, but not both. + */ + private FileSystemUser fileSystemUser; + + /* + * Provisioning state of the resource + */ + private ProvisioningState provisioningState; + + /* + * Properties of the server managing the lifecycle of volume buckets + */ + private BucketServerPatchProperties server; + + /* + * Access permissions for the bucket. Either ReadOnly or ReadWrite. + */ + private BucketPatchPermissions permissions; + + /** + * Creates an instance of BucketPatchProperties class. + */ + public BucketPatchProperties() { + } + + /** + * Get the path property: The volume path mounted inside the bucket. + * + * @return the path value. + */ + public String path() { + return this.path; + } + + /** + * Set the path property: The volume path mounted inside the bucket. + * + * @param path the path value to set. + * @return the BucketPatchProperties object itself. + */ + public BucketPatchProperties withPath(String path) { + this.path = path; + return this; + } + + /** + * Get the fileSystemUser property: File System user having access to volume data. For Unix, this is the user's uid + * and gid. For Windows, this is the user's username. Note that the Unix and Windows user details are mutually + * exclusive, meaning one or other must be supplied, but not both. + * + * @return the fileSystemUser value. + */ + public FileSystemUser fileSystemUser() { + return this.fileSystemUser; + } + + /** + * Set the fileSystemUser property: File System user having access to volume data. For Unix, this is the user's uid + * and gid. For Windows, this is the user's username. Note that the Unix and Windows user details are mutually + * exclusive, meaning one or other must be supplied, but not both. + * + * @param fileSystemUser the fileSystemUser value to set. + * @return the BucketPatchProperties object itself. + */ + public BucketPatchProperties withFileSystemUser(FileSystemUser fileSystemUser) { + this.fileSystemUser = fileSystemUser; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the server property: Properties of the server managing the lifecycle of volume buckets. + * + * @return the server value. + */ + public BucketServerPatchProperties server() { + return this.server; + } + + /** + * Set the server property: Properties of the server managing the lifecycle of volume buckets. + * + * @param server the server value to set. + * @return the BucketPatchProperties object itself. + */ + public BucketPatchProperties withServer(BucketServerPatchProperties server) { + this.server = server; + return this; + } + + /** + * Get the permissions property: Access permissions for the bucket. Either ReadOnly or ReadWrite. + * + * @return the permissions value. + */ + public BucketPatchPermissions permissions() { + return this.permissions; + } + + /** + * Set the permissions property: Access permissions for the bucket. Either ReadOnly or ReadWrite. + * + * @param permissions the permissions value to set. + * @return the BucketPatchProperties object itself. + */ + public BucketPatchProperties withPermissions(BucketPatchPermissions permissions) { + this.permissions = permissions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (fileSystemUser() != null) { + fileSystemUser().validate(); + } + if (server() != null) { + server().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("path", this.path); + jsonWriter.writeJsonField("fileSystemUser", this.fileSystemUser); + jsonWriter.writeJsonField("server", this.server); + jsonWriter.writeStringField("permissions", this.permissions == null ? null : this.permissions.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BucketPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BucketPatchProperties 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 BucketPatchProperties. + */ + public static BucketPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BucketPatchProperties deserializedBucketPatchProperties = new BucketPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("path".equals(fieldName)) { + deserializedBucketPatchProperties.path = reader.getString(); + } else if ("fileSystemUser".equals(fieldName)) { + deserializedBucketPatchProperties.fileSystemUser = FileSystemUser.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedBucketPatchProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("server".equals(fieldName)) { + deserializedBucketPatchProperties.server = BucketServerPatchProperties.fromJson(reader); + } else if ("permissions".equals(fieldName)) { + deserializedBucketPatchProperties.permissions + = BucketPatchPermissions.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedBucketPatchProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketProperties.java new file mode 100644 index 000000000000..8b629e58abc6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketProperties.java @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.BucketPermissions; +import com.azure.resourcemanager.netapp.models.BucketServerProperties; +import com.azure.resourcemanager.netapp.models.CredentialsStatus; +import com.azure.resourcemanager.netapp.models.FileSystemUser; +import com.azure.resourcemanager.netapp.models.ProvisioningState; +import java.io.IOException; + +/** + * Bucket resource properties. + */ +@Fluent +public final class BucketProperties implements JsonSerializable { + /* + * The volume path mounted inside the bucket. The default is the root path '/' if no value is provided when the + * bucket is created. + */ + private String path; + + /* + * File System user having access to volume data. For Unix, this is the user's uid and gid. For Windows, this is the + * user's username. Note that the Unix and Windows user details are mutually exclusive, meaning one or other must be + * supplied, but not both. + */ + private FileSystemUser fileSystemUser; + + /* + * Provisioning state of the resource + */ + private ProvisioningState provisioningState; + + /* + * The bucket credentials status. There states: + * + * "NoCredentialsSet": Access and Secret key pair have not been generated. + * "CredentialsExpired": Access and Secret key pair have expired. + * "Active": The certificate has been installed and credentials are unexpired. + */ + private CredentialsStatus status; + + /* + * Properties of the server managing the lifecycle of volume buckets + */ + private BucketServerProperties server; + + /* + * Access permissions for the bucket. Either ReadOnly or ReadWrite. The default is ReadOnly if no value is provided + * during bucket creation. + */ + private BucketPermissions permissions; + + /** + * Creates an instance of BucketProperties class. + */ + public BucketProperties() { + } + + /** + * Get the path property: The volume path mounted inside the bucket. The default is the root path '/' if no value is + * provided when the bucket is created. + * + * @return the path value. + */ + public String path() { + return this.path; + } + + /** + * Set the path property: The volume path mounted inside the bucket. The default is the root path '/' if no value is + * provided when the bucket is created. + * + * @param path the path value to set. + * @return the BucketProperties object itself. + */ + public BucketProperties withPath(String path) { + this.path = path; + return this; + } + + /** + * Get the fileSystemUser property: File System user having access to volume data. For Unix, this is the user's uid + * and gid. For Windows, this is the user's username. Note that the Unix and Windows user details are mutually + * exclusive, meaning one or other must be supplied, but not both. + * + * @return the fileSystemUser value. + */ + public FileSystemUser fileSystemUser() { + return this.fileSystemUser; + } + + /** + * Set the fileSystemUser property: File System user having access to volume data. For Unix, this is the user's uid + * and gid. For Windows, this is the user's username. Note that the Unix and Windows user details are mutually + * exclusive, meaning one or other must be supplied, but not both. + * + * @param fileSystemUser the fileSystemUser value to set. + * @return the BucketProperties object itself. + */ + public BucketProperties withFileSystemUser(FileSystemUser fileSystemUser) { + this.fileSystemUser = fileSystemUser; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the status property: The bucket credentials status. There states: + * + * "NoCredentialsSet": Access and Secret key pair have not been generated. + * "CredentialsExpired": Access and Secret key pair have expired. + * "Active": The certificate has been installed and credentials are unexpired. + * + * @return the status value. + */ + public CredentialsStatus status() { + return this.status; + } + + /** + * Get the server property: Properties of the server managing the lifecycle of volume buckets. + * + * @return the server value. + */ + public BucketServerProperties server() { + return this.server; + } + + /** + * Set the server property: Properties of the server managing the lifecycle of volume buckets. + * + * @param server the server value to set. + * @return the BucketProperties object itself. + */ + public BucketProperties withServer(BucketServerProperties server) { + this.server = server; + return this; + } + + /** + * Get the permissions property: Access permissions for the bucket. Either ReadOnly or ReadWrite. The default is + * ReadOnly if no value is provided during bucket creation. + * + * @return the permissions value. + */ + public BucketPermissions permissions() { + return this.permissions; + } + + /** + * Set the permissions property: Access permissions for the bucket. Either ReadOnly or ReadWrite. The default is + * ReadOnly if no value is provided during bucket creation. + * + * @param permissions the permissions value to set. + * @return the BucketProperties object itself. + */ + public BucketProperties withPermissions(BucketPermissions permissions) { + this.permissions = permissions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (fileSystemUser() != null) { + fileSystemUser().validate(); + } + if (server() != null) { + server().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("path", this.path); + jsonWriter.writeJsonField("fileSystemUser", this.fileSystemUser); + jsonWriter.writeJsonField("server", this.server); + jsonWriter.writeStringField("permissions", this.permissions == null ? null : this.permissions.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BucketProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BucketProperties 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 BucketProperties. + */ + public static BucketProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BucketProperties deserializedBucketProperties = new BucketProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("path".equals(fieldName)) { + deserializedBucketProperties.path = reader.getString(); + } else if ("fileSystemUser".equals(fieldName)) { + deserializedBucketProperties.fileSystemUser = FileSystemUser.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedBucketProperties.provisioningState = ProvisioningState.fromString(reader.getString()); + } else if ("status".equals(fieldName)) { + deserializedBucketProperties.status = CredentialsStatus.fromString(reader.getString()); + } else if ("server".equals(fieldName)) { + deserializedBucketProperties.server = BucketServerProperties.fromJson(reader); + } else if ("permissions".equals(fieldName)) { + deserializedBucketProperties.permissions = BucketPermissions.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedBucketProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CacheInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CacheInner.java new file mode 100644 index 000000000000..626d88faf123 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CacheInner.java @@ -0,0 +1,248 @@ +// Copyright (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.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.CacheProperties; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * Cache resource. + */ +@Fluent +public final class CacheInner extends Resource { + /* + * Cache properties + */ + private CacheProperties 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 CacheInner class. + */ + public CacheInner() { + } + + /** + * Get the properties property: Cache properties. + * + * @return the properties value. + */ + public CacheProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Cache properties. + * + * @param properties the properties value to set. + * @return the CacheInner object itself. + */ + public CacheInner withProperties(CacheProperties 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 CacheInner object itself. + */ + public CacheInner 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 CacheInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CacheInner 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) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property properties in model CacheInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CacheInner.class); + + /** + * {@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 CacheInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CacheInner 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 CacheInner. + */ + public static CacheInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CacheInner deserializedCacheInner = new CacheInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedCacheInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedCacheInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedCacheInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedCacheInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedCacheInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedCacheInner.properties = CacheProperties.fromJson(reader); + } else if ("etag".equals(fieldName)) { + deserializedCacheInner.etag = reader.getString(); + } else if ("zones".equals(fieldName)) { + List zones = reader.readArray(reader1 -> reader1.getString()); + deserializedCacheInner.zones = zones; + } else if ("systemData".equals(fieldName)) { + deserializedCacheInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedCacheInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckElasticResourceAvailabilityResponseInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckElasticResourceAvailabilityResponseInner.java new file mode 100644 index 000000000000..e510e0cead5c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckElasticResourceAvailabilityResponseInner.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityReason; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityStatus; +import java.io.IOException; + +/** + * Information regarding availability of a resource. + */ +@Immutable +public final class CheckElasticResourceAvailabilityResponseInner + implements JsonSerializable { + /* + * True indicates name is valid and available. False indicates the name is invalid, unavailable, or both. + */ + private CheckElasticResourceAvailabilityStatus isAvailable; + + /* + * Invalid indicates the name provided does not match Azure NetApp Files naming requirements. AlreadyExists + * indicates that the name is already in use and is therefore unavailable. + */ + private CheckElasticResourceAvailabilityReason reason; + + /* + * If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource + * naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that resource + * name is already in use, and direct them to select a different name. + */ + private String message; + + /** + * Creates an instance of CheckElasticResourceAvailabilityResponseInner class. + */ + private CheckElasticResourceAvailabilityResponseInner() { + } + + /** + * Get the isAvailable property: True indicates name is valid and available. False indicates the name is invalid, + * unavailable, or both. + * + * @return the isAvailable value. + */ + public CheckElasticResourceAvailabilityStatus isAvailable() { + return this.isAvailable; + } + + /** + * Get the reason property: Invalid indicates the name provided does not match Azure NetApp Files naming + * requirements. AlreadyExists indicates that the name is already in use and is therefore unavailable. + * + * @return the reason value. + */ + public CheckElasticResourceAvailabilityReason reason() { + return this.reason; + } + + /** + * Get the message property: If reason == invalid, provide the user with the reason why the given name is invalid, + * and provide the resource naming requirements so that the user can select a valid name. If reason == + * AlreadyExists, explain that resource name is already in use, and direct them to select a different name. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("isAvailable", this.isAvailable == null ? null : this.isAvailable.toString()); + jsonWriter.writeStringField("reason", this.reason == null ? null : this.reason.toString()); + jsonWriter.writeStringField("message", this.message); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CheckElasticResourceAvailabilityResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CheckElasticResourceAvailabilityResponseInner if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CheckElasticResourceAvailabilityResponseInner. + */ + public static CheckElasticResourceAvailabilityResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CheckElasticResourceAvailabilityResponseInner deserializedCheckElasticResourceAvailabilityResponseInner + = new CheckElasticResourceAvailabilityResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("isAvailable".equals(fieldName)) { + deserializedCheckElasticResourceAvailabilityResponseInner.isAvailable + = CheckElasticResourceAvailabilityStatus.fromString(reader.getString()); + } else if ("reason".equals(fieldName)) { + deserializedCheckElasticResourceAvailabilityResponseInner.reason + = CheckElasticResourceAvailabilityReason.fromString(reader.getString()); + } else if ("message".equals(fieldName)) { + deserializedCheckElasticResourceAvailabilityResponseInner.message = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCheckElasticResourceAvailabilityResponseInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticAccountInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticAccountInner.java new file mode 100644 index 000000000000..fec53001fe1a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticAccountInner.java @@ -0,0 +1,246 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.ElasticAccountProperties; +import com.azure.resourcemanager.netapp.models.ManagedServiceIdentity; +import java.io.IOException; +import java.util.Map; + +/** + * NetApp elastic account resource. + */ +@Fluent +public final class ElasticAccountInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private ElasticAccountProperties properties; + + /* + * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. + * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity + * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section + * 14.27) header fields. + */ + private String eTag; + + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentity identity; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ElasticAccountInner class. + */ + public ElasticAccountInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticAccountProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticAccountInner object itself. + */ + public ElasticAccountInner withProperties(ElasticAccountProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + public String eTag() { + return this.eTag; + } + + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the ElasticAccountInner object itself. + */ + public ElasticAccountInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticAccountInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticAccountInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + if (identity() != null) { + identity().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticAccountInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticAccountInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticAccountInner. + */ + public static ElasticAccountInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticAccountInner deserializedElasticAccountInner = new ElasticAccountInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedElasticAccountInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedElasticAccountInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedElasticAccountInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedElasticAccountInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticAccountInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedElasticAccountInner.properties = ElasticAccountProperties.fromJson(reader); + } else if ("eTag".equals(fieldName)) { + deserializedElasticAccountInner.eTag = reader.getString(); + } else if ("identity".equals(fieldName)) { + deserializedElasticAccountInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedElasticAccountInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticAccountInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupInner.java new file mode 100644 index 000000000000..355c759d9ec7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupInner.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.ElasticBackupProperties; +import java.io.IOException; + +/** + * NetApp Elastic Backup under an elastic Backup Vault. + */ +@Fluent +public final class ElasticBackupInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private ElasticBackupProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ElasticBackupInner class. + */ + public ElasticBackupInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticBackupProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticBackupInner object itself. + */ + public ElasticBackupInner withProperties(ElasticBackupProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticBackupInner. + */ + public static ElasticBackupInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupInner deserializedElasticBackupInner = new ElasticBackupInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedElasticBackupInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedElasticBackupInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedElasticBackupInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedElasticBackupInner.properties = ElasticBackupProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedElasticBackupInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupPolicyInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupPolicyInner.java new file mode 100644 index 000000000000..46c2fe6bfa0d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupPolicyInner.java @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyProperties; +import java.io.IOException; +import java.util.Map; + +/** + * NetApp Elastic Backup Policy resource. + */ +@Fluent +public final class ElasticBackupPolicyInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private ElasticBackupPolicyProperties properties; + + /* + * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. + * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity + * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section + * 14.27) header fields. + */ + private String eTag; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ElasticBackupPolicyInner class. + */ + public ElasticBackupPolicyInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticBackupPolicyProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticBackupPolicyInner object itself. + */ + public ElasticBackupPolicyInner withProperties(ElasticBackupPolicyProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + public String eTag() { + return this.eTag; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticBackupPolicyInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticBackupPolicyInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupPolicyInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupPolicyInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticBackupPolicyInner. + */ + public static ElasticBackupPolicyInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupPolicyInner deserializedElasticBackupPolicyInner = new ElasticBackupPolicyInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedElasticBackupPolicyInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedElasticBackupPolicyInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedElasticBackupPolicyInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedElasticBackupPolicyInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticBackupPolicyInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedElasticBackupPolicyInner.properties = ElasticBackupPolicyProperties.fromJson(reader); + } else if ("eTag".equals(fieldName)) { + deserializedElasticBackupPolicyInner.eTag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedElasticBackupPolicyInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupPolicyInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupVaultInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupVaultInner.java new file mode 100644 index 000000000000..578bd49e28cd --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupVaultInner.java @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.ElasticBackupVaultProperties; +import java.io.IOException; +import java.util.Map; + +/** + * NetApp elastic backup vault resource. + */ +@Fluent +public final class ElasticBackupVaultInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private ElasticBackupVaultProperties properties; + + /* + * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. + * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity + * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section + * 14.27) header fields. + */ + private String eTag; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ElasticBackupVaultInner class. + */ + public ElasticBackupVaultInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticBackupVaultProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticBackupVaultInner object itself. + */ + public ElasticBackupVaultInner withProperties(ElasticBackupVaultProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + public String eTag() { + return this.eTag; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticBackupVaultInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticBackupVaultInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupVaultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupVaultInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticBackupVaultInner. + */ + public static ElasticBackupVaultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupVaultInner deserializedElasticBackupVaultInner = new ElasticBackupVaultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedElasticBackupVaultInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedElasticBackupVaultInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedElasticBackupVaultInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedElasticBackupVaultInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticBackupVaultInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedElasticBackupVaultInner.properties = ElasticBackupVaultProperties.fromJson(reader); + } else if ("eTag".equals(fieldName)) { + deserializedElasticBackupVaultInner.eTag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedElasticBackupVaultInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupVaultInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticCapacityPoolInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticCapacityPoolInner.java new file mode 100644 index 000000000000..9440f6af3ca5 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticCapacityPoolInner.java @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPoolProperties; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * NetApp Elastic Capacity Pool resource. + */ +@Fluent +public final class ElasticCapacityPoolInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private ElasticCapacityPoolProperties properties; + + /* + * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. + * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity + * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section + * 14.27) header fields. + */ + private String eTag; + + /* + * The availability zones. + */ + private List zones; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ElasticCapacityPoolInner class. + */ + public ElasticCapacityPoolInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticCapacityPoolProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticCapacityPoolInner object itself. + */ + public ElasticCapacityPoolInner withProperties(ElasticCapacityPoolProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + public String eTag() { + return this.eTag; + } + + /** + * Get the zones property: The availability zones. + * + * @return the zones value. + */ + public List zones() { + return this.zones; + } + + /** + * Set the zones property: The availability zones. + * + * @param zones the zones value to set. + * @return the ElasticCapacityPoolInner object itself. + */ + public ElasticCapacityPoolInner withZones(List zones) { + this.zones = zones; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticCapacityPoolInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticCapacityPoolInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticCapacityPoolInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticCapacityPoolInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticCapacityPoolInner. + */ + public static ElasticCapacityPoolInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticCapacityPoolInner deserializedElasticCapacityPoolInner = new ElasticCapacityPoolInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedElasticCapacityPoolInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedElasticCapacityPoolInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedElasticCapacityPoolInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedElasticCapacityPoolInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticCapacityPoolInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedElasticCapacityPoolInner.properties = ElasticCapacityPoolProperties.fromJson(reader); + } else if ("eTag".equals(fieldName)) { + deserializedElasticCapacityPoolInner.eTag = reader.getString(); + } else if ("zones".equals(fieldName)) { + List zones = reader.readArray(reader1 -> reader1.getString()); + deserializedElasticCapacityPoolInner.zones = zones; + } else if ("systemData".equals(fieldName)) { + deserializedElasticCapacityPoolInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticCapacityPoolInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticSnapshotInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticSnapshotInner.java new file mode 100644 index 000000000000..0e81120fbefd --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticSnapshotInner.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotProperties; +import java.io.IOException; + +/** + * NetApp Elastic Snapshot under an Elastic Volume. + */ +@Fluent +public final class ElasticSnapshotInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private ElasticSnapshotProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ElasticSnapshotInner class. + */ + public ElasticSnapshotInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticSnapshotProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticSnapshotInner object itself. + */ + public ElasticSnapshotInner withProperties(ElasticSnapshotProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticSnapshotInner. + */ + public static ElasticSnapshotInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotInner deserializedElasticSnapshotInner = new ElasticSnapshotInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedElasticSnapshotInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedElasticSnapshotInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedElasticSnapshotInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedElasticSnapshotInner.properties = ElasticSnapshotProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedElasticSnapshotInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticSnapshotPolicyInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticSnapshotPolicyInner.java new file mode 100644 index 000000000000..2aa9cb9185f2 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticSnapshotPolicyInner.java @@ -0,0 +1,215 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotPolicyProperties; +import java.io.IOException; +import java.util.Map; + +/** + * NetApp Elastic Snapshot Policy under an Elastic Account. + */ +@Fluent +public final class ElasticSnapshotPolicyInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private ElasticSnapshotPolicyProperties properties; + + /* + * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. + * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity + * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section + * 14.27) header fields. + */ + private String eTag; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ElasticSnapshotPolicyInner class. + */ + public ElasticSnapshotPolicyInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticSnapshotPolicyProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticSnapshotPolicyInner object itself. + */ + public ElasticSnapshotPolicyInner withProperties(ElasticSnapshotPolicyProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + public String eTag() { + return this.eTag; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticSnapshotPolicyInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticSnapshotPolicyInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotPolicyInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotPolicyInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticSnapshotPolicyInner. + */ + public static ElasticSnapshotPolicyInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotPolicyInner deserializedElasticSnapshotPolicyInner = new ElasticSnapshotPolicyInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedElasticSnapshotPolicyInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedElasticSnapshotPolicyInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedElasticSnapshotPolicyInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedElasticSnapshotPolicyInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticSnapshotPolicyInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedElasticSnapshotPolicyInner.properties + = ElasticSnapshotPolicyProperties.fromJson(reader); + } else if ("eTag".equals(fieldName)) { + deserializedElasticSnapshotPolicyInner.eTag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedElasticSnapshotPolicyInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotPolicyInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticVolumeInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticVolumeInner.java new file mode 100644 index 000000000000..53b43ec7950f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticVolumeInner.java @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.models.ElasticVolumeProperties; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * NetApp Elastic Volume resource. + */ +@Fluent +public final class ElasticVolumeInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private ElasticVolumeProperties properties; + + /* + * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. + * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity + * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section + * 14.27) header fields. + */ + private String eTag; + + /* + * The availability zones. + */ + private List zones; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ElasticVolumeInner class. + */ + public ElasticVolumeInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticVolumeProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticVolumeInner object itself. + */ + public ElasticVolumeInner withProperties(ElasticVolumeProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + public String eTag() { + return this.eTag; + } + + /** + * Get the zones property: The availability zones. + * + * @return the zones value. + */ + public List zones() { + return this.zones; + } + + /** + * Set the zones property: The availability zones. + * + * @param zones the zones value to set. + * @return the ElasticVolumeInner object itself. + */ + public ElasticVolumeInner withZones(List zones) { + this.zones = zones; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticVolumeInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ElasticVolumeInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticVolumeInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticVolumeInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticVolumeInner. + */ + public static ElasticVolumeInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticVolumeInner deserializedElasticVolumeInner = new ElasticVolumeInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedElasticVolumeInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedElasticVolumeInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedElasticVolumeInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedElasticVolumeInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticVolumeInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedElasticVolumeInner.properties = ElasticVolumeProperties.fromJson(reader); + } else if ("eTag".equals(fieldName)) { + deserializedElasticVolumeInner.eTag = reader.getString(); + } else if ("zones".equals(fieldName)) { + List zones = reader.readArray(reader1 -> reader1.getString()); + deserializedElasticVolumeInner.zones = zones; + } else if ("systemData".equals(fieldName)) { + deserializedElasticVolumeInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticVolumeInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ListQuotaReportResponseInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ListQuotaReportResponseInner.java new file mode 100644 index 000000000000..e88504dd61f7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/ListQuotaReportResponseInner.java @@ -0,0 +1,88 @@ +// Copyright (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.QuotaReport; +import java.io.IOException; +import java.util.List; + +/** + * Quota Report for volume. + */ +@Immutable +public final class ListQuotaReportResponseInner implements JsonSerializable { + /* + * List of quota reports + */ + private List value; + + /** + * Creates an instance of ListQuotaReportResponseInner class. + */ + private ListQuotaReportResponseInner() { + } + + /** + * Get the value property: List of quota reports. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ListQuotaReportResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ListQuotaReportResponseInner 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 ListQuotaReportResponseInner. + */ + public static ListQuotaReportResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ListQuotaReportResponseInner deserializedListQuotaReportResponseInner = new ListQuotaReportResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> QuotaReport.fromJson(reader1)); + deserializedListQuotaReportResponseInner.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedListQuotaReportResponseInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetAppAccountInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetAppAccountInner.java index ec793e09817a..fa4ebd7949dc 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.LdapConfiguration; import com.azure.resourcemanager.netapp.models.ManagedServiceIdentity; import com.azure.resourcemanager.netapp.models.MultiAdStatus; import java.io.IOException; @@ -262,6 +263,29 @@ public MultiAdStatus multiAdStatus() { return this.innerProperties() == null ? null : this.innerProperties().multiAdStatus(); } + /** + * Get the ldapConfiguration property: LDAP Configuration for the account. + * + * @return the ldapConfiguration value. + */ + public LdapConfiguration ldapConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().ldapConfiguration(); + } + + /** + * Set the ldapConfiguration property: LDAP Configuration for the account. + * + * @param ldapConfiguration the ldapConfiguration value to set. + * @return the NetAppAccountInner object itself. + */ + public NetAppAccountInner withLdapConfiguration(LdapConfiguration ldapConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new AccountProperties(); + } + this.innerProperties().withLdapConfiguration(ldapConfiguration); + return this; + } + /** * Validates the instance. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PeeringPassphrasesInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PeeringPassphrasesInner.java new file mode 100644 index 000000000000..0f4de639e040 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/PeeringPassphrasesInner.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.fluent.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; + +/** + * The response containing peering passphrases and commands for cluster and vserver peering. + */ +@Immutable +public final class PeeringPassphrasesInner implements JsonSerializable { + /* + * The cluster peering command. + */ + private String clusterPeeringCommand; + + /* + * The cluster peering passphrase. + */ + private String clusterPeeringPassphrase; + + /* + * The vserver peering command. + */ + private String vserverPeeringCommand; + + /** + * Creates an instance of PeeringPassphrasesInner class. + */ + private PeeringPassphrasesInner() { + } + + /** + * Get the clusterPeeringCommand property: The cluster peering command. + * + * @return the clusterPeeringCommand value. + */ + public String clusterPeeringCommand() { + return this.clusterPeeringCommand; + } + + /** + * Get the clusterPeeringPassphrase property: The cluster peering passphrase. + * + * @return the clusterPeeringPassphrase value. + */ + public String clusterPeeringPassphrase() { + return this.clusterPeeringPassphrase; + } + + /** + * Get the vserverPeeringCommand property: The vserver peering command. + * + * @return the vserverPeeringCommand value. + */ + public String vserverPeeringCommand() { + return this.vserverPeeringCommand; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (clusterPeeringCommand() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property clusterPeeringCommand in model PeeringPassphrasesInner")); + } + if (clusterPeeringPassphrase() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property clusterPeeringPassphrase in model PeeringPassphrasesInner")); + } + if (vserverPeeringCommand() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property vserverPeeringCommand in model PeeringPassphrasesInner")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PeeringPassphrasesInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("clusterPeeringCommand", this.clusterPeeringCommand); + jsonWriter.writeStringField("clusterPeeringPassphrase", this.clusterPeeringPassphrase); + jsonWriter.writeStringField("vserverPeeringCommand", this.vserverPeeringCommand); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PeeringPassphrasesInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PeeringPassphrasesInner 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 PeeringPassphrasesInner. + */ + public static PeeringPassphrasesInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PeeringPassphrasesInner deserializedPeeringPassphrasesInner = new PeeringPassphrasesInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("clusterPeeringCommand".equals(fieldName)) { + deserializedPeeringPassphrasesInner.clusterPeeringCommand = reader.getString(); + } else if ("clusterPeeringPassphrase".equals(fieldName)) { + deserializedPeeringPassphrasesInner.clusterPeeringPassphrase = reader.getString(); + } else if ("vserverPeeringCommand".equals(fieldName)) { + deserializedPeeringPassphrasesInner.vserverPeeringCommand = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPeeringPassphrasesInner; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RansomwareReportInner.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RansomwareReportInner.java new file mode 100644 index 000000000000..e09288e574cb --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/RansomwareReportInner.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.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.RansomwareReportProperties; +import java.io.IOException; + +/** + * Advanced Ransomware Protection (ARP) report + * Get details of the specified Advanced Ransomware Protection report (ARP). + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, abnormal + * volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one of + * these ARP snapshots or another snapshot of your volume to restore data. + */ +@Immutable +public final class RansomwareReportInner extends ProxyResource { + /* + * Advanced Ransomware Protection reports Properties + */ + private RansomwareReportProperties 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 RansomwareReportInner class. + */ + private RansomwareReportInner() { + } + + /** + * Get the properties property: Advanced Ransomware Protection reports Properties. + * + * @return the properties value. + */ + public RansomwareReportProperties 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 RansomwareReportInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RansomwareReportInner 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 RansomwareReportInner. + */ + public static RansomwareReportInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RansomwareReportInner deserializedRansomwareReportInner = new RansomwareReportInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedRansomwareReportInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedRansomwareReportInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedRansomwareReportInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedRansomwareReportInner.properties = RansomwareReportProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedRansomwareReportInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedRansomwareReportInner; + }); + } +} 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 5a4ea7f2feb7..23790850280f 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 @@ -13,11 +13,14 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.netapp.models.AcceptGrowCapacityPoolForShortTermCloneSplit; import com.azure.resourcemanager.netapp.models.AvsDataStore; +import com.azure.resourcemanager.netapp.models.BreakthroughMode; import com.azure.resourcemanager.netapp.models.CoolAccessRetrievalPolicy; import com.azure.resourcemanager.netapp.models.CoolAccessTieringPolicy; 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; @@ -25,6 +28,7 @@ import com.azure.resourcemanager.netapp.models.ServiceLevel; import com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration; import com.azure.resourcemanager.netapp.models.SmbNonBrowsable; +import com.azure.resourcemanager.netapp.models.VolumeLanguage; import com.azure.resourcemanager.netapp.models.VolumePropertiesDataProtection; import com.azure.resourcemanager.netapp.models.VolumePropertiesExportPolicy; import com.azure.resourcemanager.netapp.models.VolumeStorageToNetworkProximity; @@ -234,9 +238,11 @@ public VolumeInner withServiceLevel(ServiceLevel serviceLevel) { /** * Get the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota - * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, - * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values - * expressed in bytes as multiples of 1 GiB. + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB + * to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples + * of 1 GiB. * * @return the usageThreshold value. */ @@ -246,9 +252,11 @@ public long usageThreshold() { /** * Set the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota - * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, - * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values - * expressed in bytes as multiples of 1 GiB. + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB + * to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples + * of 1 GiB. * * @param usageThreshold the usageThreshold value to set. * @return the VolumeInner object itself. @@ -862,6 +870,29 @@ public VolumeInner withLdapEnabled(Boolean ldapEnabled) { return this; } + /** + * Get the ldapServerType property: Specifies the type of LDAP server for a given NFS volume. + * + * @return the ldapServerType value. + */ + public LdapServerType ldapServerType() { + return this.innerProperties() == null ? null : this.innerProperties().ldapServerType(); + } + + /** + * Set the ldapServerType property: Specifies the type of LDAP server for a given NFS volume. + * + * @param ldapServerType the ldapServerType value to set. + * @return the VolumeInner object itself. + */ + public VolumeInner withLdapServerType(LdapServerType ldapServerType) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeProperties(); + } + this.innerProperties().withLdapServerType(ldapServerType); + return this; + } + /** * Get the coolAccess property: Specifies whether Cool Access(tiering) is enabled for the volume. * @@ -1321,6 +1352,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. * @@ -1339,6 +1401,52 @@ 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. + * + * @return the breakthroughMode value. + */ + public BreakthroughMode breakthroughMode() { + return this.innerProperties() == null ? null : this.innerProperties().breakthroughMode(); + } + + /** + * Set the breakthroughMode property: Specifies whether the volume operates in Breakthrough Mode. + * + * @param breakthroughMode the breakthroughMode value to set. + * @return the VolumeInner object itself. + */ + public VolumeInner withBreakthroughMode(BreakthroughMode breakthroughMode) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeProperties(); + } + this.innerProperties().withBreakthroughMode(breakthroughMode); + 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 b03bf0e90072..a719bc951111 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumePatchProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumePatchProperties.java @@ -31,8 +31,10 @@ public final class VolumePatchProperties implements JsonSerializable tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ActiveDirectoryConfigProperties properties() { + return this.innerModel().properties(); + } + + public String etag() { + return this.innerModel().etag(); + } + + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ActiveDirectoryConfigInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String activeDirectoryConfigName; + + private ActiveDirectoryConfigUpdate updateBody; + + public ActiveDirectoryConfigImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public ActiveDirectoryConfig create() { + this.innerObject = serviceManager.serviceClient() + .getActiveDirectoryConfigs() + .createOrUpdate(resourceGroupName, activeDirectoryConfigName, this.innerModel(), Context.NONE); + return this; + } + + public ActiveDirectoryConfig create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getActiveDirectoryConfigs() + .createOrUpdate(resourceGroupName, activeDirectoryConfigName, this.innerModel(), context); + return this; + } + + ActiveDirectoryConfigImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new ActiveDirectoryConfigInner(); + this.serviceManager = serviceManager; + this.activeDirectoryConfigName = name; + } + + public ActiveDirectoryConfigImpl update() { + this.updateBody = new ActiveDirectoryConfigUpdate(); + return this; + } + + public ActiveDirectoryConfig apply() { + this.innerObject = serviceManager.serviceClient() + .getActiveDirectoryConfigs() + .update(resourceGroupName, activeDirectoryConfigName, updateBody, Context.NONE); + return this; + } + + public ActiveDirectoryConfig apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getActiveDirectoryConfigs() + .update(resourceGroupName, activeDirectoryConfigName, updateBody, context); + return this; + } + + ActiveDirectoryConfigImpl(ActiveDirectoryConfigInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.activeDirectoryConfigName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "activeDirectoryConfigs"); + } + + public ActiveDirectoryConfig refresh() { + this.innerObject = serviceManager.serviceClient() + .getActiveDirectoryConfigs() + .getByResourceGroupWithResponse(resourceGroupName, activeDirectoryConfigName, Context.NONE) + .getValue(); + return this; + } + + public ActiveDirectoryConfig refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getActiveDirectoryConfigs() + .getByResourceGroupWithResponse(resourceGroupName, activeDirectoryConfigName, context) + .getValue(); + return this; + } + + public ActiveDirectoryConfigImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ActiveDirectoryConfigImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ActiveDirectoryConfigImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public ActiveDirectoryConfigImpl withProperties(ActiveDirectoryConfigProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public ActiveDirectoryConfigImpl withIdentity(ManagedServiceIdentity identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateBody.withIdentity(identity); + return this; + } + } + + public ActiveDirectoryConfigImpl withProperties(ActiveDirectoryConfigUpdateProperties properties) { + this.updateBody.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigsClientImpl.java new file mode 100644 index 000000000000..0b1642b1e178 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigsClientImpl.java @@ -0,0 +1,1468 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.fluent.ActiveDirectoryConfigsClient; +import com.azure.resourcemanager.netapp.fluent.models.ActiveDirectoryConfigInner; +import com.azure.resourcemanager.netapp.implementation.models.ActiveDirectoryConfigListResult; +import com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigUpdate; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ActiveDirectoryConfigsClient. + */ +public final class ActiveDirectoryConfigsClientImpl implements ActiveDirectoryConfigsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ActiveDirectoryConfigsService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of ActiveDirectoryConfigsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ActiveDirectoryConfigsClientImpl(NetAppManagementClientImpl client) { + this.service = RestProxy.create(ActiveDirectoryConfigsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientActiveDirectoryConfigs to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientActiveDirectoryConfigs") + public interface ActiveDirectoryConfigsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("activeDirectoryConfigName") String activeDirectoryConfigName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("activeDirectoryConfigName") String activeDirectoryConfigName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("activeDirectoryConfigName") String activeDirectoryConfigName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ActiveDirectoryConfigInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("activeDirectoryConfigName") String activeDirectoryConfigName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ActiveDirectoryConfigInner body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("activeDirectoryConfigName") String activeDirectoryConfigName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ActiveDirectoryConfigUpdate body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("activeDirectoryConfigName") String activeDirectoryConfigName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ActiveDirectoryConfigUpdate body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("activeDirectoryConfigName") String activeDirectoryConfigName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("activeDirectoryConfigName") String activeDirectoryConfigName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/activeDirectoryConfigs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/activeDirectoryConfigs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the details of the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified active directory configuration along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String activeDirectoryConfigName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (activeDirectoryConfigName == null) { + return Mono.error( + new IllegalArgumentException("Parameter activeDirectoryConfigName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the details of the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified active directory configuration on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, + String activeDirectoryConfigName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, activeDirectoryConfigName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the details of the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified active directory configuration along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String activeDirectoryConfigName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (activeDirectoryConfigName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter activeDirectoryConfigName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, accept, context); + } + + /** + * Get the details of the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified active directory configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ActiveDirectoryConfigInner getByResourceGroup(String resourceGroupName, String activeDirectoryConfigName) { + return getByResourceGroupWithResponse(resourceGroupName, activeDirectoryConfigName, Context.NONE).getValue(); + } + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return active Directory Configuration resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String activeDirectoryConfigName, ActiveDirectoryConfigInner body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (activeDirectoryConfigName == null) { + return Mono.error( + new IllegalArgumentException("Parameter activeDirectoryConfigName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, contentType, accept, + body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return active Directory Configuration resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (activeDirectoryConfigName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter activeDirectoryConfigName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, contentType, accept, body, + Context.NONE); + } + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return active Directory Configuration resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigInner body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (activeDirectoryConfigName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter activeDirectoryConfigName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, contentType, accept, body, + context); + } + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ActiveDirectoryConfigInner> beginCreateOrUpdateAsync( + String resourceGroupName, String activeDirectoryConfigName, ActiveDirectoryConfigInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, activeDirectoryConfigName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ActiveDirectoryConfigInner.class, ActiveDirectoryConfigInner.class, + this.client.getContext()); + } + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ActiveDirectoryConfigInner> beginCreateOrUpdate( + String resourceGroupName, String activeDirectoryConfigName, ActiveDirectoryConfigInner body) { + Response response = createOrUpdateWithResponse(resourceGroupName, activeDirectoryConfigName, body); + return this.client.getLroResult(response, + ActiveDirectoryConfigInner.class, ActiveDirectoryConfigInner.class, Context.NONE); + } + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ActiveDirectoryConfigInner> beginCreateOrUpdate( + String resourceGroupName, String activeDirectoryConfigName, ActiveDirectoryConfigInner body, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, activeDirectoryConfigName, body, context); + return this.client.getLroResult(response, + ActiveDirectoryConfigInner.class, ActiveDirectoryConfigInner.class, context); + } + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return active Directory Configuration resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, + String activeDirectoryConfigName, ActiveDirectoryConfigInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, activeDirectoryConfigName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ActiveDirectoryConfigInner createOrUpdate(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigInner body) { + return beginCreateOrUpdate(resourceGroupName, activeDirectoryConfigName, body).getFinalResult(); + } + + /** + * Create or update the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ActiveDirectoryConfigInner createOrUpdate(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, activeDirectoryConfigName, body, context).getFinalResult(); + } + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return active Directory Configuration resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, + String activeDirectoryConfigName, ActiveDirectoryConfigUpdate body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (activeDirectoryConfigName == null) { + return Mono.error( + new IllegalArgumentException("Parameter activeDirectoryConfigName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, contentType, accept, + body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return active Directory Configuration resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigUpdate body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (activeDirectoryConfigName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter activeDirectoryConfigName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, contentType, accept, body, + Context.NONE); + } + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return active Directory Configuration resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigUpdate body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (activeDirectoryConfigName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter activeDirectoryConfigName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, contentType, accept, body, + context); + } + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ActiveDirectoryConfigInner> + beginUpdateAsync(String resourceGroupName, String activeDirectoryConfigName, ActiveDirectoryConfigUpdate body) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, activeDirectoryConfigName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ActiveDirectoryConfigInner.class, ActiveDirectoryConfigInner.class, + this.client.getContext()); + } + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ActiveDirectoryConfigInner> + beginUpdate(String resourceGroupName, String activeDirectoryConfigName, ActiveDirectoryConfigUpdate body) { + Response response = updateWithResponse(resourceGroupName, activeDirectoryConfigName, body); + return this.client.getLroResult(response, + ActiveDirectoryConfigInner.class, ActiveDirectoryConfigInner.class, Context.NONE); + } + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ActiveDirectoryConfigInner> beginUpdate( + String resourceGroupName, String activeDirectoryConfigName, ActiveDirectoryConfigUpdate body, Context context) { + Response response = updateWithResponse(resourceGroupName, activeDirectoryConfigName, body, context); + return this.client.getLroResult(response, + ActiveDirectoryConfigInner.class, ActiveDirectoryConfigInner.class, context); + } + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return active Directory Configuration resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigUpdate body) { + return beginUpdateAsync(resourceGroupName, activeDirectoryConfigName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ActiveDirectoryConfigInner update(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigUpdate body) { + return beginUpdate(resourceGroupName, activeDirectoryConfigName, body).getFinalResult(); + } + + /** + * Patch the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return active Directory Configuration resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ActiveDirectoryConfigInner update(String resourceGroupName, String activeDirectoryConfigName, + ActiveDirectoryConfigUpdate body, Context context) { + return beginUpdate(resourceGroupName, activeDirectoryConfigName, body, context).getFinalResult(); + } + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String activeDirectoryConfigName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (activeDirectoryConfigName == null) { + return Mono.error( + new IllegalArgumentException("Parameter activeDirectoryConfigName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String activeDirectoryConfigName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (activeDirectoryConfigName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter activeDirectoryConfigName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, Context.NONE); + } + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String activeDirectoryConfigName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (activeDirectoryConfigName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter activeDirectoryConfigName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, activeDirectoryConfigName, context); + } + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String activeDirectoryConfigName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, activeDirectoryConfigName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String activeDirectoryConfigName) { + Response response = deleteWithResponse(resourceGroupName, activeDirectoryConfigName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String activeDirectoryConfigName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, activeDirectoryConfigName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String activeDirectoryConfigName) { + return beginDeleteAsync(resourceGroupName, activeDirectoryConfigName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String activeDirectoryConfigName) { + beginDelete(resourceGroupName, activeDirectoryConfigName).getFinalResult(); + } + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String activeDirectoryConfigName, Context context) { + beginDelete(resourceGroupName, activeDirectoryConfigName, context).getFinalResult(); + } + + /** + * List all active directory configurations within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all active directory configurations within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List all active directory configurations within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all active directory configurations within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all active directory configurations within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); + } + + /** + * List all active directory configurations within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * List all active directory configurations within the subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all active directory configurations within the subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List all active directory configurations within the subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all active directory configurations within the subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all active directory configurations within the subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); + } + + /** + * List all active directory configurations within the subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, + Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, + Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(ActiveDirectoryConfigsClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigsImpl.java new file mode 100644 index 000000000000..65b2bf78f479 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigsImpl.java @@ -0,0 +1,149 @@ +// Copyright (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); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ActiveDirectoryConfigImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + 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/BucketGenerateCredentialsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BucketGenerateCredentialsImpl.java new file mode 100644 index 000000000000..25e06d43df16 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BucketGenerateCredentialsImpl.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.implementation; + +import com.azure.resourcemanager.netapp.fluent.models.BucketGenerateCredentialsInner; +import com.azure.resourcemanager.netapp.models.BucketGenerateCredentials; +import java.time.OffsetDateTime; + +public final class BucketGenerateCredentialsImpl implements BucketGenerateCredentials { + private BucketGenerateCredentialsInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + BucketGenerateCredentialsImpl(BucketGenerateCredentialsInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String accessKey() { + return this.innerModel().accessKey(); + } + + public String secretKey() { + return this.innerModel().secretKey(); + } + + public OffsetDateTime keyPairExpiry() { + return this.innerModel().keyPairExpiry(); + } + + public BucketGenerateCredentialsInner 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/BucketImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BucketImpl.java new file mode 100644 index 000000000000..3abddea8d745 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BucketImpl.java @@ -0,0 +1,223 @@ +// Copyright (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.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.BucketInner; +import com.azure.resourcemanager.netapp.models.Bucket; +import com.azure.resourcemanager.netapp.models.BucketCredentialsExpiry; +import com.azure.resourcemanager.netapp.models.BucketGenerateCredentials; +import com.azure.resourcemanager.netapp.models.BucketPatch; +import com.azure.resourcemanager.netapp.models.BucketPatchPermissions; +import com.azure.resourcemanager.netapp.models.BucketPermissions; +import com.azure.resourcemanager.netapp.models.BucketServerPatchProperties; +import com.azure.resourcemanager.netapp.models.BucketServerProperties; +import com.azure.resourcemanager.netapp.models.CredentialsStatus; +import com.azure.resourcemanager.netapp.models.FileSystemUser; +import com.azure.resourcemanager.netapp.models.ProvisioningState; + +public final class BucketImpl implements Bucket, Bucket.Definition, Bucket.Update { + private BucketInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String path() { + return this.innerModel().path(); + } + + public FileSystemUser fileSystemUser() { + return this.innerModel().fileSystemUser(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public CredentialsStatus status() { + return this.innerModel().status(); + } + + public BucketServerProperties server() { + return this.innerModel().server(); + } + + public BucketPermissions permissions() { + return this.innerModel().permissions(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public BucketInner 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 bucketName; + + private BucketPatch updateBody; + + public BucketImpl withExistingVolume(String resourceGroupName, String accountName, String poolName, + String volumeName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + this.poolName = poolName; + this.volumeName = volumeName; + return this; + } + + public Bucket create() { + this.innerObject = serviceManager.serviceClient() + .getBuckets() + .createOrUpdate(resourceGroupName, accountName, poolName, volumeName, bucketName, this.innerModel(), + Context.NONE); + return this; + } + + public Bucket create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getBuckets() + .createOrUpdate(resourceGroupName, accountName, poolName, volumeName, bucketName, this.innerModel(), + context); + return this; + } + + BucketImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new BucketInner(); + this.serviceManager = serviceManager; + this.bucketName = name; + } + + public BucketImpl update() { + this.updateBody = new BucketPatch(); + return this; + } + + public Bucket apply() { + this.innerObject = serviceManager.serviceClient() + .getBuckets() + .update(resourceGroupName, accountName, poolName, volumeName, bucketName, updateBody, Context.NONE); + return this; + } + + public Bucket apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getBuckets() + .update(resourceGroupName, accountName, poolName, volumeName, bucketName, updateBody, context); + return this; + } + + BucketImpl(BucketInner 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(), "netAppAccounts"); + this.poolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "capacityPools"); + this.volumeName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "volumes"); + this.bucketName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "buckets"); + } + + public Bucket refresh() { + this.innerObject = serviceManager.serviceClient() + .getBuckets() + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, bucketName, Context.NONE) + .getValue(); + return this; + } + + public Bucket refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getBuckets() + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, bucketName, context) + .getValue(); + return this; + } + + public Response generateCredentialsWithResponse(BucketCredentialsExpiry body, + Context context) { + return serviceManager.buckets() + .generateCredentialsWithResponse(resourceGroupName, accountName, poolName, volumeName, bucketName, body, + context); + } + + public BucketGenerateCredentials generateCredentials(BucketCredentialsExpiry body) { + return serviceManager.buckets() + .generateCredentials(resourceGroupName, accountName, poolName, volumeName, bucketName, body); + } + + public BucketImpl withPath(String path) { + if (isInCreateMode()) { + this.innerModel().withPath(path); + return this; + } else { + this.updateBody.withPath(path); + return this; + } + } + + public BucketImpl withFileSystemUser(FileSystemUser fileSystemUser) { + if (isInCreateMode()) { + this.innerModel().withFileSystemUser(fileSystemUser); + return this; + } else { + this.updateBody.withFileSystemUser(fileSystemUser); + return this; + } + } + + public BucketImpl withServer(BucketServerProperties server) { + this.innerModel().withServer(server); + return this; + } + + public BucketImpl withPermissions(BucketPermissions permissions) { + this.innerModel().withPermissions(permissions); + return this; + } + + public BucketImpl withServer(BucketServerPatchProperties server) { + this.updateBody.withServer(server); + return this; + } + + public BucketImpl withPermissions(BucketPatchPermissions permissions) { + this.updateBody.withPermissions(permissions); + 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/BucketsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BucketsClientImpl.java new file mode 100644 index 000000000000..3c5beaf35d8e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BucketsClientImpl.java @@ -0,0 +1,1725 @@ +// Copyright (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.BucketsClient; +import com.azure.resourcemanager.netapp.fluent.models.BucketGenerateCredentialsInner; +import com.azure.resourcemanager.netapp.fluent.models.BucketInner; +import com.azure.resourcemanager.netapp.implementation.models.BucketList; +import com.azure.resourcemanager.netapp.models.BucketCredentialsExpiry; +import com.azure.resourcemanager.netapp.models.BucketPatch; +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 BucketsClient. + */ +public final class BucketsClientImpl implements BucketsClient { + /** + * The proxy service used to perform REST calls. + */ + private final BucketsService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of BucketsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + BucketsClientImpl(NetAppManagementClientImpl client) { + this.service = RestProxy.create(BucketsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientBuckets to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientBuckets") + public interface BucketsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}") + @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("bucketName") String bucketName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}") + @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("bucketName") String bucketName, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}") + @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("bucketName") String bucketName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BucketInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}") + @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("bucketName") String bucketName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BucketInner body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}") + @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, + @PathParam("bucketName") String bucketName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BucketPatch body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}") + @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, + @PathParam("bucketName") String bucketName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BucketPatch body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}") + @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("bucketName") String bucketName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}") + @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("bucketName") String bucketName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@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/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@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); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}/generateCredentials") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> generateCredentials(@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("bucketName") String bucketName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BucketCredentialsExpiry body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}/generateCredentials") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response generateCredentialsSync(@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("bucketName") String bucketName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BucketCredentialsExpiry body, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@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 listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the details of the specified volume's bucket. A bucket allows additional services, such as AI services, + * connect to the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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's bucket 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 bucketName) { + 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 (bucketName == null) { + return Mono.error(new IllegalArgumentException("Parameter bucketName 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, bucketName, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the details of the specified volume's bucket. A bucket allows additional services, such as AI services, + * connect to the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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's bucket on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName) { + return getWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, bucketName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the details of the specified volume's bucket. A bucket allows additional services, such as AI services, + * connect to the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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's bucket along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String bucketName, 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 (bucketName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter bucketName 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, bucketName, accept, context); + } + + /** + * Get the details of the specified volume's bucket. A bucket allows additional services, such as AI services, + * connect to the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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's bucket. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BucketInner get(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName) { + return getWithResponse(resourceGroupName, accountName, poolName, volumeName, bucketName, Context.NONE) + .getValue(); + } + + /** + * Creates or updates a bucket for a volume. A bucket allows additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket 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, String bucketName, BucketInner 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 (bucketName == null) { + return Mono.error(new IllegalArgumentException("Parameter bucketName 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, bucketName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a bucket for a volume. A bucket allows additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String accountName, + String poolName, String volumeName, String bucketName, BucketInner 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 (bucketName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter bucketName 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, bucketName, + contentType, accept, body, Context.NONE); + } + + /** + * Creates or updates a bucket for a volume. A bucket allows additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String accountName, + String poolName, String volumeName, String bucketName, BucketInner 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 (bucketName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter bucketName 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, bucketName, + contentType, accept, body, context); + } + + /** + * Creates or updates a bucket for a volume. A bucket allows additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 bucket resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, BucketInner> beginCreateOrUpdateAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, String bucketName, BucketInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, bucketName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BucketInner.class, BucketInner.class, this.client.getContext()); + } + + /** + * Creates or updates a bucket for a volume. A bucket allows additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of bucket resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BucketInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String poolName, String volumeName, String bucketName, BucketInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, accountName, poolName, volumeName, bucketName, body); + return this.client.getLroResult(response, BucketInner.class, BucketInner.class, + Context.NONE); + } + + /** + * Creates or updates a bucket for a volume. A bucket allows additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of bucket resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BucketInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String poolName, String volumeName, String bucketName, BucketInner body, Context context) { + Response response = createOrUpdateWithResponse(resourceGroupName, accountName, poolName, volumeName, + bucketName, body, context); + return this.client.getLroResult(response, BucketInner.class, BucketInner.class, + context); + } + + /** + * Creates or updates a bucket for a volume. A bucket allows additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String accountName, String poolName, + String volumeName, String bucketName, BucketInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, poolName, volumeName, bucketName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a bucket for a volume. A bucket allows additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BucketInner createOrUpdate(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName, BucketInner body) { + return beginCreateOrUpdate(resourceGroupName, accountName, poolName, volumeName, bucketName, body) + .getFinalResult(); + } + + /** + * Creates or updates a bucket for a volume. A bucket allows additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BucketInner createOrUpdate(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName, BucketInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, accountName, poolName, volumeName, bucketName, body, context) + .getFinalResult(); + } + + /** + * Updates the details of a volume bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket 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, String bucketName, BucketPatch 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 (bucketName == null) { + return Mono.error(new IllegalArgumentException("Parameter bucketName 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, bucketName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates the details of a volume bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String bucketName, BucketPatch 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 (bucketName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter bucketName 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, bucketName, + contentType, accept, body, Context.NONE); + } + + /** + * Updates the details of a volume bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String bucketName, BucketPatch 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 (bucketName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter bucketName 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, bucketName, + contentType, accept, body, context); + } + + /** + * Updates the details of a volume bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 bucket resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, BucketInner> beginUpdateAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, String bucketName, BucketPatch body) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, bucketName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BucketInner.class, BucketInner.class, this.client.getContext()); + } + + /** + * Updates the details of a volume bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of bucket resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BucketInner> beginUpdate(String resourceGroupName, String accountName, + String poolName, String volumeName, String bucketName, BucketPatch body) { + Response response + = updateWithResponse(resourceGroupName, accountName, poolName, volumeName, bucketName, body); + return this.client.getLroResult(response, BucketInner.class, BucketInner.class, + Context.NONE); + } + + /** + * Updates the details of a volume bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of bucket resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BucketInner> beginUpdate(String resourceGroupName, String accountName, + String poolName, String volumeName, String bucketName, BucketPatch body, Context context) { + Response response + = updateWithResponse(resourceGroupName, accountName, poolName, volumeName, bucketName, body, context); + return this.client.getLroResult(response, BucketInner.class, BucketInner.class, + context); + } + + /** + * Updates the details of a volume bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String accountName, String poolName, + String volumeName, String bucketName, BucketPatch body) { + return beginUpdateAsync(resourceGroupName, accountName, poolName, volumeName, bucketName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates the details of a volume bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BucketInner update(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName, BucketPatch body) { + return beginUpdate(resourceGroupName, accountName, poolName, volumeName, bucketName, body).getFinalResult(); + } + + /** + * Updates the details of a volume bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket details including user details, and the volume path that should be mounted inside the + * bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BucketInner update(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName, BucketPatch body, Context context) { + return beginUpdate(resourceGroupName, accountName, poolName, volumeName, bucketName, body, context) + .getFinalResult(); + } + + /** + * Delete a volume's bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 bucketName) { + 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 (bucketName == null) { + return Mono.error(new IllegalArgumentException("Parameter bucketName 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, bucketName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a volume's bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 bucketName) { + 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 (bucketName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter bucketName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, bucketName, + Context.NONE); + } + + /** + * Delete a volume's bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 bucketName, 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 (bucketName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter bucketName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, bucketName, context); + } + + /** + * Delete a volume's bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 bucketName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, bucketName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a volume's bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 bucketName) { + Response response + = deleteWithResponse(resourceGroupName, accountName, poolName, volumeName, bucketName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete a volume's bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 bucketName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, accountName, poolName, volumeName, bucketName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete a volume's bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 bucketName) { + return beginDeleteAsync(resourceGroupName, accountName, poolName, volumeName, bucketName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a volume's bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 bucketName) { + beginDelete(resourceGroupName, accountName, poolName, volumeName, bucketName).getFinalResult(); + } + + /** + * Delete a volume's bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 bucketName, Context context) { + beginDelete(resourceGroupName, accountName, poolName, volumeName, bucketName, context).getFinalResult(); + } + + /** + * Describes all buckets belonging to a volume. Buckets allow additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of volume bucket resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(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.list(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())); + } + + /** + * Describes all buckets belonging to a volume. Buckets allow additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of volume bucket resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String accountName, String poolName, + String volumeName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, poolName, volumeName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Describes all buckets belonging to a volume. Buckets allow additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of volume bucket resources along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(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.listSync(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); + } + + /** + * Describes all buckets belonging to a volume. Buckets allow additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of volume bucket resources along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(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.listSync(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); + } + + /** + * Describes all buckets belonging to a volume. Buckets allow additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of volume bucket resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String accountName, String poolName, + String volumeName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, accountName, poolName, volumeName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * Describes all buckets belonging to a volume. Buckets allow additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of volume bucket resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, accountName, poolName, volumeName, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Generate the access key and secret key used for accessing the specified volume bucket. Also return expiry date + * and time of key pair (in UTC). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket's Access and Secret key pair expiry time expressed as the number of days from now. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket Access Key, Secret Key, and Expiry date and time of the key pair along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> generateCredentialsWithResponseAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, String bucketName, + BucketCredentialsExpiry 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 (bucketName == null) { + return Mono.error(new IllegalArgumentException("Parameter bucketName 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.generateCredentials(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, bucketName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Generate the access key and secret key used for accessing the specified volume bucket. Also return expiry date + * and time of key pair (in UTC). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket's Access and Secret key pair expiry time expressed as the number of days from now. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket Access Key, Secret Key, and Expiry date and time of the key pair on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono generateCredentialsAsync(String resourceGroupName, String accountName, + String poolName, String volumeName, String bucketName, BucketCredentialsExpiry body) { + return generateCredentialsWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, bucketName, + body).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Generate the access key and secret key used for accessing the specified volume bucket. Also return expiry date + * and time of key pair (in UTC). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket's Access and Secret key pair expiry time expressed as the number of days from now. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket Access Key, Secret Key, and Expiry date and time of the key pair along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response generateCredentialsWithResponse(String resourceGroupName, + String accountName, String poolName, String volumeName, String bucketName, BucketCredentialsExpiry 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 (bucketName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter bucketName 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.generateCredentialsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, bucketName, + contentType, accept, body, context); + } + + /** + * Generate the access key and secret key used for accessing the specified volume bucket. Also return expiry date + * and time of key pair (in UTC). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket's Access and Secret key pair expiry time expressed as the number of days from now. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket Access Key, Secret Key, and Expiry date and time of the key pair. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BucketGenerateCredentialsInner generateCredentials(String resourceGroupName, String accountName, + String poolName, String volumeName, String bucketName, BucketCredentialsExpiry body) { + return generateCredentialsWithResponse(resourceGroupName, accountName, poolName, volumeName, bucketName, 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 list of volume bucket resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 volume bucket resources along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(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.listNextSync(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 volume bucket resources along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(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.listNextSync(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(BucketsClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BucketsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BucketsImpl.java new file mode 100644 index 000000000000..3dee45a2b9ac --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/BucketsImpl.java @@ -0,0 +1,231 @@ +// Copyright (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.BucketsClient; +import com.azure.resourcemanager.netapp.fluent.models.BucketGenerateCredentialsInner; +import com.azure.resourcemanager.netapp.fluent.models.BucketInner; +import com.azure.resourcemanager.netapp.models.Bucket; +import com.azure.resourcemanager.netapp.models.BucketCredentialsExpiry; +import com.azure.resourcemanager.netapp.models.BucketGenerateCredentials; +import com.azure.resourcemanager.netapp.models.Buckets; + +public final class BucketsImpl implements Buckets { + private static final ClientLogger LOGGER = new ClientLogger(BucketsImpl.class); + + private final BucketsClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public BucketsImpl(BucketsClient 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 bucketName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, bucketName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new BucketImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Bucket get(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName) { + BucketInner inner = this.serviceClient().get(resourceGroupName, accountName, poolName, volumeName, bucketName); + if (inner != null) { + return new BucketImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName) { + this.serviceClient().delete(resourceGroupName, accountName, poolName, volumeName, bucketName); + } + + public void delete(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName, Context context) { + this.serviceClient().delete(resourceGroupName, accountName, poolName, volumeName, bucketName, context); + } + + public PagedIterable list(String resourceGroupName, String accountName, String poolName, + String volumeName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, accountName, poolName, volumeName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BucketImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String accountName, String poolName, String volumeName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, accountName, poolName, volumeName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BucketImpl(inner1, this.manager())); + } + + public Response generateCredentialsWithResponse(String resourceGroupName, + String accountName, String poolName, String volumeName, String bucketName, BucketCredentialsExpiry body, + Context context) { + Response inner = this.serviceClient() + .generateCredentialsWithResponse(resourceGroupName, accountName, poolName, volumeName, bucketName, body, + context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new BucketGenerateCredentialsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public BucketGenerateCredentials generateCredentials(String resourceGroupName, String accountName, String poolName, + String volumeName, String bucketName, BucketCredentialsExpiry body) { + BucketGenerateCredentialsInner inner = this.serviceClient() + .generateCredentials(resourceGroupName, accountName, poolName, volumeName, bucketName, body); + if (inner != null) { + return new BucketGenerateCredentialsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Bucket 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, "netAppAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); + } + String bucketName = ResourceManagerUtils.getValueFromIdByName(id, "buckets"); + if (bucketName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'buckets'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, poolName, volumeName, bucketName, 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, "netAppAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); + } + String bucketName = ResourceManagerUtils.getValueFromIdByName(id, "buckets"); + if (bucketName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'buckets'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, poolName, volumeName, bucketName, 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, "netAppAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); + } + String bucketName = ResourceManagerUtils.getValueFromIdByName(id, "buckets"); + if (bucketName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'buckets'.", id))); + } + this.delete(resourceGroupName, accountName, poolName, volumeName, bucketName, 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, "netAppAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "volumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'volumes'.", id))); + } + String bucketName = ResourceManagerUtils.getValueFromIdByName(id, "buckets"); + if (bucketName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'buckets'.", id))); + } + this.delete(resourceGroupName, accountName, poolName, volumeName, bucketName, context); + } + + private BucketsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public BucketImpl define(String name) { + return new BucketImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CacheImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CacheImpl.java new file mode 100644 index 000000000000..6166ad27377d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CacheImpl.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.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.CacheInner; +import com.azure.resourcemanager.netapp.models.Cache; +import com.azure.resourcemanager.netapp.models.CacheProperties; +import com.azure.resourcemanager.netapp.models.CacheUpdate; +import com.azure.resourcemanager.netapp.models.CacheUpdateProperties; +import com.azure.resourcemanager.netapp.models.PeeringPassphrases; +import com.azure.resourcemanager.netapp.models.PoolChangeRequest; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class CacheImpl implements Cache, Cache.Definition, Cache.Update { + private CacheInner 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 CacheProperties 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 CacheInner 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 cacheName; + + private CacheUpdate updateBody; + + public CacheImpl withExistingCapacityPool(String resourceGroupName, String accountName, String poolName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + this.poolName = poolName; + return this; + } + + public Cache create() { + this.innerObject = serviceManager.serviceClient() + .getCaches() + .createOrUpdate(resourceGroupName, accountName, poolName, cacheName, this.innerModel(), Context.NONE); + return this; + } + + public Cache create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getCaches() + .createOrUpdate(resourceGroupName, accountName, poolName, cacheName, this.innerModel(), context); + return this; + } + + CacheImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new CacheInner(); + this.serviceManager = serviceManager; + this.cacheName = name; + } + + public CacheImpl update() { + this.updateBody = new CacheUpdate(); + return this; + } + + public Cache apply() { + this.innerObject = serviceManager.serviceClient() + .getCaches() + .update(resourceGroupName, accountName, poolName, cacheName, updateBody, Context.NONE); + return this; + } + + public Cache apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getCaches() + .update(resourceGroupName, accountName, poolName, cacheName, updateBody, context); + return this; + } + + CacheImpl(CacheInner 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(), "netAppAccounts"); + this.poolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "capacityPools"); + this.cacheName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "caches"); + } + + public Cache refresh() { + this.innerObject = serviceManager.serviceClient() + .getCaches() + .getWithResponse(resourceGroupName, accountName, poolName, cacheName, Context.NONE) + .getValue(); + return this; + } + + public Cache refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getCaches() + .getWithResponse(resourceGroupName, accountName, poolName, cacheName, context) + .getValue(); + return this; + } + + public Response listPeeringPassphrasesWithResponse(Context context) { + return serviceManager.caches() + .listPeeringPassphrasesWithResponse(resourceGroupName, accountName, poolName, cacheName, context); + } + + public PeeringPassphrases listPeeringPassphrases() { + return serviceManager.caches().listPeeringPassphrases(resourceGroupName, accountName, poolName, cacheName); + } + + public Cache poolChange(PoolChangeRequest body) { + return serviceManager.caches().poolChange(resourceGroupName, accountName, poolName, cacheName, body); + } + + public Cache poolChange(PoolChangeRequest body, Context context) { + return serviceManager.caches().poolChange(resourceGroupName, accountName, poolName, cacheName, body, context); + } + + public CacheImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public CacheImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public CacheImpl withProperties(CacheProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public CacheImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public CacheImpl withZones(List zones) { + this.innerModel().withZones(zones); + return this; + } + + public CacheImpl withProperties(CacheUpdateProperties 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/CachesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesClientImpl.java new file mode 100644 index 000000000000..2a78888e1a17 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesClientImpl.java @@ -0,0 +1,1857 @@ +// Copyright (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.CachesClient; +import com.azure.resourcemanager.netapp.fluent.models.CacheInner; +import com.azure.resourcemanager.netapp.fluent.models.PeeringPassphrasesInner; +import com.azure.resourcemanager.netapp.implementation.models.CacheList; +import com.azure.resourcemanager.netapp.models.CacheUpdate; +import com.azure.resourcemanager.netapp.models.PoolChangeRequest; +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 CachesClient. + */ +public final class CachesClientImpl implements CachesClient { + /** + * The proxy service used to perform REST calls. + */ + private final CachesService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of CachesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + CachesClientImpl(NetAppManagementClientImpl client) { + this.service = RestProxy.create(CachesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientCaches to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientCaches") + public interface CachesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}") + @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("cacheName") String cacheName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}") + @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("cacheName") String cacheName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}") + @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("cacheName") String cacheName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CacheInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}") + @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("cacheName") String cacheName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CacheInner body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}") + @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("cacheName") String cacheName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CacheUpdate body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}") + @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("cacheName") String cacheName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CacheUpdate body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}") + @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("cacheName") String cacheName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}") + @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("cacheName") String cacheName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByCapacityPools(@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/netAppAccounts/{accountName}/capacityPools/{poolName}/caches") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByCapacityPoolsSync(@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" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}/listPeeringPassphrases") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listPeeringPassphrases(@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("cacheName") String cacheName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}/listPeeringPassphrases") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listPeeringPassphrasesSync(@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("cacheName") String cacheName, + @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}/poolChange") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> poolChange(@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("cacheName") String cacheName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PoolChangeRequest body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}/poolChange") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response poolChangeSync(@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("cacheName") String cacheName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PoolChangeRequest body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByCapacityPoolsNext( + @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 listByCapacityPoolsNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the details of the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Cache along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String accountName, + String poolName, String cacheName) { + 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 (cacheName == null) { + return Mono.error(new IllegalArgumentException("Parameter cacheName 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, cacheName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the details of the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Cache on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String accountName, String poolName, String cacheName) { + return getWithResponseAsync(resourceGroupName, accountName, poolName, cacheName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the details of the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Cache along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String accountName, String poolName, + String cacheName, 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 (cacheName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cacheName 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, cacheName, accept, context); + } + + /** + * Get the details of the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Cache. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CacheInner get(String resourceGroupName, String accountName, String poolName, String cacheName) { + return getWithResponse(resourceGroupName, accountName, poolName, cacheName, Context.NONE).getValue(); + } + + /** + * Create or update the specified Cache within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @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 cache 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 cacheName, CacheInner 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 (cacheName == null) { + return Mono.error(new IllegalArgumentException("Parameter cacheName 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, cacheName, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update the specified Cache within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @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 cache resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String accountName, + String poolName, String cacheName, CacheInner 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 (cacheName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cacheName 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, cacheName, contentType, accept, + body, Context.NONE); + } + + /** + * Create or update the specified Cache within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @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 cache resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String accountName, + String poolName, String cacheName, CacheInner 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 (cacheName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cacheName 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, cacheName, contentType, accept, + body, context); + } + + /** + * Create or update the specified Cache within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @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 cache resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CacheInner> beginCreateOrUpdateAsync(String resourceGroupName, + String accountName, String poolName, String cacheName, CacheInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, accountName, poolName, cacheName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), CacheInner.class, + CacheInner.class, this.client.getContext()); + } + + /** + * Create or update the specified Cache within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @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 cache resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CacheInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String poolName, String cacheName, CacheInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, accountName, poolName, cacheName, body); + return this.client.getLroResult(response, CacheInner.class, CacheInner.class, + Context.NONE); + } + + /** + * Create or update the specified Cache within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @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 cache resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CacheInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String poolName, String cacheName, CacheInner body, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, accountName, poolName, cacheName, body, context); + return this.client.getLroResult(response, CacheInner.class, CacheInner.class, context); + } + + /** + * Create or update the specified Cache within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @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 cache resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String accountName, String poolName, + String cacheName, CacheInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, poolName, cacheName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update the specified Cache within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @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 cache resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CacheInner createOrUpdate(String resourceGroupName, String accountName, String poolName, String cacheName, + CacheInner body) { + return beginCreateOrUpdate(resourceGroupName, accountName, poolName, cacheName, body).getFinalResult(); + } + + /** + * Create or update the specified Cache within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @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 cache resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CacheInner createOrUpdate(String resourceGroupName, String accountName, String poolName, String cacheName, + CacheInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, accountName, poolName, cacheName, body, context).getFinalResult(); + } + + /** + * Patch the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @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 cache 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 cacheName, CacheUpdate 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 (cacheName == null) { + return Mono.error(new IllegalArgumentException("Parameter cacheName 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, cacheName, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @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 cache resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String accountName, String poolName, + String cacheName, CacheUpdate 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 (cacheName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cacheName 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, cacheName, contentType, accept, + body, Context.NONE); + } + + /** + * Patch the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @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 cache resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String accountName, String poolName, + String cacheName, CacheUpdate 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 (cacheName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cacheName 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, cacheName, contentType, accept, + body, context); + } + + /** + * Patch the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @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 cache resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CacheInner> beginUpdateAsync(String resourceGroupName, + String accountName, String poolName, String cacheName, CacheUpdate body) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, accountName, poolName, cacheName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), CacheInner.class, + CacheInner.class, this.client.getContext()); + } + + /** + * Patch the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @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 cache resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CacheInner> beginUpdate(String resourceGroupName, String accountName, + String poolName, String cacheName, CacheUpdate body) { + Response response = updateWithResponse(resourceGroupName, accountName, poolName, cacheName, body); + return this.client.getLroResult(response, CacheInner.class, CacheInner.class, + Context.NONE); + } + + /** + * Patch the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @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 cache resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CacheInner> beginUpdate(String resourceGroupName, String accountName, + String poolName, String cacheName, CacheUpdate body, Context context) { + Response response + = updateWithResponse(resourceGroupName, accountName, poolName, cacheName, body, context); + return this.client.getLroResult(response, CacheInner.class, CacheInner.class, context); + } + + /** + * Patch the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @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 cache resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String accountName, String poolName, + String cacheName, CacheUpdate body) { + return beginUpdateAsync(resourceGroupName, accountName, poolName, cacheName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @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 cache resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CacheInner update(String resourceGroupName, String accountName, String poolName, String cacheName, + CacheUpdate body) { + return beginUpdate(resourceGroupName, accountName, poolName, cacheName, body).getFinalResult(); + } + + /** + * Patch the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @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 cache resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CacheInner update(String resourceGroupName, String accountName, String poolName, String cacheName, + CacheUpdate body, Context context) { + return beginUpdate(resourceGroupName, accountName, poolName, cacheName, body, context).getFinalResult(); + } + + /** + * Delete the specified cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 cacheName) { + 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 (cacheName == null) { + return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, cacheName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete the specified cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 cacheName) { + 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 (cacheName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cacheName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, cacheName, Context.NONE); + } + + /** + * Delete the specified cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 cacheName, 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 (cacheName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cacheName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, cacheName, context); + } + + /** + * Delete the specified cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 cacheName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, accountName, poolName, cacheName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete the specified cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 cacheName) { + Response response = deleteWithResponse(resourceGroupName, accountName, poolName, cacheName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete the specified cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 cacheName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, accountName, poolName, cacheName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete the specified cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 cacheName) { + return beginDeleteAsync(resourceGroupName, accountName, poolName, cacheName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the specified cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 cacheName) { + beginDelete(resourceGroupName, accountName, poolName, cacheName).getFinalResult(); + } + + /** + * Delete the specified cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 cacheName, + Context context) { + beginDelete(resourceGroupName, accountName, poolName, cacheName, context).getFinalResult(); + } + + /** + * List all Caches within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Cache resources along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByCapacityPoolsSinglePageAsync(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.listByCapacityPools(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 Caches within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Cache resources as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByCapacityPoolsAsync(String resourceGroupName, String accountName, + String poolName) { + return new PagedFlux<>(() -> listByCapacityPoolsSinglePageAsync(resourceGroupName, accountName, poolName), + nextLink -> listByCapacityPoolsNextSinglePageAsync(nextLink)); + } + + /** + * List all Caches within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Cache resources along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByCapacityPoolsSinglePage(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.listByCapacityPoolsSync(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 Caches within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Cache resources along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByCapacityPoolsSinglePage(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.listByCapacityPoolsSync(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 Caches within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Cache resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCapacityPools(String resourceGroupName, String accountName, + String poolName) { + return new PagedIterable<>(() -> listByCapacityPoolsSinglePage(resourceGroupName, accountName, poolName), + nextLink -> listByCapacityPoolsNextSinglePage(nextLink)); + } + + /** + * List all Caches within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Cache resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCapacityPools(String resourceGroupName, String accountName, String poolName, + Context context) { + return new PagedIterable<>( + () -> listByCapacityPoolsSinglePage(resourceGroupName, accountName, poolName, context), + nextLink -> listByCapacityPoolsNextSinglePage(nextLink, context)); + } + + /** + * This operation will list the cluster peering command, cluster peering passphrase and the vserver peering command. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response containing peering passphrases and commands for cluster and vserver peering along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPeeringPassphrasesWithResponseAsync(String resourceGroupName, + String accountName, String poolName, String cacheName) { + 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 (cacheName == null) { + return Mono.error(new IllegalArgumentException("Parameter cacheName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listPeeringPassphrases(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, + cacheName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * This operation will list the cluster peering command, cluster peering passphrase and the vserver peering command. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response containing peering passphrases and commands for cluster and vserver peering on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listPeeringPassphrasesAsync(String resourceGroupName, String accountName, + String poolName, String cacheName) { + return listPeeringPassphrasesWithResponseAsync(resourceGroupName, accountName, poolName, cacheName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * This operation will list the cluster peering command, cluster peering passphrase and the vserver peering command. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response containing peering passphrases and commands for cluster and vserver peering along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listPeeringPassphrasesWithResponse(String resourceGroupName, + String accountName, String poolName, String cacheName, 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 (cacheName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cacheName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.listPeeringPassphrasesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, cacheName, accept, context); + } + + /** + * This operation will list the cluster peering command, cluster peering passphrase and the vserver peering command. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response containing peering passphrases and commands for cluster and vserver peering. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PeeringPassphrasesInner listPeeringPassphrases(String resourceGroupName, String accountName, String poolName, + String cacheName) { + return listPeeringPassphrasesWithResponse(resourceGroupName, accountName, poolName, cacheName, Context.NONE) + .getValue(); + } + + /** + * Moves Cache to another Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body Move cache to the pool supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> poolChangeWithResponseAsync(String resourceGroupName, String accountName, + String poolName, String cacheName, PoolChangeRequest 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 (cacheName == null) { + return Mono.error(new IllegalArgumentException("Parameter cacheName 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.poolChange(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, cacheName, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Moves Cache to another Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body Move cache to the pool supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response poolChangeWithResponse(String resourceGroupName, String accountName, String poolName, + String cacheName, PoolChangeRequest 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 (cacheName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cacheName 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.poolChangeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, cacheName, contentType, accept, + body, Context.NONE); + } + + /** + * Moves Cache to another Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body Move cache to the pool supplied in the body of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response poolChangeWithResponse(String resourceGroupName, String accountName, String poolName, + String cacheName, PoolChangeRequest 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 (cacheName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cacheName 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.poolChangeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, cacheName, contentType, accept, + body, context); + } + + /** + * Moves Cache to another Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body Move cache to the pool supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CacheInner> beginPoolChangeAsync(String resourceGroupName, + String accountName, String poolName, String cacheName, PoolChangeRequest body) { + Mono>> mono + = poolChangeWithResponseAsync(resourceGroupName, accountName, poolName, cacheName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), CacheInner.class, + CacheInner.class, this.client.getContext()); + } + + /** + * Moves Cache to another Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body Move cache to the pool supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CacheInner> beginPoolChange(String resourceGroupName, String accountName, + String poolName, String cacheName, PoolChangeRequest body) { + Response response + = poolChangeWithResponse(resourceGroupName, accountName, poolName, cacheName, body); + return this.client.getLroResult(response, CacheInner.class, CacheInner.class, + Context.NONE); + } + + /** + * Moves Cache to another Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body Move cache to the pool supplied in the body of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CacheInner> beginPoolChange(String resourceGroupName, String accountName, + String poolName, String cacheName, PoolChangeRequest body, Context context) { + Response response + = poolChangeWithResponse(resourceGroupName, accountName, poolName, cacheName, body, context); + return this.client.getLroResult(response, CacheInner.class, CacheInner.class, context); + } + + /** + * Moves Cache to another Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body Move cache to the pool supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono poolChangeAsync(String resourceGroupName, String accountName, String poolName, + String cacheName, PoolChangeRequest body) { + return beginPoolChangeAsync(resourceGroupName, accountName, poolName, cacheName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Moves Cache to another Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body Move cache to the pool supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CacheInner poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, + PoolChangeRequest body) { + return beginPoolChange(resourceGroupName, accountName, poolName, cacheName, body).getFinalResult(); + } + + /** + * Moves Cache to another Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body Move cache to the pool supplied in the body of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CacheInner poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, + PoolChangeRequest body, Context context) { + return beginPoolChange(resourceGroupName, accountName, poolName, cacheName, 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 list of Cache resources along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByCapacityPoolsNextSinglePageAsync(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.listByCapacityPoolsNext(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 Cache resources along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByCapacityPoolsNextSinglePage(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.listByCapacityPoolsNextSync(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 Cache resources along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByCapacityPoolsNextSinglePage(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.listByCapacityPoolsNextSync(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(CachesClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesImpl.java new file mode 100644 index 000000000000..65993f8b2a55 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CachesImpl.java @@ -0,0 +1,226 @@ +// Copyright (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.CachesClient; +import com.azure.resourcemanager.netapp.fluent.models.CacheInner; +import com.azure.resourcemanager.netapp.fluent.models.PeeringPassphrasesInner; +import com.azure.resourcemanager.netapp.models.Cache; +import com.azure.resourcemanager.netapp.models.Caches; +import com.azure.resourcemanager.netapp.models.PeeringPassphrases; +import com.azure.resourcemanager.netapp.models.PoolChangeRequest; + +public final class CachesImpl implements Caches { + private static final ClientLogger LOGGER = new ClientLogger(CachesImpl.class); + + private final CachesClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public CachesImpl(CachesClient innerClient, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String accountName, String poolName, + String cacheName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, accountName, poolName, cacheName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new CacheImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Cache get(String resourceGroupName, String accountName, String poolName, String cacheName) { + CacheInner inner = this.serviceClient().get(resourceGroupName, accountName, poolName, cacheName); + if (inner != null) { + return new CacheImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String accountName, String poolName, String cacheName) { + this.serviceClient().delete(resourceGroupName, accountName, poolName, cacheName); + } + + public void delete(String resourceGroupName, String accountName, String poolName, String cacheName, + Context context) { + this.serviceClient().delete(resourceGroupName, accountName, poolName, cacheName, context); + } + + public PagedIterable listByCapacityPools(String resourceGroupName, String accountName, String poolName) { + PagedIterable inner + = this.serviceClient().listByCapacityPools(resourceGroupName, accountName, poolName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CacheImpl(inner1, this.manager())); + } + + public PagedIterable listByCapacityPools(String resourceGroupName, String accountName, String poolName, + Context context) { + PagedIterable inner + = this.serviceClient().listByCapacityPools(resourceGroupName, accountName, poolName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CacheImpl(inner1, this.manager())); + } + + public Response listPeeringPassphrasesWithResponse(String resourceGroupName, String accountName, + String poolName, String cacheName, Context context) { + Response inner = this.serviceClient() + .listPeeringPassphrasesWithResponse(resourceGroupName, accountName, poolName, cacheName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PeeringPassphrasesImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PeeringPassphrases listPeeringPassphrases(String resourceGroupName, String accountName, String poolName, + String cacheName) { + PeeringPassphrasesInner inner + = this.serviceClient().listPeeringPassphrases(resourceGroupName, accountName, poolName, cacheName); + if (inner != null) { + return new PeeringPassphrasesImpl(inner, this.manager()); + } else { + return null; + } + } + + public Cache poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, + PoolChangeRequest body) { + CacheInner inner = this.serviceClient().poolChange(resourceGroupName, accountName, poolName, cacheName, body); + if (inner != null) { + return new CacheImpl(inner, this.manager()); + } else { + return null; + } + } + + public Cache poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, + PoolChangeRequest body, Context context) { + CacheInner inner + = this.serviceClient().poolChange(resourceGroupName, accountName, poolName, cacheName, body, context); + if (inner != null) { + return new CacheImpl(inner, this.manager()); + } else { + return null; + } + } + + public Cache 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, "netAppAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); + } + String cacheName = ResourceManagerUtils.getValueFromIdByName(id, "caches"); + if (cacheName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'caches'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, poolName, cacheName, 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, "netAppAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); + } + String cacheName = ResourceManagerUtils.getValueFromIdByName(id, "caches"); + if (cacheName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'caches'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, poolName, cacheName, 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, "netAppAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); + } + String cacheName = ResourceManagerUtils.getValueFromIdByName(id, "caches"); + if (cacheName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'caches'.", id))); + } + this.delete(resourceGroupName, accountName, poolName, cacheName, 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, "netAppAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'netAppAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "capacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'capacityPools'.", id))); + } + String cacheName = ResourceManagerUtils.getValueFromIdByName(id, "caches"); + if (cacheName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'caches'.", id))); + } + this.delete(resourceGroupName, accountName, poolName, cacheName, context); + } + + private CachesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public CacheImpl define(String name) { + return new CacheImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CheckElasticResourceAvailabilityResponseImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CheckElasticResourceAvailabilityResponseImpl.java new file mode 100644 index 000000000000..2b7bfcf99083 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/CheckElasticResourceAvailabilityResponseImpl.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.resourcemanager.netapp.fluent.models.CheckElasticResourceAvailabilityResponseInner; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityReason; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityResponse; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityStatus; + +public final class CheckElasticResourceAvailabilityResponseImpl implements CheckElasticResourceAvailabilityResponse { + private CheckElasticResourceAvailabilityResponseInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + CheckElasticResourceAvailabilityResponseImpl(CheckElasticResourceAvailabilityResponseInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public CheckElasticResourceAvailabilityStatus isAvailable() { + return this.innerModel().isAvailable(); + } + + public CheckElasticResourceAvailabilityReason reason() { + return this.innerModel().reason(); + } + + public String message() { + return this.innerModel().message(); + } + + public CheckElasticResourceAvailabilityResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountImpl.java new file mode 100644 index 000000000000..11bd2660a1ff --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountImpl.java @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.ElasticAccountInner; +import com.azure.resourcemanager.netapp.models.ElasticAccount; +import com.azure.resourcemanager.netapp.models.ElasticAccountProperties; +import com.azure.resourcemanager.netapp.models.ElasticAccountUpdate; +import com.azure.resourcemanager.netapp.models.ElasticAccountUpdateProperties; +import com.azure.resourcemanager.netapp.models.ManagedServiceIdentity; +import java.util.Collections; +import java.util.Map; + +public final class ElasticAccountImpl implements ElasticAccount, ElasticAccount.Definition, ElasticAccount.Update { + private ElasticAccountInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ElasticAccountProperties properties() { + return this.innerModel().properties(); + } + + public String eTag() { + return this.innerModel().eTag(); + } + + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ElasticAccountInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + private ElasticAccountUpdate updateBody; + + public ElasticAccountImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public ElasticAccount create() { + this.innerObject = serviceManager.serviceClient() + .getElasticAccounts() + .createOrUpdate(resourceGroupName, accountName, this.innerModel(), Context.NONE); + return this; + } + + public ElasticAccount create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticAccounts() + .createOrUpdate(resourceGroupName, accountName, this.innerModel(), context); + return this; + } + + ElasticAccountImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new ElasticAccountInner(); + this.serviceManager = serviceManager; + this.accountName = name; + } + + public ElasticAccountImpl update() { + this.updateBody = new ElasticAccountUpdate(); + return this; + } + + public ElasticAccount apply() { + this.innerObject = serviceManager.serviceClient() + .getElasticAccounts() + .update(resourceGroupName, accountName, updateBody, Context.NONE); + return this; + } + + public ElasticAccount apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticAccounts() + .update(resourceGroupName, accountName, updateBody, context); + return this; + } + + ElasticAccountImpl(ElasticAccountInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticAccounts"); + } + + public ElasticAccount refresh() { + this.innerObject = serviceManager.serviceClient() + .getElasticAccounts() + .getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE) + .getValue(); + return this; + } + + public ElasticAccount refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticAccounts() + .getByResourceGroupWithResponse(resourceGroupName, accountName, context) + .getValue(); + return this; + } + + public ElasticAccountImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ElasticAccountImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ElasticAccountImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public ElasticAccountImpl withProperties(ElasticAccountProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public ElasticAccountImpl withIdentity(ManagedServiceIdentity identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateBody.withIdentity(identity); + return this; + } + } + + public ElasticAccountImpl withProperties(ElasticAccountUpdateProperties properties) { + this.updateBody.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountsClientImpl.java new file mode 100644 index 000000000000..1f3905cf94b3 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountsClientImpl.java @@ -0,0 +1,1427 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticAccountInner; +import com.azure.resourcemanager.netapp.implementation.models.ElasticAccountListResult; +import com.azure.resourcemanager.netapp.models.ElasticAccountUpdate; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ElasticAccountsClient. + */ +public final class ElasticAccountsClientImpl implements ElasticAccountsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ElasticAccountsService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of ElasticAccountsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ElasticAccountsClientImpl(NetAppManagementClientImpl client) { + this.service + = RestProxy.create(ElasticAccountsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientElasticAccounts to be used by the proxy service + * to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientElasticAccounts") + public interface ElasticAccountsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticAccountInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticAccountInner body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticAccountUpdate body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticAccountUpdate body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/elasticAccounts") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.NetApp/elasticAccounts") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Account along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String accountName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Account on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String accountName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, accountName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Account along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String accountName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context); + } + + /** + * Get the NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticAccountInner getByResourceGroup(String resourceGroupName, String accountName) { + return getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE).getValue(); + } + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp elastic account resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String accountName, ElasticAccountInner body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp elastic account resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String accountName, + ElasticAccountInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, contentType, accept, body, Context.NONE); + } + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp elastic account resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String accountName, + ElasticAccountInner body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, contentType, accept, body, context); + } + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ElasticAccountInner> + beginCreateOrUpdateAsync(String resourceGroupName, String accountName, ElasticAccountInner body) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, accountName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ElasticAccountInner.class, ElasticAccountInner.class, this.client.getContext()); + } + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticAccountInner> + beginCreateOrUpdate(String resourceGroupName, String accountName, ElasticAccountInner body) { + Response response = createOrUpdateWithResponse(resourceGroupName, accountName, body); + return this.client.getLroResult(response, ElasticAccountInner.class, + ElasticAccountInner.class, Context.NONE); + } + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticAccountInner> + beginCreateOrUpdate(String resourceGroupName, String accountName, ElasticAccountInner body, Context context) { + Response response = createOrUpdateWithResponse(resourceGroupName, accountName, body, context); + return this.client.getLroResult(response, ElasticAccountInner.class, + ElasticAccountInner.class, context); + } + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp elastic account resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String accountName, + ElasticAccountInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticAccountInner createOrUpdate(String resourceGroupName, String accountName, ElasticAccountInner body) { + return beginCreateOrUpdate(resourceGroupName, accountName, body).getFinalResult(); + } + + /** + * Create or update the specified NetApp Elastic Account within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticAccountInner createOrUpdate(String resourceGroupName, String accountName, ElasticAccountInner body, + Context context) { + return beginCreateOrUpdate(resourceGroupName, accountName, body, context).getFinalResult(); + } + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp elastic account resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String accountName, + ElasticAccountUpdate body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp elastic account resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String accountName, + ElasticAccountUpdate body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, contentType, accept, body, Context.NONE); + } + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp elastic account resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String accountName, + ElasticAccountUpdate body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, contentType, accept, body, context); + } + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ElasticAccountInner> beginUpdateAsync(String resourceGroupName, + String accountName, ElasticAccountUpdate body) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, accountName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ElasticAccountInner.class, ElasticAccountInner.class, this.client.getContext()); + } + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticAccountInner> beginUpdate(String resourceGroupName, + String accountName, ElasticAccountUpdate body) { + Response response = updateWithResponse(resourceGroupName, accountName, body); + return this.client.getLroResult(response, ElasticAccountInner.class, + ElasticAccountInner.class, Context.NONE); + } + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticAccountInner> beginUpdate(String resourceGroupName, + String accountName, ElasticAccountUpdate body, Context context) { + Response response = updateWithResponse(resourceGroupName, accountName, body, context); + return this.client.getLroResult(response, ElasticAccountInner.class, + ElasticAccountInner.class, context); + } + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp elastic account resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String accountName, + ElasticAccountUpdate body) { + return beginUpdateAsync(resourceGroupName, accountName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticAccountInner update(String resourceGroupName, String accountName, ElasticAccountUpdate body) { + return beginUpdate(resourceGroupName, accountName, body).getFinalResult(); + } + + /** + * Patch the specified NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp elastic account resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticAccountInner update(String resourceGroupName, String accountName, ElasticAccountUpdate body, + Context context) { + return beginUpdate(resourceGroupName, accountName, body, context).getFinalResult(); + } + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, Context.NONE); + } + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, context); + } + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, accountName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName) { + Response response = deleteWithResponse(resourceGroupName, accountName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, accountName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String accountName) { + return beginDeleteAsync(resourceGroupName, accountName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName) { + beginDelete(resourceGroupName, accountName).getFinalResult(); + } + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, Context context) { + beginDelete(resourceGroupName, accountName, context).getFinalResult(); + } + + /** + * List and describe all NetApp elastic accounts in the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List and describe all NetApp elastic accounts in the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List and describe all NetApp elastic accounts in the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List and describe all NetApp elastic accounts in the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List and describe all NetApp elastic accounts in the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); + } + + /** + * List and describe all NetApp elastic accounts in the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * List and describe all NetApp elastic accounts in the subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List and describe all NetApp elastic accounts in the subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List and describe all NetApp elastic accounts in the subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List and describe all NetApp elastic accounts in the subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List and describe all NetApp elastic accounts in the subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); + } + + /** + * List and describe all NetApp elastic accounts in the subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticAccountsClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountsImpl.java new file mode 100644 index 000000000000..be0f2e138cf8 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountsImpl.java @@ -0,0 +1,146 @@ +// Copyright (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); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ElasticAccountImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ElasticAccount getByResourceGroup(String resourceGroupName, String accountName) { + ElasticAccountInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, accountName); + if (inner != null) { + return new ElasticAccountImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String accountName) { + this.serviceClient().delete(resourceGroupName, accountName); + } + + public void delete(String resourceGroupName, String accountName, Context context) { + this.serviceClient().delete(resourceGroupName, accountName, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticAccountImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticAccountImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticAccountImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticAccountImpl(inner1, this.manager())); + } + + public ElasticAccount getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, accountName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + this.delete(resourceGroupName, accountName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + this.delete(resourceGroupName, accountName, context); + } + + private ElasticAccountsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public ElasticAccountImpl define(String name) { + return new ElasticAccountImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupImpl.java new file mode 100644 index 000000000000..d5c1bbf4ab11 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupImpl.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupInner; +import com.azure.resourcemanager.netapp.models.ElasticBackup; +import com.azure.resourcemanager.netapp.models.ElasticBackupProperties; + +public final class ElasticBackupImpl implements ElasticBackup, ElasticBackup.Definition, ElasticBackup.Update { + private ElasticBackupInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public ElasticBackupProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ElasticBackupInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + private String backupVaultName; + + private String backupName; + + public ElasticBackupImpl withExistingElasticBackupVault(String resourceGroupName, String accountName, + String backupVaultName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + this.backupVaultName = backupVaultName; + return this; + } + + public ElasticBackup create() { + this.innerObject = serviceManager.serviceClient() + .getElasticBackups() + .createOrUpdate(resourceGroupName, accountName, backupVaultName, backupName, this.innerModel(), + Context.NONE); + return this; + } + + public ElasticBackup create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticBackups() + .createOrUpdate(resourceGroupName, accountName, backupVaultName, backupName, this.innerModel(), context); + return this; + } + + ElasticBackupImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new ElasticBackupInner(); + this.serviceManager = serviceManager; + this.backupName = name; + } + + public ElasticBackupImpl update() { + return this; + } + + public ElasticBackup apply() { + this.innerObject = serviceManager.serviceClient() + .getElasticBackups() + .update(resourceGroupName, accountName, backupVaultName, backupName, this.innerModel(), Context.NONE); + return this; + } + + public ElasticBackup apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticBackups() + .update(resourceGroupName, accountName, backupVaultName, backupName, this.innerModel(), context); + return this; + } + + ElasticBackupImpl(ElasticBackupInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticAccounts"); + this.backupVaultName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticBackupVaults"); + this.backupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticBackups"); + } + + public ElasticBackup refresh() { + this.innerObject = serviceManager.serviceClient() + .getElasticBackups() + .getWithResponse(resourceGroupName, accountName, backupVaultName, backupName, Context.NONE) + .getValue(); + return this; + } + + public ElasticBackup refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticBackups() + .getWithResponse(resourceGroupName, accountName, backupVaultName, backupName, context) + .getValue(); + return this; + } + + public ElasticBackupImpl withProperties(ElasticBackupProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPoliciesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPoliciesClientImpl.java new file mode 100644 index 000000000000..253ea1a15746 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPoliciesClientImpl.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.ElasticBackupPoliciesClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupPolicyInner; +import com.azure.resourcemanager.netapp.implementation.models.ElasticBackupPolicyListResult; +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") ElasticBackupPolicyInner 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") ElasticBackupPolicyInner 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, 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.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, 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.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, 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.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, ElasticBackupPolicyInner 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, ElasticBackupPolicyInner 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, ElasticBackupPolicyInner 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, ElasticBackupPolicyInner 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, + ElasticBackupPolicyInner 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, + ElasticBackupPolicyInner body, Context context) { + return beginUpdate(resourceGroupName, accountName, backupPolicyName, body, context).getFinalResult(); + } + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName, + String backupPolicyName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupPolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupPolicyName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName, + String backupPolicyName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupPolicyName, Context.NONE); + } + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName, + String backupPolicyName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupPolicyName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupPolicyName, context); + } + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName, + String backupPolicyName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, accountName, backupPolicyName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, + String backupPolicyName) { + Response response = deleteWithResponse(resourceGroupName, accountName, backupPolicyName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, + String backupPolicyName, Context context) { + Response response = deleteWithResponse(resourceGroupName, accountName, backupPolicyName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String accountName, String backupPolicyName) { + return beginDeleteAsync(resourceGroupName, accountName, backupPolicyName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String backupPolicyName) { + beginDelete(resourceGroupName, accountName, backupPolicyName).getFinalResult(); + } + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String backupPolicyName, Context context) { + beginDelete(resourceGroupName, accountName, backupPolicyName, context).getFinalResult(); + } + + /** + * List and describe all Elastic Backup Policies in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByElasticAccountSinglePageAsync(String resourceGroupName, + String accountName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByElasticAccount(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List and describe all Elastic Backup Policies in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByElasticAccountAsync(String resourceGroupName, + String accountName) { + return new PagedFlux<>(() -> listByElasticAccountSinglePageAsync(resourceGroupName, accountName), + nextLink -> listByElasticAccountNextSinglePageAsync(nextLink)); + } + + /** + * List and describe all Elastic Backup Policies in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticAccountSinglePage(String resourceGroupName, + String accountName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticAccountSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List and describe all Elastic Backup Policies in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticAccountSinglePage(String resourceGroupName, + String accountName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticAccountSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List and describe all Elastic Backup Policies in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByElasticAccount(String resourceGroupName, String accountName) { + return new PagedIterable<>(() -> listByElasticAccountSinglePage(resourceGroupName, accountName), + nextLink -> listByElasticAccountNextSinglePage(nextLink)); + } + + /** + * List and describe all Elastic Backup Policies in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByElasticAccount(String resourceGroupName, String accountName, + Context context) { + return new PagedIterable<>(() -> listByElasticAccountSinglePage(resourceGroupName, accountName, context), + nextLink -> listByElasticAccountNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByElasticAccountNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByElasticAccountNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticAccountNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticAccountNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticAccountNextSinglePage(String nextLink, + Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticAccountNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticBackupPoliciesClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPoliciesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPoliciesImpl.java new file mode 100644 index 000000000000..6fdfac7d936b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPoliciesImpl.java @@ -0,0 +1,159 @@ +// Copyright (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); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ElasticBackupPolicyImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ElasticBackupPolicy get(String resourceGroupName, String accountName, String backupPolicyName) { + ElasticBackupPolicyInner inner = this.serviceClient().get(resourceGroupName, accountName, backupPolicyName); + if (inner != null) { + return new ElasticBackupPolicyImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String accountName, String backupPolicyName) { + this.serviceClient().delete(resourceGroupName, accountName, backupPolicyName); + } + + public void delete(String resourceGroupName, String accountName, String backupPolicyName, Context context) { + this.serviceClient().delete(resourceGroupName, accountName, backupPolicyName, context); + } + + public PagedIterable listByElasticAccount(String resourceGroupName, String accountName) { + PagedIterable inner + = this.serviceClient().listByElasticAccount(resourceGroupName, accountName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticBackupPolicyImpl(inner1, this.manager())); + } + + public PagedIterable listByElasticAccount(String resourceGroupName, String accountName, + Context context) { + PagedIterable inner + = this.serviceClient().listByElasticAccount(resourceGroupName, accountName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticBackupPolicyImpl(inner1, this.manager())); + } + + public ElasticBackupPolicy getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupPolicies"); + if (backupPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupPolicies'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, backupPolicyName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupPolicies"); + if (backupPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupPolicies'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, backupPolicyName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupPolicies"); + if (backupPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupPolicies'.", id))); + } + this.delete(resourceGroupName, accountName, backupPolicyName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupPolicies"); + if (backupPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupPolicies'.", id))); + } + this.delete(resourceGroupName, accountName, backupPolicyName, context); + } + + private ElasticBackupPoliciesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public ElasticBackupPolicyImpl define(String name) { + return new ElasticBackupPolicyImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPolicyImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPolicyImpl.java new file mode 100644 index 000000000000..e45309b42744 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPolicyImpl.java @@ -0,0 +1,173 @@ +// Copyright (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 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; + + 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() { + return this; + } + + public ElasticBackupPolicy apply() { + this.innerObject = serviceManager.serviceClient() + .getElasticBackupPolicies() + .update(resourceGroupName, accountName, backupPolicyName, this.innerModel(), Context.NONE); + return this; + } + + public ElasticBackupPolicy apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticBackupPolicies() + .update(resourceGroupName, accountName, backupPolicyName, this.innerModel(), 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) { + this.innerModel().withTags(tags); + return this; + } + + public ElasticBackupPolicyImpl withProperties(ElasticBackupPolicyProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultImpl.java new file mode 100644 index 000000000000..b8b9bd0bd9e7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultImpl.java @@ -0,0 +1,173 @@ +// Copyright (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 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; + + 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() { + return this; + } + + public ElasticBackupVault apply() { + this.innerObject = serviceManager.serviceClient() + .getElasticBackupVaults() + .update(resourceGroupName, accountName, backupVaultName, this.innerModel(), Context.NONE); + return this; + } + + public ElasticBackupVault apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticBackupVaults() + .update(resourceGroupName, accountName, backupVaultName, this.innerModel(), 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) { + this.innerModel().withTags(tags); + return this; + } + + public ElasticBackupVaultImpl withProperties(ElasticBackupVaultProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultsClientImpl.java new file mode 100644 index 000000000000..dc49c0d6f70a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultsClientImpl.java @@ -0,0 +1,1321 @@ +// Copyright (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 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") ElasticBackupVaultInner 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") ElasticBackupVaultInner 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, 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.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, 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.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, 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.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, ElasticBackupVaultInner 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, ElasticBackupVaultInner 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, ElasticBackupVaultInner 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, ElasticBackupVaultInner 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, + ElasticBackupVaultInner 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, + ElasticBackupVaultInner body, Context context) { + return beginUpdate(resourceGroupName, accountName, backupVaultName, body, context).getFinalResult(); + } + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName, + String backupVaultName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName, + String backupVaultName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, Context.NONE); + } + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName, + String backupVaultName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, context); + } + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName, + String backupVaultName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, accountName, backupVaultName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, + String backupVaultName) { + Response response = deleteWithResponse(resourceGroupName, accountName, backupVaultName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, + String backupVaultName, Context context) { + Response response = deleteWithResponse(resourceGroupName, accountName, backupVaultName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String accountName, String backupVaultName) { + return beginDeleteAsync(resourceGroupName, accountName, backupVaultName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String backupVaultName) { + beginDelete(resourceGroupName, accountName, backupVaultName).getFinalResult(); + } + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String backupVaultName, Context context) { + beginDelete(resourceGroupName, accountName, backupVaultName, context).getFinalResult(); + } + + /** + * List and describe all Elastic Backup Vaults in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByElasticAccountSinglePageAsync(String resourceGroupName, + String accountName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByElasticAccount(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List and describe all Elastic Backup Vaults in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByElasticAccountAsync(String resourceGroupName, String accountName) { + return new PagedFlux<>(() -> listByElasticAccountSinglePageAsync(resourceGroupName, accountName), + nextLink -> listByElasticAccountNextSinglePageAsync(nextLink)); + } + + /** + * List and describe all Elastic Backup Vaults in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticAccountSinglePage(String resourceGroupName, + String accountName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticAccountSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List and describe all Elastic Backup Vaults in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticAccountSinglePage(String resourceGroupName, + String accountName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticAccountSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List and describe all Elastic Backup Vaults in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByElasticAccount(String resourceGroupName, String accountName) { + return new PagedIterable<>(() -> listByElasticAccountSinglePage(resourceGroupName, accountName), + nextLink -> listByElasticAccountNextSinglePage(nextLink)); + } + + /** + * List and describe all Elastic Backup Vaults in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByElasticAccount(String resourceGroupName, String accountName, + Context context) { + return new PagedIterable<>(() -> listByElasticAccountSinglePage(resourceGroupName, accountName, context), + nextLink -> listByElasticAccountNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByElasticAccountNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByElasticAccountNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticAccountNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticAccountNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticAccountNextSinglePage(String nextLink, + Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticAccountNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticBackupVaultsClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultsImpl.java new file mode 100644 index 000000000000..ab48ada2b093 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultsImpl.java @@ -0,0 +1,159 @@ +// Copyright (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); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ElasticBackupVaultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ElasticBackupVault get(String resourceGroupName, String accountName, String backupVaultName) { + ElasticBackupVaultInner inner = this.serviceClient().get(resourceGroupName, accountName, backupVaultName); + if (inner != null) { + return new ElasticBackupVaultImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String accountName, String backupVaultName) { + this.serviceClient().delete(resourceGroupName, accountName, backupVaultName); + } + + public void delete(String resourceGroupName, String accountName, String backupVaultName, Context context) { + this.serviceClient().delete(resourceGroupName, accountName, backupVaultName, context); + } + + public PagedIterable listByElasticAccount(String resourceGroupName, String accountName) { + PagedIterable inner + = this.serviceClient().listByElasticAccount(resourceGroupName, accountName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticBackupVaultImpl(inner1, this.manager())); + } + + public PagedIterable listByElasticAccount(String resourceGroupName, String accountName, + Context context) { + PagedIterable inner + = this.serviceClient().listByElasticAccount(resourceGroupName, accountName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticBackupVaultImpl(inner1, this.manager())); + } + + public ElasticBackupVault getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupVaults'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, backupVaultName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupVaults'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, backupVaultName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupVaults'.", id))); + } + this.delete(resourceGroupName, accountName, backupVaultName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupVaults'.", id))); + } + this.delete(resourceGroupName, accountName, backupVaultName, context); + } + + private ElasticBackupVaultsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public ElasticBackupVaultImpl define(String name) { + return new ElasticBackupVaultImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupsClientImpl.java new file mode 100644 index 000000000000..d048173279a6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupsClientImpl.java @@ -0,0 +1,1420 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupInner; +import com.azure.resourcemanager.netapp.implementation.models.ElasticBackupListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ElasticBackupsClient. + */ +public final class ElasticBackupsClientImpl implements ElasticBackupsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ElasticBackupsService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of ElasticBackupsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ElasticBackupsClientImpl(NetAppManagementClientImpl client) { + this.service + = RestProxy.create(ElasticBackupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientElasticBackups to be used by the proxy service + * to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientElasticBackups") + public interface ElasticBackupsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticBackupInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticBackupInner body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticBackupInner body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ElasticBackupInner body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @PathParam("backupName") String backupName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByVault(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByVaultSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("backupVaultName") String backupVaultName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByVaultNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByVaultNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the specified Elastic Backup under Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Elastic Backup under Elastic Backup Vault along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String accountName, + String backupVaultName, String backupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, backupName, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the specified Elastic Backup under Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Elastic Backup under Elastic Backup Vault on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String accountName, String backupVaultName, + String backupName) { + return getWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the specified Elastic Backup under Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Elastic Backup under Elastic Backup Vault along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String accountName, + String backupVaultName, String backupName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, backupVaultName, backupName, accept, context); + } + + /** + * Get the specified Elastic Backup under Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Elastic Backup under Elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupInner get(String resourceGroupName, String accountName, String backupVaultName, + String backupName) { + return getWithResponse(resourceGroupName, accountName, backupVaultName, backupName, Context.NONE).getValue(); + } + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp Elastic Backup under an elastic Backup Vault along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String accountName, String backupVaultName, String backupName, ElasticBackupInner body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, backupName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp Elastic Backup under an elastic Backup Vault along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String accountName, + String backupVaultName, String backupName, ElasticBackupInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, backupName, contentType, + accept, body, Context.NONE); + } + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp Elastic Backup under an elastic Backup Vault along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String accountName, + String backupVaultName, String backupName, ElasticBackupInner body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, backupName, contentType, + accept, body, context); + } + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ElasticBackupInner> beginCreateOrUpdateAsync( + String resourceGroupName, String accountName, String backupVaultName, String backupName, + ElasticBackupInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ElasticBackupInner.class, ElasticBackupInner.class, this.client.getContext()); + } + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticBackupInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String backupVaultName, String backupName, ElasticBackupInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, accountName, backupVaultName, backupName, body); + return this.client.getLroResult(response, ElasticBackupInner.class, + ElasticBackupInner.class, Context.NONE); + } + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticBackupInner> beginCreateOrUpdate(String resourceGroupName, + String accountName, String backupVaultName, String backupName, ElasticBackupInner body, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, accountName, backupVaultName, backupName, body, context); + return this.client.getLroResult(response, ElasticBackupInner.class, + ElasticBackupInner.class, context); + } + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp Elastic Backup under an elastic Backup Vault on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String accountName, + String backupVaultName, String backupName, ElasticBackupInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, backupVaultName, backupName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupInner createOrUpdate(String resourceGroupName, String accountName, String backupVaultName, + String backupName, ElasticBackupInner body) { + return beginCreateOrUpdate(resourceGroupName, accountName, backupVaultName, backupName, body).getFinalResult(); + } + + /** + * Create an elastic backup under the elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupInner createOrUpdate(String resourceGroupName, String accountName, String backupVaultName, + String backupName, ElasticBackupInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, accountName, backupVaultName, backupName, body, context) + .getFinalResult(); + } + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp Elastic Backup under an elastic Backup Vault along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String accountName, + String backupVaultName, String backupName, ElasticBackupInner body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, backupName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp Elastic Backup under an elastic Backup Vault along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String accountName, + String backupVaultName, String backupName, ElasticBackupInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, backupName, contentType, + accept, body, Context.NONE); + } + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp Elastic Backup under an elastic Backup Vault along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String accountName, + String backupVaultName, String backupName, ElasticBackupInner body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, backupName, contentType, + accept, body, context); + } + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ElasticBackupInner> beginUpdateAsync(String resourceGroupName, + String accountName, String backupVaultName, String backupName, ElasticBackupInner body) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ElasticBackupInner.class, ElasticBackupInner.class, this.client.getContext()); + } + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticBackupInner> beginUpdate(String resourceGroupName, + String accountName, String backupVaultName, String backupName, ElasticBackupInner body) { + Response response + = updateWithResponse(resourceGroupName, accountName, backupVaultName, backupName, body); + return this.client.getLroResult(response, ElasticBackupInner.class, + ElasticBackupInner.class, Context.NONE); + } + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticBackupInner> beginUpdate(String resourceGroupName, + String accountName, String backupVaultName, String backupName, ElasticBackupInner body, Context context) { + Response response + = updateWithResponse(resourceGroupName, accountName, backupVaultName, backupName, body, context); + return this.client.getLroResult(response, ElasticBackupInner.class, + ElasticBackupInner.class, context); + } + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp Elastic Backup under an elastic Backup Vault on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String accountName, String backupVaultName, + String backupName, ElasticBackupInner body) { + return beginUpdateAsync(resourceGroupName, accountName, backupVaultName, backupName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupInner update(String resourceGroupName, String accountName, String backupVaultName, + String backupName, ElasticBackupInner body) { + return beginUpdate(resourceGroupName, accountName, backupVaultName, backupName, body).getFinalResult(); + } + + /** + * Patch an elastic Backup under the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param body The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp Elastic Backup under an elastic Backup Vault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticBackupInner update(String resourceGroupName, String accountName, String backupVaultName, + String backupName, ElasticBackupInner body, Context context) { + return beginUpdate(resourceGroupName, accountName, backupVaultName, backupName, body, context).getFinalResult(); + } + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName, + String backupVaultName, String backupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + return Mono.error(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, backupName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName, + String backupVaultName, String backupName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, backupName, Context.NONE); + } + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName, + String backupVaultName, String backupName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + if (backupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, backupName, context); + } + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName, + String backupVaultName, String backupName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, accountName, backupVaultName, backupName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, + String backupVaultName, String backupName) { + Response response = deleteWithResponse(resourceGroupName, accountName, backupVaultName, backupName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, + String backupVaultName, String backupName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, accountName, backupVaultName, backupName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String accountName, String backupVaultName, + String backupName) { + return beginDeleteAsync(resourceGroupName, accountName, backupVaultName, backupName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String backupVaultName, String backupName) { + beginDelete(resourceGroupName, accountName, backupVaultName, backupName).getFinalResult(); + } + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String backupVaultName, String backupName, + Context context) { + beginDelete(resourceGroupName, accountName, backupVaultName, backupName, context).getFinalResult(); + } + + /** + * List all elastic backups Under an elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByVaultSinglePageAsync(String resourceGroupName, + String accountName, String backupVaultName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + return Mono + .error(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByVault(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all elastic backups Under an elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByVaultAsync(String resourceGroupName, String accountName, + String backupVaultName) { + return new PagedFlux<>(() -> listByVaultSinglePageAsync(resourceGroupName, accountName, backupVaultName), + nextLink -> listByVaultNextSinglePageAsync(nextLink)); + } + + /** + * List all elastic backups Under an elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByVaultSinglePage(String resourceGroupName, String accountName, + String backupVaultName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByVaultSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all elastic backups Under an elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByVaultSinglePage(String resourceGroupName, String accountName, + String backupVaultName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (backupVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter backupVaultName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByVaultSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, backupVaultName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all elastic backups Under an elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByVault(String resourceGroupName, String accountName, + String backupVaultName) { + return new PagedIterable<>(() -> listByVaultSinglePage(resourceGroupName, accountName, backupVaultName), + nextLink -> listByVaultNextSinglePage(nextLink)); + } + + /** + * List all elastic backups Under an elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByVault(String resourceGroupName, String accountName, + String backupVaultName, Context context) { + return new PagedIterable<>( + () -> listByVaultSinglePage(resourceGroupName, accountName, backupVaultName, context), + nextLink -> listByVaultNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByVaultNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByVaultNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByVaultNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByVaultNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByVaultNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByVaultNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticBackupsClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupsImpl.java new file mode 100644 index 000000000000..6be2247f3e0a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupsImpl.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.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); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ElasticBackupImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ElasticBackup get(String resourceGroupName, String accountName, String backupVaultName, String backupName) { + ElasticBackupInner inner + = this.serviceClient().get(resourceGroupName, accountName, backupVaultName, backupName); + if (inner != null) { + return new ElasticBackupImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String accountName, String backupVaultName, String backupName) { + this.serviceClient().delete(resourceGroupName, accountName, backupVaultName, backupName); + } + + public void delete(String resourceGroupName, String accountName, String backupVaultName, String backupName, + Context context) { + this.serviceClient().delete(resourceGroupName, accountName, backupVaultName, backupName, context); + } + + public PagedIterable listByVault(String resourceGroupName, String accountName, + String backupVaultName) { + PagedIterable inner + = this.serviceClient().listByVault(resourceGroupName, accountName, backupVaultName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticBackupImpl(inner1, this.manager())); + } + + public PagedIterable listByVault(String resourceGroupName, String accountName, + String backupVaultName, Context context) { + PagedIterable inner + = this.serviceClient().listByVault(resourceGroupName, accountName, backupVaultName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticBackupImpl(inner1, this.manager())); + } + + public ElasticBackup getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupVaults'.", id))); + } + String backupName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackups"); + if (backupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackups'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, backupVaultName, backupName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupVaults'.", id))); + } + String backupName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackups"); + if (backupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackups'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, backupVaultName, backupName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupVaults'.", id))); + } + String backupName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackups"); + if (backupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackups'.", id))); + } + this.delete(resourceGroupName, accountName, backupVaultName, backupName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String backupVaultName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackupVaults"); + if (backupVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackupVaults'.", id))); + } + String backupName = ResourceManagerUtils.getValueFromIdByName(id, "elasticBackups"); + if (backupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticBackups'.", id))); + } + this.delete(resourceGroupName, accountName, backupVaultName, backupName, context); + } + + private ElasticBackupsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public ElasticBackupImpl define(String name) { + return new ElasticBackupImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolImpl.java new file mode 100644 index 000000000000..af68ba51b1c6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolImpl.java @@ -0,0 +1,232 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.ElasticCapacityPoolInner; +import com.azure.resourcemanager.netapp.models.ChangeZoneRequest; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityResponse; +import com.azure.resourcemanager.netapp.models.CheckElasticVolumeFilePathAvailabilityRequest; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPool; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPoolProperties; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPoolUpdate; +import com.azure.resourcemanager.netapp.models.ElasticCapacityPoolUpdateProperties; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class ElasticCapacityPoolImpl + implements ElasticCapacityPool, ElasticCapacityPool.Definition, ElasticCapacityPool.Update { + private ElasticCapacityPoolInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ElasticCapacityPoolProperties properties() { + return this.innerModel().properties(); + } + + public String eTag() { + return this.innerModel().eTag(); + } + + public List zones() { + List inner = this.innerModel().zones(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ElasticCapacityPoolInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + private String poolName; + + private ElasticCapacityPoolUpdate updateBody; + + public ElasticCapacityPoolImpl withExistingElasticAccount(String resourceGroupName, String accountName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + return this; + } + + public ElasticCapacityPool create() { + this.innerObject = serviceManager.serviceClient() + .getElasticCapacityPools() + .createOrUpdate(resourceGroupName, accountName, poolName, this.innerModel(), Context.NONE); + return this; + } + + public ElasticCapacityPool create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticCapacityPools() + .createOrUpdate(resourceGroupName, accountName, poolName, this.innerModel(), context); + return this; + } + + ElasticCapacityPoolImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new ElasticCapacityPoolInner(); + this.serviceManager = serviceManager; + this.poolName = name; + } + + public ElasticCapacityPoolImpl update() { + this.updateBody = new ElasticCapacityPoolUpdate(); + return this; + } + + public ElasticCapacityPool apply() { + this.innerObject = serviceManager.serviceClient() + .getElasticCapacityPools() + .update(resourceGroupName, accountName, poolName, updateBody, Context.NONE); + return this; + } + + public ElasticCapacityPool apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticCapacityPools() + .update(resourceGroupName, accountName, poolName, updateBody, context); + return this; + } + + ElasticCapacityPoolImpl(ElasticCapacityPoolInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticAccounts"); + this.poolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticCapacityPools"); + } + + public ElasticCapacityPool refresh() { + this.innerObject = serviceManager.serviceClient() + .getElasticCapacityPools() + .getWithResponse(resourceGroupName, accountName, poolName, Context.NONE) + .getValue(); + return this; + } + + public ElasticCapacityPool refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticCapacityPools() + .getWithResponse(resourceGroupName, accountName, poolName, context) + .getValue(); + return this; + } + + public ElasticCapacityPool changeZone(ChangeZoneRequest body) { + return serviceManager.elasticCapacityPools().changeZone(resourceGroupName, accountName, poolName, body); + } + + public ElasticCapacityPool changeZone(ChangeZoneRequest body, Context context) { + return serviceManager.elasticCapacityPools() + .changeZone(resourceGroupName, accountName, poolName, body, context); + } + + public Response checkVolumeFilePathAvailabilityWithResponse( + CheckElasticVolumeFilePathAvailabilityRequest body, Context context) { + return serviceManager.elasticCapacityPools() + .checkVolumeFilePathAvailabilityWithResponse(resourceGroupName, accountName, poolName, body, context); + } + + public CheckElasticResourceAvailabilityResponse + checkVolumeFilePathAvailability(CheckElasticVolumeFilePathAvailabilityRequest body) { + return serviceManager.elasticCapacityPools() + .checkVolumeFilePathAvailability(resourceGroupName, accountName, poolName, body); + } + + public ElasticCapacityPoolImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ElasticCapacityPoolImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ElasticCapacityPoolImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public ElasticCapacityPoolImpl withProperties(ElasticCapacityPoolProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public ElasticCapacityPoolImpl withZones(List zones) { + this.innerModel().withZones(zones); + return this; + } + + public ElasticCapacityPoolImpl withProperties(ElasticCapacityPoolUpdateProperties properties) { + this.updateBody.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolsClientImpl.java new file mode 100644 index 000000000000..187d4ee3ea11 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolsClientImpl.java @@ -0,0 +1,1760 @@ +// Copyright (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 the response body 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 the response body 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 the response body 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 long-running operation. + */ + @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 long-running operation. + */ + @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 long-running operation. + */ + @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 the response body 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 the response. + */ + @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 the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticCapacityPoolInner changeZone(String resourceGroupName, String accountName, String poolName, + ChangeZoneRequest body, Context context) { + return beginChangeZone(resourceGroupName, accountName, poolName, body, context).getFinalResult(); + } + + /** + * Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding availability of a resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + checkVolumeFilePathAvailabilityWithResponseAsync(String resourceGroupName, String accountName, String poolName, + CheckElasticVolumeFilePathAvailabilityRequest body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.checkVolumeFilePathAvailability(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding availability of a resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono checkVolumeFilePathAvailabilityAsync( + String resourceGroupName, String accountName, String poolName, + CheckElasticVolumeFilePathAvailabilityRequest body) { + return checkVolumeFilePathAvailabilityWithResponseAsync(resourceGroupName, accountName, poolName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding availability of a resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkVolumeFilePathAvailabilityWithResponse( + String resourceGroupName, String accountName, String poolName, + CheckElasticVolumeFilePathAvailabilityRequest body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.checkVolumeFilePathAvailabilitySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, contentType, accept, body, + context); + } + + /** + * Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding availability of a resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CheckElasticResourceAvailabilityResponseInner checkVolumeFilePathAvailability(String resourceGroupName, + String accountName, String poolName, CheckElasticVolumeFilePathAvailabilityRequest body) { + return checkVolumeFilePathAvailabilityWithResponse(resourceGroupName, accountName, poolName, body, Context.NONE) + .getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticCapacityPool list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByElasticAccountNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByElasticAccountNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticCapacityPool list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticAccountNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticAccountNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticCapacityPool list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticAccountNextSinglePage(String nextLink, + Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticAccountNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticCapacityPoolsClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolsImpl.java new file mode 100644 index 000000000000..91fab30fc31e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolsImpl.java @@ -0,0 +1,209 @@ +// Copyright (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); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ElasticCapacityPoolImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + 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); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new CheckElasticResourceAvailabilityResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CheckElasticResourceAvailabilityResponse checkVolumeFilePathAvailability(String resourceGroupName, + String accountName, String poolName, CheckElasticVolumeFilePathAvailabilityRequest body) { + CheckElasticResourceAvailabilityResponseInner inner + = this.serviceClient().checkVolumeFilePathAvailability(resourceGroupName, accountName, poolName, body); + if (inner != null) { + return new CheckElasticResourceAvailabilityResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public ElasticCapacityPool getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, poolName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, poolName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + this.delete(resourceGroupName, accountName, poolName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + this.delete(resourceGroupName, accountName, poolName, context); + } + + private ElasticCapacityPoolsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public ElasticCapacityPoolImpl define(String name) { + return new ElasticCapacityPoolImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotImpl.java new file mode 100644 index 000000000000..7196cc3e5579 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotImpl.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotInner; +import com.azure.resourcemanager.netapp.models.ElasticSnapshot; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotProperties; + +public final class ElasticSnapshotImpl implements ElasticSnapshot, ElasticSnapshot.Definition, ElasticSnapshot.Update { + private ElasticSnapshotInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public ElasticSnapshotProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ElasticSnapshotInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + private String poolName; + + private String volumeName; + + private String snapshotName; + + public ElasticSnapshotImpl withExistingElasticVolume(String resourceGroupName, String accountName, String poolName, + String volumeName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + this.poolName = poolName; + this.volumeName = volumeName; + return this; + } + + public ElasticSnapshot create() { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshots() + .createOrUpdate(resourceGroupName, accountName, poolName, volumeName, snapshotName, this.innerModel(), + Context.NONE); + return this; + } + + public ElasticSnapshot create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshots() + .createOrUpdate(resourceGroupName, accountName, poolName, volumeName, snapshotName, this.innerModel(), + context); + return this; + } + + ElasticSnapshotImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new ElasticSnapshotInner(); + this.serviceManager = serviceManager; + this.snapshotName = name; + } + + public ElasticSnapshotImpl update() { + return this; + } + + public ElasticSnapshot apply() { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshots() + .createOrUpdate(resourceGroupName, accountName, poolName, volumeName, snapshotName, this.innerModel(), + Context.NONE); + return this; + } + + public ElasticSnapshot apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshots() + .createOrUpdate(resourceGroupName, accountName, poolName, volumeName, snapshotName, this.innerModel(), + context); + return this; + } + + ElasticSnapshotImpl(ElasticSnapshotInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticAccounts"); + this.poolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticCapacityPools"); + this.volumeName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticVolumes"); + this.snapshotName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticSnapshots"); + } + + public ElasticSnapshot refresh() { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshots() + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName, Context.NONE) + .getValue(); + return this; + } + + public ElasticSnapshot refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshots() + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName, context) + .getValue(); + return this; + } + + public ElasticSnapshotImpl withProperties(ElasticSnapshotProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPoliciesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPoliciesClientImpl.java new file mode 100644 index 000000000000..dbeb54db7f75 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPoliciesClientImpl.java @@ -0,0 +1,1634 @@ +// Copyright (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 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") ElasticSnapshotPolicyInner 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") ElasticSnapshotPolicyInner 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, 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.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, 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.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, 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.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, ElasticSnapshotPolicyInner 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, ElasticSnapshotPolicyInner 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, ElasticSnapshotPolicyInner 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, ElasticSnapshotPolicyInner 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, + ElasticSnapshotPolicyInner 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, + ElasticSnapshotPolicyInner body, Context context) { + return beginUpdate(resourceGroupName, accountName, snapshotPolicyName, body, context).getFinalResult(); + } + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName, + String snapshotPolicyName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (snapshotPolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, snapshotPolicyName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName, + String snapshotPolicyName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (snapshotPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, snapshotPolicyName, Context.NONE); + } + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (snapshotPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, snapshotPolicyName, context); + } + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName, + String snapshotPolicyName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, accountName, snapshotPolicyName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, + String snapshotPolicyName) { + Response response = deleteWithResponse(resourceGroupName, accountName, snapshotPolicyName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context) { + Response response = deleteWithResponse(resourceGroupName, accountName, snapshotPolicyName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String accountName, String snapshotPolicyName) { + return beginDeleteAsync(resourceGroupName, accountName, snapshotPolicyName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String snapshotPolicyName) { + beginDelete(resourceGroupName, accountName, snapshotPolicyName).getFinalResult(); + } + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String snapshotPolicyName, Context context) { + beginDelete(resourceGroupName, accountName, snapshotPolicyName, context).getFinalResult(); + } + + /** + * List ElasticSnapshotPolicy resources by ElasticAccount. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByElasticAccountSinglePageAsync(String resourceGroupName, String accountName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByElasticAccount(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List ElasticSnapshotPolicy resources by ElasticAccount. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByElasticAccountAsync(String resourceGroupName, + String accountName) { + return new PagedFlux<>(() -> listByElasticAccountSinglePageAsync(resourceGroupName, accountName), + nextLink -> listByElasticAccountNextSinglePageAsync(nextLink)); + } + + /** + * List ElasticSnapshotPolicy resources by ElasticAccount. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticAccountSinglePage(String resourceGroupName, + String accountName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticAccountSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List ElasticSnapshotPolicy resources by ElasticAccount. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticAccountSinglePage(String resourceGroupName, + String accountName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticAccountSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List ElasticSnapshotPolicy resources by ElasticAccount. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByElasticAccount(String resourceGroupName, + String accountName) { + return new PagedIterable<>(() -> listByElasticAccountSinglePage(resourceGroupName, accountName), + nextLink -> listByElasticAccountNextSinglePage(nextLink)); + } + + /** + * List ElasticSnapshotPolicy resources by ElasticAccount. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByElasticAccount(String resourceGroupName, String accountName, + Context context) { + return new PagedIterable<>(() -> listByElasticAccountSinglePage(resourceGroupName, accountName, context), + nextLink -> listByElasticAccountNextSinglePage(nextLink, context)); + } + + /** + * Get elastic volumes associated with Elastic Snapshot Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic volumes associated with Elastic Snapshot Policy along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listElasticVolumesSinglePageAsync(String resourceGroupName, + String accountName, String snapshotPolicyName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (snapshotPolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listElasticVolumes(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, snapshotPolicyName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get elastic volumes associated with Elastic Snapshot Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic volumes associated with Elastic Snapshot Policy as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listElasticVolumesAsync(String resourceGroupName, String accountName, + String snapshotPolicyName) { + return new PagedFlux<>( + () -> listElasticVolumesSinglePageAsync(resourceGroupName, accountName, snapshotPolicyName), + nextLink -> listElasticVolumesNextSinglePageAsync(nextLink)); + } + + /** + * Get elastic volumes associated with Elastic Snapshot Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic volumes associated with Elastic Snapshot Policy along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listElasticVolumesSinglePage(String resourceGroupName, String accountName, + String snapshotPolicyName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (snapshotPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listElasticVolumesSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accountName, + snapshotPolicyName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get elastic volumes associated with Elastic Snapshot Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic volumes associated with Elastic Snapshot Policy along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listElasticVolumesSinglePage(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (snapshotPolicyName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotPolicyName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listElasticVolumesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, snapshotPolicyName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get elastic volumes associated with Elastic Snapshot Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic volumes associated with Elastic Snapshot Policy as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listElasticVolumes(String resourceGroupName, String accountName, + String snapshotPolicyName) { + return new PagedIterable<>( + () -> listElasticVolumesSinglePage(resourceGroupName, accountName, snapshotPolicyName), + nextLink -> listElasticVolumesNextSinglePage(nextLink)); + } + + /** + * Get elastic volumes associated with Elastic Snapshot Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic volumes associated with Elastic Snapshot Policy as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listElasticVolumes(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context) { + return new PagedIterable<>( + () -> listElasticVolumesSinglePage(resourceGroupName, accountName, snapshotPolicyName, context), + nextLink -> listElasticVolumesNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByElasticAccountNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByElasticAccountNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticAccountNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticAccountNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticAccountNextSinglePage(String nextLink, + Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticAccountNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic volumes associated with Elastic Snapshot Policy along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listElasticVolumesNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listElasticVolumesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic volumes associated with Elastic Snapshot Policy along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listElasticVolumesNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listElasticVolumesNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic volumes associated with Elastic Snapshot Policy along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listElasticVolumesNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listElasticVolumesNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticSnapshotPoliciesClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPoliciesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPoliciesImpl.java new file mode 100644 index 000000000000..8aebc4de4f59 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPoliciesImpl.java @@ -0,0 +1,175 @@ +// Copyright (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); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ElasticSnapshotPolicyImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ElasticSnapshotPolicy get(String resourceGroupName, String accountName, String snapshotPolicyName) { + ElasticSnapshotPolicyInner inner = this.serviceClient().get(resourceGroupName, accountName, snapshotPolicyName); + if (inner != null) { + return new ElasticSnapshotPolicyImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String accountName, String snapshotPolicyName) { + this.serviceClient().delete(resourceGroupName, accountName, snapshotPolicyName); + } + + public void delete(String resourceGroupName, String accountName, String snapshotPolicyName, Context context) { + this.serviceClient().delete(resourceGroupName, accountName, snapshotPolicyName, context); + } + + public PagedIterable listByElasticAccount(String resourceGroupName, String accountName) { + PagedIterable inner + = this.serviceClient().listByElasticAccount(resourceGroupName, accountName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticSnapshotPolicyImpl(inner1, this.manager())); + } + + public PagedIterable listByElasticAccount(String resourceGroupName, String accountName, + Context context) { + PagedIterable inner + = this.serviceClient().listByElasticAccount(resourceGroupName, accountName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticSnapshotPolicyImpl(inner1, this.manager())); + } + + public PagedIterable listElasticVolumes(String resourceGroupName, String accountName, + String snapshotPolicyName) { + PagedIterable inner + = this.serviceClient().listElasticVolumes(resourceGroupName, accountName, snapshotPolicyName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticVolumeImpl(inner1, this.manager())); + } + + public PagedIterable listElasticVolumes(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context) { + PagedIterable inner + = this.serviceClient().listElasticVolumes(resourceGroupName, accountName, snapshotPolicyName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticVolumeImpl(inner1, this.manager())); + } + + public ElasticSnapshotPolicy getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String snapshotPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "elasticSnapshotPolicies"); + if (snapshotPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'elasticSnapshotPolicies'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, snapshotPolicyName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String snapshotPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "elasticSnapshotPolicies"); + if (snapshotPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'elasticSnapshotPolicies'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, snapshotPolicyName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String snapshotPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "elasticSnapshotPolicies"); + if (snapshotPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'elasticSnapshotPolicies'.", id))); + } + this.delete(resourceGroupName, accountName, snapshotPolicyName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String snapshotPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "elasticSnapshotPolicies"); + if (snapshotPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'elasticSnapshotPolicies'.", id))); + } + this.delete(resourceGroupName, accountName, snapshotPolicyName, context); + } + + private ElasticSnapshotPoliciesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public ElasticSnapshotPolicyImpl define(String name) { + return new ElasticSnapshotPolicyImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPolicyImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPolicyImpl.java new file mode 100644 index 000000000000..67920ea6d288 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPolicyImpl.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.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 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; + + 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() { + return this; + } + + public ElasticSnapshotPolicy apply() { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshotPolicies() + .update(resourceGroupName, accountName, snapshotPolicyName, this.innerModel(), Context.NONE); + return this; + } + + public ElasticSnapshotPolicy apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticSnapshotPolicies() + .update(resourceGroupName, accountName, snapshotPolicyName, this.innerModel(), 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) { + this.innerModel().withTags(tags); + return this; + } + + public ElasticSnapshotPolicyImpl withProperties(ElasticSnapshotPolicyProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotsClientImpl.java new file mode 100644 index 000000000000..95ea6dc5374f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotsClientImpl.java @@ -0,0 +1,1188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient; +import com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotInner; +import com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ElasticSnapshotsClient. + */ +public final class ElasticSnapshotsClientImpl implements ElasticSnapshotsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ElasticSnapshotsService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of ElasticSnapshotsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ElasticSnapshotsClientImpl(NetAppManagementClientImpl client) { + this.service + = RestProxy.create(ElasticSnapshotsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientElasticSnapshots to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientElasticSnapshots") + public interface ElasticSnapshotsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("snapshotName") String snapshotName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("snapshotName") String snapshotName, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("snapshotName") String snapshotName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticSnapshotInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("snapshotName") String snapshotName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ElasticSnapshotInner body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("snapshotName") String snapshotName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @PathParam("snapshotName") String snapshotName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByElasticVolume(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByElasticVolumeSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByElasticVolumeNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByElasticVolumeNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshot along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String accountName, + String poolName, String volumeName, String snapshotName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (snapshotName == null) { + return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, snapshotName, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshot on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName) { + return getWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshot along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (snapshotName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, poolName, volumeName, snapshotName, accept, context); + } + + /** + * Get a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticSnapshotInner get(String resourceGroupName, String accountName, String poolName, String volumeName, + String snapshotName) { + return getWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName, Context.NONE) + .getValue(); + } + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp Elastic Snapshot under an Elastic Volume along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, String snapshotName, ElasticSnapshotInner body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (snapshotName == null) { + return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, snapshotName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp Elastic Snapshot under an Elastic Volume along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String accountName, + String poolName, String volumeName, String snapshotName, ElasticSnapshotInner body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (snapshotName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, snapshotName, + contentType, accept, body, Context.NONE); + } + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp Elastic Snapshot under an Elastic Volume along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String accountName, + String poolName, String volumeName, String snapshotName, ElasticSnapshotInner body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (snapshotName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, snapshotName, + contentType, accept, body, context); + } + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of netApp Elastic Snapshot under an Elastic Volume. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ElasticSnapshotInner> beginCreateOrUpdateAsync( + String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName, + ElasticSnapshotInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ElasticSnapshotInner.class, ElasticSnapshotInner.class, this.client.getContext()); + } + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Snapshot under an Elastic Volume. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticSnapshotInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName, + ElasticSnapshotInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName, body); + return this.client.getLroResult(response, + ElasticSnapshotInner.class, ElasticSnapshotInner.class, Context.NONE); + } + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of netApp Elastic Snapshot under an Elastic Volume. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ElasticSnapshotInner> beginCreateOrUpdate( + String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName, + ElasticSnapshotInner body, Context context) { + Response response = createOrUpdateWithResponse(resourceGroupName, accountName, poolName, volumeName, + snapshotName, body, context); + return this.client.getLroResult(response, + ElasticSnapshotInner.class, ElasticSnapshotInner.class, context); + } + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp Elastic Snapshot under an Elastic Volume on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String accountName, + String poolName, String volumeName, String snapshotName, ElasticSnapshotInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp Elastic Snapshot under an Elastic Volume. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticSnapshotInner createOrUpdate(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName, ElasticSnapshotInner body) { + return beginCreateOrUpdate(resourceGroupName, accountName, poolName, volumeName, snapshotName, body) + .getFinalResult(); + } + + /** + * Create a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param body Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return netApp Elastic Snapshot under an Elastic Volume. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticSnapshotInner createOrUpdate(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName, ElasticSnapshotInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, accountName, poolName, volumeName, snapshotName, body, context) + .getFinalResult(); + } + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName, + String poolName, String volumeName, String snapshotName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (snapshotName == null) { + return Mono.error(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, snapshotName, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (snapshotName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, snapshotName, + Context.NONE); + } + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + if (snapshotName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter snapshotName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, snapshotName, + context); + } + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName, + String poolName, String volumeName, String snapshotName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName) { + Response response + = deleteWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String accountName, String poolName, String volumeName, + String snapshotName) { + return beginDeleteAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String poolName, String volumeName, + String snapshotName) { + beginDelete(resourceGroupName, accountName, poolName, volumeName, snapshotName).getFinalResult(); + } + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String poolName, String volumeName, + String snapshotName, Context context) { + beginDelete(resourceGroupName, accountName, poolName, volumeName, snapshotName, context).getFinalResult(); + } + + /** + * List ElasticSnapshot resources by ElasticVolume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByElasticVolumeSinglePageAsync(String resourceGroupName, + String accountName, String poolName, String volumeName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + return Mono.error(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByElasticVolume(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List ElasticSnapshot resources by ElasticVolume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByElasticVolumeAsync(String resourceGroupName, String accountName, + String poolName, String volumeName) { + return new PagedFlux<>( + () -> listByElasticVolumeSinglePageAsync(resourceGroupName, accountName, poolName, volumeName), + nextLink -> listByElasticVolumeNextSinglePageAsync(nextLink)); + } + + /** + * List ElasticSnapshot resources by ElasticVolume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticVolumeSinglePage(String resourceGroupName, + String accountName, String poolName, String volumeName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listByElasticVolumeSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, + volumeName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List ElasticSnapshot resources by ElasticVolume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticVolumeSinglePage(String resourceGroupName, + String accountName, String poolName, String volumeName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (volumeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter volumeName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticVolumeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List ElasticSnapshot resources by ElasticVolume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByElasticVolume(String resourceGroupName, String accountName, + String poolName, String volumeName) { + return new PagedIterable<>( + () -> listByElasticVolumeSinglePage(resourceGroupName, accountName, poolName, volumeName), + nextLink -> listByElasticVolumeNextSinglePage(nextLink)); + } + + /** + * List ElasticSnapshot resources by ElasticVolume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByElasticVolume(String resourceGroupName, String accountName, + String poolName, String volumeName, Context context) { + return new PagedIterable<>( + () -> listByElasticVolumeSinglePage(resourceGroupName, accountName, poolName, volumeName, context), + nextLink -> listByElasticVolumeNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByElasticVolumeNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByElasticVolumeNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticVolumeNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticVolumeNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticVolumeNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticVolumeNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticSnapshotsClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotsImpl.java new file mode 100644 index 000000000000..929600185eee --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotsImpl.java @@ -0,0 +1,205 @@ +// Copyright (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); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ElasticSnapshotImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ElasticSnapshot get(String resourceGroupName, String accountName, String poolName, String volumeName, + String snapshotName) { + ElasticSnapshotInner inner + = this.serviceClient().get(resourceGroupName, accountName, poolName, volumeName, snapshotName); + if (inner != null) { + return new ElasticSnapshotImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String accountName, String poolName, String volumeName, + String snapshotName) { + this.serviceClient().delete(resourceGroupName, accountName, poolName, volumeName, snapshotName); + } + + public void delete(String resourceGroupName, String accountName, String poolName, String volumeName, + String snapshotName, Context context) { + this.serviceClient().delete(resourceGroupName, accountName, poolName, volumeName, snapshotName, context); + } + + public PagedIterable listByElasticVolume(String resourceGroupName, String accountName, + String poolName, String volumeName) { + PagedIterable inner + = this.serviceClient().listByElasticVolume(resourceGroupName, accountName, poolName, volumeName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticSnapshotImpl(inner1, this.manager())); + } + + public PagedIterable listByElasticVolume(String resourceGroupName, String accountName, + String poolName, String volumeName, Context context) { + PagedIterable inner + = this.serviceClient().listByElasticVolume(resourceGroupName, accountName, poolName, volumeName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ElasticSnapshotImpl(inner1, this.manager())); + } + + public ElasticSnapshot getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "elasticVolumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticVolumes'.", id))); + } + String snapshotName = ResourceManagerUtils.getValueFromIdByName(id, "elasticSnapshots"); + if (snapshotName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticSnapshots'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "elasticVolumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticVolumes'.", id))); + } + String snapshotName = ResourceManagerUtils.getValueFromIdByName(id, "elasticSnapshots"); + if (snapshotName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticSnapshots'.", id))); + } + return this.getWithResponse(resourceGroupName, accountName, poolName, volumeName, snapshotName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "elasticVolumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticVolumes'.", id))); + } + String snapshotName = ResourceManagerUtils.getValueFromIdByName(id, "elasticSnapshots"); + if (snapshotName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticSnapshots'.", id))); + } + this.delete(resourceGroupName, accountName, poolName, volumeName, snapshotName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String accountName = ResourceManagerUtils.getValueFromIdByName(id, "elasticAccounts"); + if (accountName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticAccounts'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "elasticCapacityPools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticCapacityPools'.", id))); + } + String volumeName = ResourceManagerUtils.getValueFromIdByName(id, "elasticVolumes"); + if (volumeName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticVolumes'.", id))); + } + String snapshotName = ResourceManagerUtils.getValueFromIdByName(id, "elasticSnapshots"); + if (snapshotName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'elasticSnapshots'.", id))); + } + this.delete(resourceGroupName, accountName, poolName, volumeName, snapshotName, context); + } + + private ElasticSnapshotsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + public ElasticSnapshotImpl define(String name) { + return new ElasticSnapshotImpl(name, this.manager()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumeImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumeImpl.java new file mode 100644 index 000000000000..adb207a1a222 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumeImpl.java @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.ElasticVolumeInner; +import com.azure.resourcemanager.netapp.models.ElasticVolume; +import com.azure.resourcemanager.netapp.models.ElasticVolumeProperties; +import com.azure.resourcemanager.netapp.models.ElasticVolumeRevert; +import com.azure.resourcemanager.netapp.models.ElasticVolumeUpdate; +import com.azure.resourcemanager.netapp.models.ElasticVolumeUpdateProperties; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class ElasticVolumeImpl implements ElasticVolume, ElasticVolume.Definition, ElasticVolume.Update { + private ElasticVolumeInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ElasticVolumeProperties properties() { + return this.innerModel().properties(); + } + + public String eTag() { + return this.innerModel().eTag(); + } + + public List zones() { + List inner = this.innerModel().zones(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ElasticVolumeInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.netapp.NetAppFilesManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String accountName; + + private String poolName; + + private String volumeName; + + private ElasticVolumeUpdate updateBody; + + public ElasticVolumeImpl withExistingElasticCapacityPool(String resourceGroupName, String accountName, + String poolName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + this.poolName = poolName; + return this; + } + + public ElasticVolume create() { + this.innerObject = serviceManager.serviceClient() + .getElasticVolumes() + .createOrUpdate(resourceGroupName, accountName, poolName, volumeName, this.innerModel(), Context.NONE); + return this; + } + + public ElasticVolume create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticVolumes() + .createOrUpdate(resourceGroupName, accountName, poolName, volumeName, this.innerModel(), context); + return this; + } + + ElasticVolumeImpl(String name, com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = new ElasticVolumeInner(); + this.serviceManager = serviceManager; + this.volumeName = name; + } + + public ElasticVolumeImpl update() { + this.updateBody = new ElasticVolumeUpdate(); + return this; + } + + public ElasticVolume apply() { + this.innerObject = serviceManager.serviceClient() + .getElasticVolumes() + .update(resourceGroupName, accountName, poolName, volumeName, updateBody, Context.NONE); + return this; + } + + public ElasticVolume apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticVolumes() + .update(resourceGroupName, accountName, poolName, volumeName, updateBody, context); + return this; + } + + ElasticVolumeImpl(ElasticVolumeInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticAccounts"); + this.poolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticCapacityPools"); + this.volumeName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "elasticVolumes"); + } + + public ElasticVolume refresh() { + this.innerObject = serviceManager.serviceClient() + .getElasticVolumes() + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, Context.NONE) + .getValue(); + return this; + } + + public ElasticVolume refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getElasticVolumes() + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, context) + .getValue(); + return this; + } + + public ElasticVolume revert(ElasticVolumeRevert body) { + return serviceManager.elasticVolumes().revert(resourceGroupName, accountName, poolName, volumeName, body); + } + + public ElasticVolume revert(ElasticVolumeRevert body, Context context) { + return serviceManager.elasticVolumes() + .revert(resourceGroupName, accountName, poolName, volumeName, body, context); + } + + public ElasticVolumeImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ElasticVolumeImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ElasticVolumeImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public ElasticVolumeImpl withProperties(ElasticVolumeProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public ElasticVolumeImpl withZones(List zones) { + this.innerModel().withZones(zones); + return this; + } + + public ElasticVolumeImpl withProperties(ElasticVolumeUpdateProperties properties) { + this.updateBody.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumesClientImpl.java new file mode 100644 index 000000000000..8048fb06e895 --- /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 the response body 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 the response body 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 the response body 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 long-running operation. + */ + @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 long-running operation. + */ + @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 long-running operation. + */ + @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 the response body 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 the response. + */ + @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 the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ElasticVolumeInner revert(String resourceGroupName, String accountName, String poolName, String volumeName, + ElasticVolumeRevert body, Context context) { + return beginRevert(resourceGroupName, accountName, poolName, volumeName, body, context).getFinalResult(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticVolume list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByElasticPoolNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByElasticPoolNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticVolume list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticPoolNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticPoolNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticVolume list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByElasticPoolNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByElasticPoolNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticVolumesClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumesImpl.java new file mode 100644 index 000000000000..a5855c089a92 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumesImpl.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.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); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ElasticVolumeImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + 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/ListQuotaReportResponseImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ListQuotaReportResponseImpl.java new file mode 100644 index 000000000000..dfec70b37650 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/ListQuotaReportResponseImpl.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.implementation; + +import com.azure.resourcemanager.netapp.fluent.models.ListQuotaReportResponseInner; +import com.azure.resourcemanager.netapp.models.ListQuotaReportResponse; +import com.azure.resourcemanager.netapp.models.QuotaReport; +import java.util.Collections; +import java.util.List; + +public final class ListQuotaReportResponseImpl implements ListQuotaReportResponse { + private ListQuotaReportResponseInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + ListQuotaReportResponseImpl(ListQuotaReportResponseInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ListQuotaReportResponseInner 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/NetAppAccountImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppAccountImpl.java index f7fdcc5c73b5..5ca6c7b905aa 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,7 @@ import com.azure.resourcemanager.netapp.models.ChangeKeyVault; import com.azure.resourcemanager.netapp.models.EncryptionTransitionRequest; import com.azure.resourcemanager.netapp.models.GetKeyVaultStatusResponse; +import com.azure.resourcemanager.netapp.models.LdapConfiguration; import com.azure.resourcemanager.netapp.models.ManagedServiceIdentity; import com.azure.resourcemanager.netapp.models.MultiAdStatus; import com.azure.resourcemanager.netapp.models.NetAppAccount; @@ -92,6 +93,10 @@ public MultiAdStatus multiAdStatus() { return this.innerModel().multiAdStatus(); } + public LdapConfiguration ldapConfiguration() { + return this.innerModel().ldapConfiguration(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -277,6 +282,16 @@ public NetAppAccountImpl withNfsV4IdDomain(String nfsV4IdDomain) { } } + public NetAppAccountImpl withLdapConfiguration(LdapConfiguration ldapConfiguration) { + if (isInCreateMode()) { + this.innerModel().withLdapConfiguration(ldapConfiguration); + return this; + } else { + this.updateBody.withLdapConfiguration(ldapConfiguration); + return this; + } + } + private boolean isInCreateMode() { return this.innerModel() == null || this.innerModel().id() == null; } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientImpl.java index 6909c6e312f0..c5ddd2d691c0 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,12 +27,23 @@ 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; import com.azure.resourcemanager.netapp.fluent.BackupsUnderAccountsClient; import com.azure.resourcemanager.netapp.fluent.BackupsUnderBackupVaultsClient; import com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient; +import com.azure.resourcemanager.netapp.fluent.BucketsClient; +import com.azure.resourcemanager.netapp.fluent.CachesClient; +import com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient; +import com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient; +import com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient; +import com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient; +import com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient; +import com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient; +import com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient; +import com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient; import com.azure.resourcemanager.netapp.fluent.NetAppManagementClient; import com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient; import com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient; @@ -41,6 +52,7 @@ import com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient; import com.azure.resourcemanager.netapp.fluent.OperationsClient; import com.azure.resourcemanager.netapp.fluent.PoolsClient; +import com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient; import com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient; import com.azure.resourcemanager.netapp.fluent.SnapshotsClient; import com.azure.resourcemanager.netapp.fluent.SubvolumesClient; @@ -271,6 +283,20 @@ public VolumeQuotaRulesClient getVolumeQuotaRules() { return this.volumeQuotaRules; } + /** + * The RansomwareReportsClient object to access its operations. + */ + private final RansomwareReportsClient ransomwareReports; + + /** + * Gets the RansomwareReportsClient object to access its operations. + * + * @return the RansomwareReportsClient object. + */ + public RansomwareReportsClient getRansomwareReports() { + return this.ransomwareReports; + } + /** * The BackupVaultsClient object to access its operations. */ @@ -285,6 +311,160 @@ public BackupVaultsClient getBackupVaults() { return this.backupVaults; } + /** + * The BucketsClient object to access its operations. + */ + private final BucketsClient buckets; + + /** + * Gets the BucketsClient object to access its operations. + * + * @return the BucketsClient object. + */ + public BucketsClient getBuckets() { + return this.buckets; + } + + /** + * The CachesClient object to access its operations. + */ + private final CachesClient caches; + + /** + * Gets the CachesClient object to access its operations. + * + * @return the CachesClient object. + */ + public CachesClient getCaches() { + return this.caches; + } + + /** + * The ElasticAccountsClient object to access its operations. + */ + private final ElasticAccountsClient elasticAccounts; + + /** + * Gets the ElasticAccountsClient object to access its operations. + * + * @return the ElasticAccountsClient object. + */ + public ElasticAccountsClient getElasticAccounts() { + return this.elasticAccounts; + } + + /** + * The ElasticCapacityPoolsClient object to access its operations. + */ + private final ElasticCapacityPoolsClient elasticCapacityPools; + + /** + * Gets the ElasticCapacityPoolsClient object to access its operations. + * + * @return the ElasticCapacityPoolsClient object. + */ + public ElasticCapacityPoolsClient getElasticCapacityPools() { + return this.elasticCapacityPools; + } + + /** + * The ElasticVolumesClient object to access its operations. + */ + private final ElasticVolumesClient elasticVolumes; + + /** + * Gets the ElasticVolumesClient object to access its operations. + * + * @return the ElasticVolumesClient object. + */ + public ElasticVolumesClient getElasticVolumes() { + return this.elasticVolumes; + } + + /** + * The ElasticSnapshotsClient object to access its operations. + */ + private final ElasticSnapshotsClient elasticSnapshots; + + /** + * Gets the ElasticSnapshotsClient object to access its operations. + * + * @return the ElasticSnapshotsClient object. + */ + public ElasticSnapshotsClient getElasticSnapshots() { + return this.elasticSnapshots; + } + + /** + * The ElasticSnapshotPoliciesClient object to access its operations. + */ + private final ElasticSnapshotPoliciesClient elasticSnapshotPolicies; + + /** + * Gets the ElasticSnapshotPoliciesClient object to access its operations. + * + * @return the ElasticSnapshotPoliciesClient object. + */ + public ElasticSnapshotPoliciesClient getElasticSnapshotPolicies() { + return this.elasticSnapshotPolicies; + } + + /** + * The ElasticBackupVaultsClient object to access its operations. + */ + private final ElasticBackupVaultsClient elasticBackupVaults; + + /** + * Gets the ElasticBackupVaultsClient object to access its operations. + * + * @return the ElasticBackupVaultsClient object. + */ + public ElasticBackupVaultsClient getElasticBackupVaults() { + return this.elasticBackupVaults; + } + + /** + * The ElasticBackupPoliciesClient object to access its operations. + */ + private final ElasticBackupPoliciesClient elasticBackupPolicies; + + /** + * Gets the ElasticBackupPoliciesClient object to access its operations. + * + * @return the ElasticBackupPoliciesClient object. + */ + public ElasticBackupPoliciesClient getElasticBackupPolicies() { + return this.elasticBackupPolicies; + } + + /** + * The ElasticBackupsClient object to access its operations. + */ + private final ElasticBackupsClient elasticBackups; + + /** + * Gets the ElasticBackupsClient object to access its operations. + * + * @return the ElasticBackupsClient object. + */ + public ElasticBackupsClient getElasticBackups() { + return this.elasticBackups; + } + + /** + * The ActiveDirectoryConfigsClient object to access its operations. + */ + private final ActiveDirectoryConfigsClient activeDirectoryConfigs; + + /** + * Gets the ActiveDirectoryConfigsClient object to access its operations. + * + * @return the ActiveDirectoryConfigsClient object. + */ + public ActiveDirectoryConfigsClient getActiveDirectoryConfigs() { + return this.activeDirectoryConfigs; + } + /** * The NetAppResourceQuotaLimitsClient object to access its operations. */ @@ -442,7 +622,7 @@ public NetAppResourceUsagesClient getNetAppResourceUsages() { this.defaultPollInterval = defaultPollInterval; this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2025-09-01"; + this.apiVersion = "2025-09-01-preview"; this.operations = new OperationsClientImpl(this); this.netAppResourceQuotaLimitsAccounts = new NetAppResourceQuotaLimitsAccountsClientImpl(this); this.volumeGroups = new VolumeGroupsClientImpl(this); @@ -452,7 +632,19 @@ public NetAppResourceUsagesClient getNetAppResourceUsages() { this.snapshotPolicies = new SnapshotPoliciesClientImpl(this); this.backupPolicies = new BackupPoliciesClientImpl(this); this.volumeQuotaRules = new VolumeQuotaRulesClientImpl(this); + this.ransomwareReports = new RansomwareReportsClientImpl(this); this.backupVaults = new BackupVaultsClientImpl(this); + this.buckets = new BucketsClientImpl(this); + this.caches = new CachesClientImpl(this); + this.elasticAccounts = new ElasticAccountsClientImpl(this); + this.elasticCapacityPools = new ElasticCapacityPoolsClientImpl(this); + this.elasticVolumes = new ElasticVolumesClientImpl(this); + this.elasticSnapshots = new ElasticSnapshotsClientImpl(this); + this.elasticSnapshotPolicies = new ElasticSnapshotPoliciesClientImpl(this); + this.elasticBackupVaults = new ElasticBackupVaultsClientImpl(this); + this.elasticBackupPolicies = new ElasticBackupPoliciesClientImpl(this); + this.elasticBackups = new ElasticBackupsClientImpl(this); + this.activeDirectoryConfigs = new ActiveDirectoryConfigsClientImpl(this); this.netAppResourceQuotaLimits = new NetAppResourceQuotaLimitsClientImpl(this); this.netAppResourceRegionInfos = new NetAppResourceRegionInfosClientImpl(this); this.accounts = new AccountsClientImpl(this); diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PeeringPassphrasesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PeeringPassphrasesImpl.java new file mode 100644 index 000000000000..6f0d08beadc3 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/PeeringPassphrasesImpl.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.implementation; + +import com.azure.resourcemanager.netapp.fluent.models.PeeringPassphrasesInner; +import com.azure.resourcemanager.netapp.models.PeeringPassphrases; + +public final class PeeringPassphrasesImpl implements PeeringPassphrases { + private PeeringPassphrasesInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + PeeringPassphrasesImpl(PeeringPassphrasesInner innerObject, + com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String clusterPeeringCommand() { + return this.innerModel().clusterPeeringCommand(); + } + + public String clusterPeeringPassphrase() { + return this.innerModel().clusterPeeringPassphrase(); + } + + public String vserverPeeringCommand() { + return this.innerModel().vserverPeeringCommand(); + } + + public PeeringPassphrasesInner 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/RansomwareReportImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportImpl.java new file mode 100644 index 000000000000..5e5c83e0c07d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportImpl.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.RansomwareReportInner; +import com.azure.resourcemanager.netapp.models.RansomwareReport; +import com.azure.resourcemanager.netapp.models.RansomwareReportProperties; + +public final class RansomwareReportImpl implements RansomwareReport { + private RansomwareReportInner innerObject; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + RansomwareReportImpl(RansomwareReportInner 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 RansomwareReportProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public RansomwareReportInner 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/RansomwareReportsClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportsClientImpl.java new file mode 100644 index 000000000000..9c5b670bb2d5 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportsClientImpl.java @@ -0,0 +1,975 @@ +// Copyright (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.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.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.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.RansomwareReportsClient; +import com.azure.resourcemanager.netapp.fluent.models.RansomwareReportInner; +import com.azure.resourcemanager.netapp.implementation.models.RansomwareReportsList; +import com.azure.resourcemanager.netapp.models.RansomwareSuspectsClearRequest; +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 RansomwareReportsClient. + */ +public final class RansomwareReportsClientImpl implements RansomwareReportsClient { + /** + * The proxy service used to perform REST calls. + */ + private final RansomwareReportsService service; + + /** + * The service client containing this operation class. + */ + private final NetAppManagementClientImpl client; + + /** + * Initializes an instance of RansomwareReportsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RansomwareReportsClientImpl(NetAppManagementClientImpl client) { + this.service + = RestProxy.create(RansomwareReportsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NetAppManagementClientRansomwareReports to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NetAppManagementClientRansomwareReports") + public interface RansomwareReportsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports/{ransomwareReportName}") + @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("ransomwareReportName") String ransomwareReportName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports/{ransomwareReportName}") + @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("ransomwareReportName") String ransomwareReportName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@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/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@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({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports/{ransomwareReportName}/clearSuspects") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> clearSuspects(@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("ransomwareReportName") String ransomwareReportName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") RansomwareSuspectsClearRequest body, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports/{ransomwareReportName}/clearSuspects") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response clearSuspectsSync(@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("ransomwareReportName") String ransomwareReportName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") RansomwareSuspectsClearRequest body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@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 listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat 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 ransomwareReportName) { + 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 (ransomwareReportName == null) { + return Mono + .error(new IllegalArgumentException("Parameter ransomwareReportName 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, + ransomwareReportName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String accountName, String poolName, + String volumeName, String ransomwareReportName) { + return getWithResponseAsync(resourceGroupName, accountName, poolName, volumeName, ransomwareReportName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String accountName, + String poolName, String volumeName, String ransomwareReportName, 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 (ransomwareReportName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter ransomwareReportName 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, ransomwareReportName, accept, context); + } + + /** + * Get details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RansomwareReportInner get(String resourceGroupName, String accountName, String poolName, String volumeName, + String ransomwareReportName) { + return getWithResponse(resourceGroupName, accountName, poolName, volumeName, ransomwareReportName, Context.NONE) + .getValue(); + } + + /** + * List all ransomware reports for the volume + * Returns a list of the Advanced Ransomware Protection (ARP) reports for the volume. + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Advanced Ransomware Protection (ARP) reports along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(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.list(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 all ransomware reports for the volume + * Returns a list of the Advanced Ransomware Protection (ARP) reports for the volume. + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Advanced Ransomware Protection (ARP) reports as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String accountName, String poolName, + String volumeName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, poolName, volumeName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List all ransomware reports for the volume + * Returns a list of the Advanced Ransomware Protection (ARP) reports for the volume. + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Advanced Ransomware Protection (ARP) reports along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(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.listSync(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 all ransomware reports for the volume + * Returns a list of the Advanced Ransomware Protection (ARP) reports for the volume. + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Advanced Ransomware Protection (ARP) reports along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(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.listSync(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 all ransomware reports for the volume + * Returns a list of the Advanced Ransomware Protection (ARP) reports for the volume. + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Advanced Ransomware Protection (ARP) reports as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String accountName, String poolName, + String volumeName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, accountName, poolName, volumeName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * List all ransomware reports for the volume + * Returns a list of the Advanced Ransomware Protection (ARP) reports for the volume. + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Advanced Ransomware Protection (ARP) reports as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, accountName, poolName, volumeName, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should evaluate the report to + * determine whether the activity is acceptable (false positive) or whether an attack seems malicious. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data",. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param body Clear suspects request object supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> clearSuspectsWithResponseAsync(String resourceGroupName, + String accountName, String poolName, String volumeName, String ransomwareReportName, + RansomwareSuspectsClearRequest 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 (ransomwareReportName == null) { + return Mono + .error(new IllegalArgumentException("Parameter ransomwareReportName 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"; + return FluxUtil + .withContext(context -> service.clearSuspects(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, + ransomwareReportName, contentType, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should evaluate the report to + * determine whether the activity is acceptable (false positive) or whether an attack seems malicious. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data",. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param body Clear suspects request object supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response clearSuspectsWithResponse(String resourceGroupName, String accountName, + String poolName, String volumeName, String ransomwareReportName, RansomwareSuspectsClearRequest 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 (ransomwareReportName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter ransomwareReportName 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"; + return service.clearSuspectsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, ransomwareReportName, + contentType, body, Context.NONE); + } + + /** + * "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should evaluate the report to + * determine whether the activity is acceptable (false positive) or whether an attack seems malicious. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data",. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param body Clear suspects request object supplied in the body of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response clearSuspectsWithResponse(String resourceGroupName, String accountName, + String poolName, String volumeName, String ransomwareReportName, RansomwareSuspectsClearRequest 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 (ransomwareReportName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter ransomwareReportName 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"; + return service.clearSuspectsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, ransomwareReportName, + contentType, body, context); + } + + /** + * "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should evaluate the report to + * determine whether the activity is acceptable (false positive) or whether an attack seems malicious. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data",. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param body Clear suspects request object supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginClearSuspectsAsync(String resourceGroupName, String accountName, + String poolName, String volumeName, String ransomwareReportName, RansomwareSuspectsClearRequest body) { + Mono>> mono = clearSuspectsWithResponseAsync(resourceGroupName, accountName, poolName, + volumeName, ransomwareReportName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should evaluate the report to + * determine whether the activity is acceptable (false positive) or whether an attack seems malicious. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data",. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param body Clear suspects request object supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginClearSuspects(String resourceGroupName, String accountName, + String poolName, String volumeName, String ransomwareReportName, RansomwareSuspectsClearRequest body) { + Response response = clearSuspectsWithResponse(resourceGroupName, accountName, poolName, volumeName, + ransomwareReportName, body); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should evaluate the report to + * determine whether the activity is acceptable (false positive) or whether an attack seems malicious. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data",. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param body Clear suspects request object supplied in the body of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginClearSuspects(String resourceGroupName, String accountName, + String poolName, String volumeName, String ransomwareReportName, RansomwareSuspectsClearRequest body, + Context context) { + Response response = clearSuspectsWithResponse(resourceGroupName, accountName, poolName, volumeName, + ransomwareReportName, body, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should evaluate the report to + * determine whether the activity is acceptable (false positive) or whether an attack seems malicious. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data",. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param body Clear suspects request object supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono clearSuspectsAsync(String resourceGroupName, String accountName, String poolName, + String volumeName, String ransomwareReportName, RansomwareSuspectsClearRequest body) { + return beginClearSuspectsAsync(resourceGroupName, accountName, poolName, volumeName, ransomwareReportName, body) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should evaluate the report to + * determine whether the activity is acceptable (false positive) or whether an attack seems malicious. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data",. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param body Clear suspects request object supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void clearSuspects(String resourceGroupName, String accountName, String poolName, String volumeName, + String ransomwareReportName, RansomwareSuspectsClearRequest body) { + beginClearSuspects(resourceGroupName, accountName, poolName, volumeName, ransomwareReportName, body) + .getFinalResult(); + } + + /** + * "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should evaluate the report to + * determine whether the activity is acceptable (false positive) or whether an attack seems malicious. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data",. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param body Clear suspects request object supplied in the body of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void clearSuspects(String resourceGroupName, String accountName, String poolName, String volumeName, + String ransomwareReportName, RansomwareSuspectsClearRequest body, Context context) { + beginClearSuspects(resourceGroupName, accountName, poolName, volumeName, ransomwareReportName, 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 list of Advanced Ransomware Protection (ARP) reports along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Advanced Ransomware Protection (ARP) reports along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(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.listNextSync(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 Advanced Ransomware Protection (ARP) reports along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(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.listNextSync(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(RansomwareReportsClientImpl.class); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportsImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportsImpl.java new file mode 100644 index 000000000000..92ebe0dd5eaa --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportsImpl.java @@ -0,0 +1,87 @@ +// Copyright (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.RansomwareReportsClient; +import com.azure.resourcemanager.netapp.fluent.models.RansomwareReportInner; +import com.azure.resourcemanager.netapp.models.RansomwareReport; +import com.azure.resourcemanager.netapp.models.RansomwareReports; +import com.azure.resourcemanager.netapp.models.RansomwareSuspectsClearRequest; + +public final class RansomwareReportsImpl implements RansomwareReports { + private static final ClientLogger LOGGER = new ClientLogger(RansomwareReportsImpl.class); + + private final RansomwareReportsClient innerClient; + + private final com.azure.resourcemanager.netapp.NetAppFilesManager serviceManager; + + public RansomwareReportsImpl(RansomwareReportsClient 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 ransomwareReportName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, accountName, poolName, volumeName, ransomwareReportName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new RansomwareReportImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RansomwareReport get(String resourceGroupName, String accountName, String poolName, String volumeName, + String ransomwareReportName) { + RansomwareReportInner inner + = this.serviceClient().get(resourceGroupName, accountName, poolName, volumeName, ransomwareReportName); + if (inner != null) { + return new RansomwareReportImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list(String resourceGroupName, String accountName, String poolName, + String volumeName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, accountName, poolName, volumeName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new RansomwareReportImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, accountName, poolName, volumeName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new RansomwareReportImpl(inner1, this.manager())); + } + + public void clearSuspects(String resourceGroupName, String accountName, String poolName, String volumeName, + String ransomwareReportName, RansomwareSuspectsClearRequest body) { + this.serviceClient() + .clearSuspects(resourceGroupName, accountName, poolName, volumeName, ransomwareReportName, body); + } + + public void clearSuspects(String resourceGroupName, String accountName, String poolName, String volumeName, + String ransomwareReportName, RansomwareSuspectsClearRequest body, Context context) { + this.serviceClient() + .clearSuspects(resourceGroupName, accountName, poolName, volumeName, ransomwareReportName, body, context); + } + + private RansomwareReportsClient 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 cd87b76e397e..83544d99b6b9 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 @@ -14,6 +14,7 @@ import com.azure.resourcemanager.netapp.models.AvsDataStore; import com.azure.resourcemanager.netapp.models.BreakFileLocksRequest; import com.azure.resourcemanager.netapp.models.BreakReplicationRequest; +import com.azure.resourcemanager.netapp.models.BreakthroughMode; import com.azure.resourcemanager.netapp.models.ClusterPeerCommandResponse; import com.azure.resourcemanager.netapp.models.CoolAccessRetrievalPolicy; import com.azure.resourcemanager.netapp.models.CoolAccessTieringPolicy; @@ -22,6 +23,9 @@ 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.ListQuotaReportResponse; import com.azure.resourcemanager.netapp.models.ListReplicationsRequest; import com.azure.resourcemanager.netapp.models.MountTargetProperties; import com.azure.resourcemanager.netapp.models.NetworkFeatures; @@ -37,6 +41,7 @@ import com.azure.resourcemanager.netapp.models.SmbNonBrowsable; import com.azure.resourcemanager.netapp.models.SvmPeerCommandResponse; import com.azure.resourcemanager.netapp.models.Volume; +import com.azure.resourcemanager.netapp.models.VolumeLanguage; import com.azure.resourcemanager.netapp.models.VolumePatch; import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection; import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesExportPolicy; @@ -237,6 +242,10 @@ public Boolean ldapEnabled() { return this.innerModel().ldapEnabled(); } + public LdapServerType ldapServerType() { + return this.innerModel().ldapServerType(); + } + public Boolean coolAccess() { return this.innerModel().coolAccess(); } @@ -339,6 +348,10 @@ public Boolean isLargeVolume() { return this.innerModel().isLargeVolume(); } + public LargeVolumeType largeVolumeType() { + return this.innerModel().largeVolumeType(); + } + public String originatingResourceId() { return this.innerModel().originatingResourceId(); } @@ -347,6 +360,14 @@ public Long inheritedSizeInBytes() { return this.innerModel().inheritedSizeInBytes(); } + public VolumeLanguage language() { + return this.innerModel().language(); + } + + public BreakthroughMode breakthroughMode() { + return this.innerModel().breakthroughMode(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -629,6 +650,14 @@ public void revertRelocation(Context context) { serviceManager.volumes().revertRelocation(resourceGroupName, accountName, poolName, volumeName, context); } + public ListQuotaReportResponse listQuotaReport() { + return serviceManager.volumes().listQuotaReport(resourceGroupName, accountName, poolName, volumeName); + } + + public ListQuotaReportResponse listQuotaReport(Context context) { + return serviceManager.volumes().listQuotaReport(resourceGroupName, accountName, poolName, volumeName, context); + } + public VolumeImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -806,6 +835,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); @@ -921,6 +955,21 @@ 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 withUsageThreshold(Long usageThreshold) { this.updateBody.withUsageThreshold(usageThreshold); return this; diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesClientImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesClientImpl.java index 9f074cc577b9..45c4d5e3b3be 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesClientImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesClientImpl.java @@ -38,6 +38,7 @@ import com.azure.resourcemanager.netapp.fluent.VolumesClient; import com.azure.resourcemanager.netapp.fluent.models.ClusterPeerCommandResponseInner; import com.azure.resourcemanager.netapp.fluent.models.GetGroupIdListForLdapUserResponseInner; +import com.azure.resourcemanager.netapp.fluent.models.ListQuotaReportResponseInner; import com.azure.resourcemanager.netapp.fluent.models.ReplicationInner; import com.azure.resourcemanager.netapp.fluent.models.ReplicationStatusInner; import com.azure.resourcemanager.netapp.fluent.models.SvmPeerCommandResponseInner; @@ -622,6 +623,26 @@ Response revertRelocationSync(@HostParam("endpoint") String endpoint @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("poolName") String poolName, @PathParam("volumeName") String volumeName, Context context); + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/listQuotaReport") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> listQuotaReport(@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" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/listQuotaReport") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listQuotaReportSync(@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 }) @@ -7727,6 +7748,264 @@ public void revertRelocation(String resourceGroupName, String accountName, Strin beginRevertRelocation(resourceGroupName, accountName, poolName, volumeName, context).getFinalResult(); } + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> listQuotaReportWithResponseAsync(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.listQuotaReport(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())); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response listQuotaReportWithResponse(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"; + return service.listQuotaReportSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, accept, + Context.NONE); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response listQuotaReportWithResponse(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.listQuotaReportSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, volumeName, accept, context); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ListQuotaReportResponseInner> + beginListQuotaReportAsync(String resourceGroupName, String accountName, String poolName, String volumeName) { + Mono>> mono + = listQuotaReportWithResponseAsync(resourceGroupName, accountName, poolName, volumeName); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ListQuotaReportResponseInner.class, ListQuotaReportResponseInner.class, + this.client.getContext()); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ListQuotaReportResponseInner> + beginListQuotaReport(String resourceGroupName, String accountName, String poolName, String volumeName) { + Response response + = listQuotaReportWithResponse(resourceGroupName, accountName, poolName, volumeName); + return this.client.getLroResult(response, + ListQuotaReportResponseInner.class, ListQuotaReportResponseInner.class, Context.NONE); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ListQuotaReportResponseInner> beginListQuotaReport( + String resourceGroupName, String accountName, String poolName, String volumeName, Context context) { + Response response + = listQuotaReportWithResponse(resourceGroupName, accountName, poolName, volumeName, context); + return this.client.getLroResult(response, + ListQuotaReportResponseInner.class, ListQuotaReportResponseInner.class, context); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listQuotaReportAsync(String resourceGroupName, String accountName, + String poolName, String volumeName) { + return beginListQuotaReportAsync(resourceGroupName, accountName, poolName, volumeName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ListQuotaReportResponseInner listQuotaReport(String resourceGroupName, String accountName, String poolName, + String volumeName) { + return beginListQuotaReport(resourceGroupName, accountName, poolName, volumeName).getFinalResult(); + } + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ListQuotaReportResponseInner listQuotaReport(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context) { + return beginListQuotaReport(resourceGroupName, accountName, poolName, volumeName, context).getFinalResult(); + } + /** * Get the next page of items. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesImpl.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesImpl.java index 809bc2ce91da..d734bbab8754 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesImpl.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesImpl.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.netapp.fluent.VolumesClient; import com.azure.resourcemanager.netapp.fluent.models.ClusterPeerCommandResponseInner; import com.azure.resourcemanager.netapp.fluent.models.GetGroupIdListForLdapUserResponseInner; +import com.azure.resourcemanager.netapp.fluent.models.ListQuotaReportResponseInner; import com.azure.resourcemanager.netapp.fluent.models.ReplicationInner; import com.azure.resourcemanager.netapp.fluent.models.ReplicationStatusInner; import com.azure.resourcemanager.netapp.fluent.models.SvmPeerCommandResponseInner; @@ -22,6 +23,7 @@ import com.azure.resourcemanager.netapp.models.ClusterPeerCommandResponse; import com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserRequest; import com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserResponse; +import com.azure.resourcemanager.netapp.models.ListQuotaReportResponse; import com.azure.resourcemanager.netapp.models.ListReplicationsRequest; import com.azure.resourcemanager.netapp.models.PeerClusterForVolumeMigrationRequest; import com.azure.resourcemanager.netapp.models.PoolChangeRequest; @@ -376,6 +378,28 @@ public void revertRelocation(String resourceGroupName, String accountName, Strin this.serviceClient().revertRelocation(resourceGroupName, accountName, poolName, volumeName, context); } + public ListQuotaReportResponse listQuotaReport(String resourceGroupName, String accountName, String poolName, + String volumeName) { + ListQuotaReportResponseInner inner + = this.serviceClient().listQuotaReport(resourceGroupName, accountName, poolName, volumeName); + if (inner != null) { + return new ListQuotaReportResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public ListQuotaReportResponse listQuotaReport(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context) { + ListQuotaReportResponseInner inner + = this.serviceClient().listQuotaReport(resourceGroupName, accountName, poolName, volumeName, context); + if (inner != null) { + return new ListQuotaReportResponseImpl(inner, this.manager()); + } else { + return null; + } + } + public Volume getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ActiveDirectoryConfigListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ActiveDirectoryConfigListResult.java new file mode 100644 index 000000000000..c4156bf746f6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ActiveDirectoryConfigListResult.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.ActiveDirectoryConfigInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ActiveDirectoryConfig list operation. + */ +@Immutable +public final class ActiveDirectoryConfigListResult implements JsonSerializable { + /* + * The ActiveDirectoryConfig items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ActiveDirectoryConfigListResult class. + */ + private ActiveDirectoryConfigListResult() { + } + + /** + * Get the value property: The ActiveDirectoryConfig items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ActiveDirectoryConfigListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ActiveDirectoryConfigListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActiveDirectoryConfigListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActiveDirectoryConfigListResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ActiveDirectoryConfigListResult. + */ + public static ActiveDirectoryConfigListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActiveDirectoryConfigListResult deserializedActiveDirectoryConfigListResult + = new ActiveDirectoryConfigListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ActiveDirectoryConfigInner.fromJson(reader1)); + deserializedActiveDirectoryConfigListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedActiveDirectoryConfigListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedActiveDirectoryConfigListResult; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/BucketList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/BucketList.java new file mode 100644 index 000000000000..0271ea3a03ef --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/BucketList.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.BucketInner; +import java.io.IOException; +import java.util.List; + +/** + * List of volume bucket resources. + */ +@Immutable +public final class BucketList implements JsonSerializable { + /* + * The Bucket items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of BucketList class. + */ + private BucketList() { + } + + /** + * Get the value property: The Bucket 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 BucketList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(BucketList.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 BucketList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BucketList 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 BucketList. + */ + public static BucketList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BucketList deserializedBucketList = new BucketList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> BucketInner.fromJson(reader1)); + deserializedBucketList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedBucketList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBucketList; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/CacheList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/CacheList.java new file mode 100644 index 000000000000..1486f5308c9b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/CacheList.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.CacheInner; +import java.io.IOException; +import java.util.List; + +/** + * List of Cache resources. + */ +@Immutable +public final class CacheList implements JsonSerializable { + /* + * The Cache items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of CacheList class. + */ + private CacheList() { + } + + /** + * Get the value property: The Cache 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 CacheList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CacheList.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 CacheList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CacheList 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 CacheList. + */ + public static CacheList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CacheList deserializedCacheList = new CacheList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> CacheInner.fromJson(reader1)); + deserializedCacheList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedCacheList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCacheList; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticAccountListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticAccountListResult.java new file mode 100644 index 000000000000..39dc1ba7e341 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticAccountListResult.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.ElasticAccountInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ElasticAccount list operation. + */ +@Immutable +public final class ElasticAccountListResult implements JsonSerializable { + /* + * The ElasticAccount items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ElasticAccountListResult class. + */ + private ElasticAccountListResult() { + } + + /** + * Get the value property: The ElasticAccount items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ElasticAccountListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticAccountListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticAccountListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticAccountListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticAccountListResult. + */ + public static ElasticAccountListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticAccountListResult deserializedElasticAccountListResult = new ElasticAccountListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ElasticAccountInner.fromJson(reader1)); + deserializedElasticAccountListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedElasticAccountListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticAccountListResult; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupListResult.java new file mode 100644 index 000000000000..0667488f7b95 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupListResult.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ElasticBackup list operation. + */ +@Immutable +public final class ElasticBackupListResult implements JsonSerializable { + /* + * The ElasticBackup items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ElasticBackupListResult class. + */ + private ElasticBackupListResult() { + } + + /** + * Get the value property: The ElasticBackup items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ElasticBackupListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticBackupListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticBackupListResult. + */ + public static ElasticBackupListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupListResult deserializedElasticBackupListResult = new ElasticBackupListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ElasticBackupInner.fromJson(reader1)); + deserializedElasticBackupListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedElasticBackupListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupListResult; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupPolicyListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupPolicyListResult.java new file mode 100644 index 000000000000..aaaed85dae68 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupPolicyListResult.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupPolicyInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ElasticBackupPolicy list operation. + */ +@Immutable +public final class ElasticBackupPolicyListResult implements JsonSerializable { + /* + * The ElasticBackupPolicy items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ElasticBackupPolicyListResult class. + */ + private ElasticBackupPolicyListResult() { + } + + /** + * Get the value property: The ElasticBackupPolicy items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ElasticBackupPolicyListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticBackupPolicyListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupPolicyListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupPolicyListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticBackupPolicyListResult. + */ + public static ElasticBackupPolicyListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupPolicyListResult deserializedElasticBackupPolicyListResult + = new ElasticBackupPolicyListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ElasticBackupPolicyInner.fromJson(reader1)); + deserializedElasticBackupPolicyListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedElasticBackupPolicyListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupPolicyListResult; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupVaultListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupVaultListResult.java new file mode 100644 index 000000000000..a81d1b7f1925 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupVaultListResult.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupVaultInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ElasticBackupVault list operation. + */ +@Immutable +public final class ElasticBackupVaultListResult implements JsonSerializable { + /* + * The ElasticBackupVault items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ElasticBackupVaultListResult class. + */ + private ElasticBackupVaultListResult() { + } + + /** + * Get the value property: The ElasticBackupVault items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ElasticBackupVaultListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticBackupVaultListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupVaultListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupVaultListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticBackupVaultListResult. + */ + public static ElasticBackupVaultListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupVaultListResult deserializedElasticBackupVaultListResult = new ElasticBackupVaultListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ElasticBackupVaultInner.fromJson(reader1)); + deserializedElasticBackupVaultListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedElasticBackupVaultListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupVaultListResult; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticCapacityPoolListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticCapacityPoolListResult.java new file mode 100644 index 000000000000..9eccce4ead03 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticCapacityPoolListResult.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.ElasticCapacityPoolInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ElasticCapacityPool list operation. + */ +@Immutable +public final class ElasticCapacityPoolListResult implements JsonSerializable { + /* + * The ElasticCapacityPool items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ElasticCapacityPoolListResult class. + */ + private ElasticCapacityPoolListResult() { + } + + /** + * Get the value property: The ElasticCapacityPool items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ElasticCapacityPoolListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticCapacityPoolListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticCapacityPoolListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticCapacityPoolListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticCapacityPoolListResult. + */ + public static ElasticCapacityPoolListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticCapacityPoolListResult deserializedElasticCapacityPoolListResult + = new ElasticCapacityPoolListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ElasticCapacityPoolInner.fromJson(reader1)); + deserializedElasticCapacityPoolListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedElasticCapacityPoolListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticCapacityPoolListResult; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotListResult.java new file mode 100644 index 000000000000..c8fbd65c6204 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotListResult.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ElasticSnapshot list operation. + */ +@Immutable +public final class ElasticSnapshotListResult implements JsonSerializable { + /* + * The ElasticSnapshot items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ElasticSnapshotListResult class. + */ + private ElasticSnapshotListResult() { + } + + /** + * Get the value property: The ElasticSnapshot items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property value in model ElasticSnapshotListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticSnapshotListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticSnapshotListResult. + */ + public static ElasticSnapshotListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotListResult deserializedElasticSnapshotListResult = new ElasticSnapshotListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ElasticSnapshotInner.fromJson(reader1)); + deserializedElasticSnapshotListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedElasticSnapshotListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotListResult; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotPolicyListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotPolicyListResult.java new file mode 100644 index 000000000000..b67a4f4bcf8c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotPolicyListResult.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotPolicyInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ElasticSnapshotPolicy list operation. + */ +@Immutable +public final class ElasticSnapshotPolicyListResult implements JsonSerializable { + /* + * The ElasticSnapshotPolicy items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ElasticSnapshotPolicyListResult class. + */ + private ElasticSnapshotPolicyListResult() { + } + + /** + * Get the value property: The ElasticSnapshotPolicy items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ElasticSnapshotPolicyListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticSnapshotPolicyListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotPolicyListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotPolicyListResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticSnapshotPolicyListResult. + */ + public static ElasticSnapshotPolicyListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotPolicyListResult deserializedElasticSnapshotPolicyListResult + = new ElasticSnapshotPolicyListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ElasticSnapshotPolicyInner.fromJson(reader1)); + deserializedElasticSnapshotPolicyListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedElasticSnapshotPolicyListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotPolicyListResult; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotPolicyVolumeList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotPolicyVolumeList.java new file mode 100644 index 000000000000..e14266cfa95e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotPolicyVolumeList.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.ElasticVolumeInner; +import java.io.IOException; +import java.util.List; + +/** + * Elastic Volumes associated with Elastic Snapshot Policy. + */ +@Immutable +public final class ElasticSnapshotPolicyVolumeList implements JsonSerializable { + /* + * The ElasticVolume items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ElasticSnapshotPolicyVolumeList class. + */ + private ElasticSnapshotPolicyVolumeList() { + } + + /** + * Get the value property: The ElasticVolume items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ElasticSnapshotPolicyVolumeList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticSnapshotPolicyVolumeList.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotPolicyVolumeList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotPolicyVolumeList if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticSnapshotPolicyVolumeList. + */ + public static ElasticSnapshotPolicyVolumeList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotPolicyVolumeList deserializedElasticSnapshotPolicyVolumeList + = new ElasticSnapshotPolicyVolumeList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ElasticVolumeInner.fromJson(reader1)); + deserializedElasticSnapshotPolicyVolumeList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedElasticSnapshotPolicyVolumeList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotPolicyVolumeList; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticVolumeListResult.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticVolumeListResult.java new file mode 100644 index 000000000000..9ef3accbd8b3 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticVolumeListResult.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.netapp.fluent.models.ElasticVolumeInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ElasticVolume list operation. + */ +@Immutable +public final class ElasticVolumeListResult implements JsonSerializable { + /* + * The ElasticVolume items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ElasticVolumeListResult class. + */ + private ElasticVolumeListResult() { + } + + /** + * Get the value property: The ElasticVolume items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ElasticVolumeListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticVolumeListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticVolumeListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticVolumeListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticVolumeListResult. + */ + public static ElasticVolumeListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticVolumeListResult deserializedElasticVolumeListResult = new ElasticVolumeListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ElasticVolumeInner.fromJson(reader1)); + deserializedElasticVolumeListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedElasticVolumeListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticVolumeListResult; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/RansomwareReportsList.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/RansomwareReportsList.java new file mode 100644 index 000000000000..6f2ab778375b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/models/RansomwareReportsList.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.RansomwareReportInner; +import java.io.IOException; +import java.util.List; + +/** + * List of Advanced Ransomware Protection (ARP) reports. + */ +@Immutable +public final class RansomwareReportsList implements JsonSerializable { + /* + * The RansomwareReport items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of RansomwareReportsList class. + */ + private RansomwareReportsList() { + } + + /** + * Get the value property: The RansomwareReport 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 RansomwareReportsList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RansomwareReportsList.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 RansomwareReportsList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RansomwareReportsList 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 RansomwareReportsList. + */ + public static RansomwareReportsList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RansomwareReportsList deserializedRansomwareReportsList = new RansomwareReportsList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> RansomwareReportInner.fromJson(reader1)); + deserializedRansomwareReportsList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedRansomwareReportsList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRansomwareReportsList; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfig.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfig.java new file mode 100644 index 000000000000..f791224f4e96 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfig.java @@ -0,0 +1,309 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.ActiveDirectoryConfigInner; +import java.util.Map; + +/** + * An immutable client-side representation of ActiveDirectoryConfig. + */ +public interface ActiveDirectoryConfig { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + ActiveDirectoryConfigProperties properties(); + + /** + * Gets the etag property: "If etag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields."). + * + * @return the etag value. + */ + String etag(); + + /** + * Gets the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.ActiveDirectoryConfigInner object. + * + * @return the inner object. + */ + ActiveDirectoryConfigInner innerModel(); + + /** + * The entirety of the ActiveDirectoryConfig definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The ActiveDirectoryConfig definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ActiveDirectoryConfig definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the ActiveDirectoryConfig definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** + * The stage of the ActiveDirectoryConfig definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the ActiveDirectoryConfig definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithIdentity { + /** + * Executes the create request. + * + * @return the created resource. + */ + ActiveDirectoryConfig create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ActiveDirectoryConfig create(Context context); + } + + /** + * The stage of the ActiveDirectoryConfig definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the ActiveDirectoryConfig definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(ActiveDirectoryConfigProperties properties); + } + + /** + * The stage of the ActiveDirectoryConfig definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + } + + /** + * Begins update for the ActiveDirectoryConfig resource. + * + * @return the stage of resource update. + */ + ActiveDirectoryConfig.Update update(); + + /** + * The template for ActiveDirectoryConfig update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ActiveDirectoryConfig apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ActiveDirectoryConfig apply(Context context); + } + + /** + * The ActiveDirectoryConfig update stages. + */ + interface UpdateStages { + /** + * The stage of the ActiveDirectoryConfig update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + + /** + * The stage of the ActiveDirectoryConfig update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentity identity); + } + + /** + * The stage of the ActiveDirectoryConfig update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + Update withProperties(ActiveDirectoryConfigUpdateProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ActiveDirectoryConfig refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ActiveDirectoryConfig refresh(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigProperties.java new file mode 100644 index 000000000000..49fecd3169b6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigProperties.java @@ -0,0 +1,416 @@ +// Copyright (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 (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("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.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)); + 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 ("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 ("site".equals(fieldName)) { + deserializedActiveDirectoryConfigProperties.site = reader.getString(); + } else if ("backupOperators".equals(fieldName)) { + List backupOperators = reader.readArray(reader1 -> reader1.getString()); + deserializedActiveDirectoryConfigProperties.backupOperators = backupOperators; + } else if ("administrators".equals(fieldName)) { + List administrators = reader.readArray(reader1 -> reader1.getString()); + deserializedActiveDirectoryConfigProperties.administrators = administrators; + } else if ("securityOperators".equals(fieldName)) { + List securityOperators = reader.readArray(reader1 -> reader1.getString()); + deserializedActiveDirectoryConfigProperties.securityOperators = securityOperators; + } else if ("activeDirectoryStatus".equals(fieldName)) { + deserializedActiveDirectoryConfigProperties.activeDirectoryStatus + = ActiveDirectoryStatus.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedActiveDirectoryConfigProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedActiveDirectoryConfigProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigUpdate.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigUpdate.java new file mode 100644 index 000000000000..bbd3b5956700 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigUpdate.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The type used for update operations of the ActiveDirectoryConfig. + */ +@Fluent +public final class ActiveDirectoryConfigUpdate implements JsonSerializable { + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentity identity; + + /* + * Resource tags. + */ + private Map tags; + + /* + * The resource-specific properties for this resource. + */ + private ActiveDirectoryConfigUpdateProperties properties; + + /** + * Creates an instance of ActiveDirectoryConfigUpdate class. + */ + public ActiveDirectoryConfigUpdate() { + } + + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the ActiveDirectoryConfigUpdate object itself. + */ + public ActiveDirectoryConfigUpdate withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the ActiveDirectoryConfigUpdate object itself. + */ + public ActiveDirectoryConfigUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ActiveDirectoryConfigUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ActiveDirectoryConfigUpdate object itself. + */ + public ActiveDirectoryConfigUpdate withProperties(ActiveDirectoryConfigUpdateProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActiveDirectoryConfigUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActiveDirectoryConfigUpdate if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ActiveDirectoryConfigUpdate. + */ + public static ActiveDirectoryConfigUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActiveDirectoryConfigUpdate deserializedActiveDirectoryConfigUpdate = new ActiveDirectoryConfigUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("identity".equals(fieldName)) { + deserializedActiveDirectoryConfigUpdate.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedActiveDirectoryConfigUpdate.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedActiveDirectoryConfigUpdate.properties + = ActiveDirectoryConfigUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedActiveDirectoryConfigUpdate; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigUpdateProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigUpdateProperties.java new file mode 100644 index 000000000000..bcf5c74329a3 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigUpdateProperties.java @@ -0,0 +1,370 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The updatable properties of the ActiveDirectoryConfig. + */ +@Fluent +public final class ActiveDirectoryConfigUpdateProperties + implements JsonSerializable { + /* + * A domain user account with permission to create machine accounts + */ + private String userName; + + /* + * An array of DNS server IP addresses(IPv4 only) for the Active Directory + */ + private List dns; + + /* + * NetBIOS name of the SMB server. This name will be registered as a computer account in the AD and used to mount + * volumes + */ + private String smbServerName; + + /* + * The Organizational Unit (OU) within the Windows Active Directory + */ + private String organizationalUnit; + + /* + * The Active Directory site the service will limit Domain Controller discovery to + */ + private String site; + + /* + * Users to be added to the Built-in Backup Operator active directory group. A list of unique usernames without + * domain specifier + */ + private List backupOperators; + + /* + * Users to be added to the Built-in Administrators active directory group. A list of unique usernames without + * domain specifier + */ + private List administrators; + + /* + * Domain Users in the Active directory to be given SecurityPrivilege privilege (Needed for SMB Continuously + * available shares for SQL). A list of unique usernames without domain specifier + */ + private List securityOperators; + + /* + * Name of the Active Directory domain + */ + private String domain; + + /* + * Access password from Azure KeyVault Secrets to connect Active Directory + */ + private SecretPassword secretPassword; + + /** + * Creates an instance of ActiveDirectoryConfigUpdateProperties class. + */ + public ActiveDirectoryConfigUpdateProperties() { + } + + /** + * Get the userName property: A domain user account with permission to create machine accounts. + * + * @return the userName value. + */ + public String userName() { + return this.userName; + } + + /** + * Set the userName property: A domain user account with permission to create machine accounts. + * + * @param userName the userName value to set. + * @return the ActiveDirectoryConfigUpdateProperties object itself. + */ + public ActiveDirectoryConfigUpdateProperties withUserName(String userName) { + this.userName = userName; + return this; + } + + /** + * Get the dns property: An array of DNS server IP addresses(IPv4 only) for the Active Directory. + * + * @return the dns value. + */ + public List dns() { + return this.dns; + } + + /** + * Set the dns property: An array of DNS server IP addresses(IPv4 only) for the Active Directory. + * + * @param dns the dns value to set. + * @return the ActiveDirectoryConfigUpdateProperties object itself. + */ + public ActiveDirectoryConfigUpdateProperties withDns(List dns) { + this.dns = dns; + return this; + } + + /** + * Get the smbServerName property: NetBIOS name of the SMB server. This name will be registered as a computer + * account in the AD and used to mount volumes. + * + * @return the smbServerName value. + */ + public String smbServerName() { + return this.smbServerName; + } + + /** + * Set the smbServerName property: NetBIOS name of the SMB server. This name will be registered as a computer + * account in the AD and used to mount volumes. + * + * @param smbServerName the smbServerName value to set. + * @return the ActiveDirectoryConfigUpdateProperties object itself. + */ + public ActiveDirectoryConfigUpdateProperties withSmbServerName(String smbServerName) { + this.smbServerName = smbServerName; + return this; + } + + /** + * Get the organizationalUnit property: The Organizational Unit (OU) within the Windows Active Directory. + * + * @return the organizationalUnit value. + */ + public String organizationalUnit() { + return this.organizationalUnit; + } + + /** + * Set the organizationalUnit property: The Organizational Unit (OU) within the Windows Active Directory. + * + * @param organizationalUnit the organizationalUnit value to set. + * @return the ActiveDirectoryConfigUpdateProperties object itself. + */ + public ActiveDirectoryConfigUpdateProperties withOrganizationalUnit(String organizationalUnit) { + this.organizationalUnit = organizationalUnit; + return this; + } + + /** + * Get the site property: The Active Directory site the service will limit Domain Controller discovery to. + * + * @return the site value. + */ + public String site() { + return this.site; + } + + /** + * Set the site property: The Active Directory site the service will limit Domain Controller discovery to. + * + * @param site the site value to set. + * @return the ActiveDirectoryConfigUpdateProperties object itself. + */ + public ActiveDirectoryConfigUpdateProperties withSite(String site) { + this.site = site; + return this; + } + + /** + * Get the backupOperators property: Users to be added to the Built-in Backup Operator active directory group. A + * list of unique usernames without domain specifier. + * + * @return the backupOperators value. + */ + public List backupOperators() { + return this.backupOperators; + } + + /** + * Set the backupOperators property: Users to be added to the Built-in Backup Operator active directory group. A + * list of unique usernames without domain specifier. + * + * @param backupOperators the backupOperators value to set. + * @return the ActiveDirectoryConfigUpdateProperties object itself. + */ + public ActiveDirectoryConfigUpdateProperties withBackupOperators(List backupOperators) { + this.backupOperators = backupOperators; + return this; + } + + /** + * Get the administrators property: Users to be added to the Built-in Administrators active directory group. A list + * of unique usernames without domain specifier. + * + * @return the administrators value. + */ + public List administrators() { + return this.administrators; + } + + /** + * Set the administrators property: Users to be added to the Built-in Administrators active directory group. A list + * of unique usernames without domain specifier. + * + * @param administrators the administrators value to set. + * @return the ActiveDirectoryConfigUpdateProperties object itself. + */ + public ActiveDirectoryConfigUpdateProperties withAdministrators(List administrators) { + this.administrators = administrators; + return this; + } + + /** + * Get the securityOperators property: Domain Users in the Active directory to be given SecurityPrivilege privilege + * (Needed for SMB Continuously available shares for SQL). A list of unique usernames without domain specifier. + * + * @return the securityOperators value. + */ + public List securityOperators() { + return this.securityOperators; + } + + /** + * Set the securityOperators property: Domain Users in the Active directory to be given SecurityPrivilege privilege + * (Needed for SMB Continuously available shares for SQL). A list of unique usernames without domain specifier. + * + * @param securityOperators the securityOperators value to set. + * @return the ActiveDirectoryConfigUpdateProperties object itself. + */ + public ActiveDirectoryConfigUpdateProperties withSecurityOperators(List securityOperators) { + this.securityOperators = securityOperators; + return this; + } + + /** + * Get the domain property: Name of the Active Directory domain. + * + * @return the domain value. + */ + public String domain() { + return this.domain; + } + + /** + * Set the domain property: Name of the Active Directory domain. + * + * @param domain the domain value to set. + * @return the ActiveDirectoryConfigUpdateProperties object itself. + */ + public ActiveDirectoryConfigUpdateProperties withDomain(String domain) { + this.domain = domain; + return this; + } + + /** + * Get the secretPassword property: Access password from Azure KeyVault Secrets to connect Active Directory. + * + * @return the secretPassword value. + */ + public SecretPassword secretPassword() { + return this.secretPassword; + } + + /** + * Set the secretPassword property: Access password from Azure KeyVault Secrets to connect Active Directory. + * + * @param secretPassword the secretPassword value to set. + * @return the ActiveDirectoryConfigUpdateProperties object itself. + */ + public ActiveDirectoryConfigUpdateProperties withSecretPassword(SecretPassword secretPassword) { + this.secretPassword = secretPassword; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (secretPassword() != null) { + secretPassword().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("userName", this.userName); + jsonWriter.writeArrayField("dns", this.dns, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("smbServerName", this.smbServerName); + jsonWriter.writeStringField("organizationalUnit", this.organizationalUnit); + jsonWriter.writeStringField("site", this.site); + jsonWriter.writeArrayField("backupOperators", this.backupOperators, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("administrators", this.administrators, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("securityOperators", this.securityOperators, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("domain", this.domain); + jsonWriter.writeJsonField("secretPassword", this.secretPassword); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActiveDirectoryConfigUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActiveDirectoryConfigUpdateProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ActiveDirectoryConfigUpdateProperties. + */ + public static ActiveDirectoryConfigUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActiveDirectoryConfigUpdateProperties deserializedActiveDirectoryConfigUpdateProperties + = new ActiveDirectoryConfigUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("userName".equals(fieldName)) { + deserializedActiveDirectoryConfigUpdateProperties.userName = reader.getString(); + } else if ("dns".equals(fieldName)) { + List dns = reader.readArray(reader1 -> reader1.getString()); + deserializedActiveDirectoryConfigUpdateProperties.dns = dns; + } else if ("smbServerName".equals(fieldName)) { + deserializedActiveDirectoryConfigUpdateProperties.smbServerName = reader.getString(); + } else if ("organizationalUnit".equals(fieldName)) { + deserializedActiveDirectoryConfigUpdateProperties.organizationalUnit = reader.getString(); + } else if ("site".equals(fieldName)) { + deserializedActiveDirectoryConfigUpdateProperties.site = reader.getString(); + } else if ("backupOperators".equals(fieldName)) { + List backupOperators = reader.readArray(reader1 -> reader1.getString()); + deserializedActiveDirectoryConfigUpdateProperties.backupOperators = backupOperators; + } else if ("administrators".equals(fieldName)) { + List administrators = reader.readArray(reader1 -> reader1.getString()); + deserializedActiveDirectoryConfigUpdateProperties.administrators = administrators; + } else if ("securityOperators".equals(fieldName)) { + List securityOperators = reader.readArray(reader1 -> reader1.getString()); + deserializedActiveDirectoryConfigUpdateProperties.securityOperators = securityOperators; + } else if ("domain".equals(fieldName)) { + deserializedActiveDirectoryConfigUpdateProperties.domain = reader.getString(); + } else if ("secretPassword".equals(fieldName)) { + deserializedActiveDirectoryConfigUpdateProperties.secretPassword = SecretPassword.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedActiveDirectoryConfigUpdateProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigs.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigs.java new file mode 100644 index 000000000000..512c71a48c3a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigs.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ActiveDirectoryConfigs. + */ +public interface ActiveDirectoryConfigs { + /** + * Get the details of the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified active directory configuration along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, + String activeDirectoryConfigName, Context context); + + /** + * Get the details of the specified active directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified active directory configuration. + */ + ActiveDirectoryConfig getByResourceGroup(String resourceGroupName, String activeDirectoryConfigName); + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String activeDirectoryConfigName); + + /** + * Delete the specified Active Directory configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param activeDirectoryConfigName The name of the ActiveDirectoryConfig. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String activeDirectoryConfigName, Context context); + + /** + * List all active directory configurations within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List all active directory configurations within the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List all active directory configurations within the subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List all active directory configurations within the subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ActiveDirectoryConfig list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Get the details of the specified active directory configuration. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified active directory configuration along with {@link Response}. + */ + ActiveDirectoryConfig getById(String id); + + /** + * Get the details of the specified active directory configuration. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details of the specified active directory configuration along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete the specified Active Directory configuration. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete the specified Active Directory configuration. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ActiveDirectoryConfig resource. + * + * @param name resource name. + * @return the first stage of the new ActiveDirectoryConfig definition. + */ + ActiveDirectoryConfig.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActualRansomwareProtectionState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActualRansomwareProtectionState.java new file mode 100644 index 000000000000..df9c87f1e1e6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ActualRansomwareProtectionState.java @@ -0,0 +1,61 @@ +// Copyright (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 actual state of the Advanced Ransomware Protection feature. + */ +public final class ActualRansomwareProtectionState extends ExpandableStringEnum { + /** + * Advanced Ransomware Protection is disabled. + */ + public static final ActualRansomwareProtectionState DISABLED = fromString("Disabled"); + + /** + * Advanced Ransomware Protection is enabled. + */ + public static final ActualRansomwareProtectionState ENABLED = fromString("Enabled"); + + /** + * Advanced Ransomware Protection is in learning mode. + */ + public static final ActualRansomwareProtectionState LEARNING = fromString("Learning"); + + /** + * Advanced Ransomware Protection is in paused state. + */ + public static final ActualRansomwareProtectionState PAUSED = fromString("Paused"); + + /** + * Creates a new instance of ActualRansomwareProtectionState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ActualRansomwareProtectionState() { + } + + /** + * Creates or finds a ActualRansomwareProtectionState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ActualRansomwareProtectionState. + */ + public static ActualRansomwareProtectionState fromString(String name) { + return fromString(name, ActualRansomwareProtectionState.class); + } + + /** + * Gets known ActualRansomwareProtectionState values. + * + * @return known ActualRansomwareProtectionState values. + */ + public static Collection values() { + return values(ActualRansomwareProtectionState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BreakthroughMode.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BreakthroughMode.java new file mode 100644 index 000000000000..da586612fc56 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BreakthroughMode.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; + +/** + * Specifies whether the volume operates in Breakthrough Mode. When set to 'Enabled', the volume runs on the resources + * configured for this mode, + * delivering improved performance and higher throughput. If set to 'Disabled' or omitted, the volume uses the basic + * configuration. This feature + * is available only in regions where it’s been configured and first-time users must finish onboarding prior to using + * Breakthrough Mode. + */ +public final class BreakthroughMode extends ExpandableStringEnum { + /** + * The volume runs on the resources configured for Breakthrough mode which ensures consistent high performance and a + * higher throughput. + */ + public static final BreakthroughMode ENABLED = fromString("Enabled"); + + /** + * The volume uses configuration that provides basic performance and throughput. + */ + public static final BreakthroughMode DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of BreakthroughMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BreakthroughMode() { + } + + /** + * Creates or finds a BreakthroughMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding BreakthroughMode. + */ + public static BreakthroughMode fromString(String name) { + return fromString(name, BreakthroughMode.class); + } + + /** + * Gets known BreakthroughMode values. + * + * @return known BreakthroughMode values. + */ + public static Collection values() { + return values(BreakthroughMode.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Bucket.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Bucket.java new file mode 100644 index 000000000000..f392b694999e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Bucket.java @@ -0,0 +1,353 @@ +// Copyright (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.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.BucketInner; + +/** + * An immutable client-side representation of Bucket. + */ +public interface Bucket { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the path property: The volume path mounted inside the bucket. The default is the root path '/' if no value + * is provided when the bucket is created. + * + * @return the path value. + */ + String path(); + + /** + * Gets the fileSystemUser property: File System user having access to volume data. For Unix, this is the user's uid + * and gid. For Windows, this is the user's username. Note that the Unix and Windows user details are mutually + * exclusive, meaning one or other must be supplied, but not both. + * + * @return the fileSystemUser value. + */ + FileSystemUser fileSystemUser(); + + /** + * Gets the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the status property: The bucket credentials status. There states: + * + * "NoCredentialsSet": Access and Secret key pair have not been generated. + * "CredentialsExpired": Access and Secret key pair have expired. + * "Active": The certificate has been installed and credentials are unexpired. + * + * @return the status value. + */ + CredentialsStatus status(); + + /** + * Gets the server property: Properties of the server managing the lifecycle of volume buckets. + * + * @return the server value. + */ + BucketServerProperties server(); + + /** + * Gets the permissions property: Access permissions for the bucket. Either ReadOnly or ReadWrite. The default is + * ReadOnly if no value is provided during bucket creation. + * + * @return the permissions value. + */ + BucketPermissions permissions(); + + /** + * 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.BucketInner object. + * + * @return the inner object. + */ + BucketInner innerModel(); + + /** + * The entirety of the Bucket definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The Bucket definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the Bucket definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the Bucket 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 NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @return the next definition stage. + */ + WithCreate withExistingVolume(String resourceGroupName, String accountName, String poolName, + String volumeName); + } + + /** + * The stage of the Bucket 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.WithPath, DefinitionStages.WithFileSystemUser, + DefinitionStages.WithServer, DefinitionStages.WithPermissions { + /** + * Executes the create request. + * + * @return the created resource. + */ + Bucket create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Bucket create(Context context); + } + + /** + * The stage of the Bucket definition allowing to specify path. + */ + interface WithPath { + /** + * Specifies the path property: The volume path mounted inside the bucket. The default is the root path '/' + * if no value is provided when the bucket is created.. + * + * @param path The volume path mounted inside the bucket. The default is the root path '/' if no value is + * provided when the bucket is created. + * @return the next definition stage. + */ + WithCreate withPath(String path); + } + + /** + * The stage of the Bucket definition allowing to specify fileSystemUser. + */ + interface WithFileSystemUser { + /** + * Specifies the fileSystemUser property: File System user having access to volume data. For Unix, this is + * the user's uid and gid. For Windows, this is the user's username. Note that the Unix and Windows user + * details are mutually exclusive, meaning one or other must be supplied, but not both.. + * + * @param fileSystemUser File System user having access to volume data. For Unix, this is the user's uid and + * gid. For Windows, this is the user's username. Note that the Unix and Windows user details are mutually + * exclusive, meaning one or other must be supplied, but not both. + * @return the next definition stage. + */ + WithCreate withFileSystemUser(FileSystemUser fileSystemUser); + } + + /** + * The stage of the Bucket definition allowing to specify server. + */ + interface WithServer { + /** + * Specifies the server property: Properties of the server managing the lifecycle of volume buckets. + * + * @param server Properties of the server managing the lifecycle of volume buckets. + * @return the next definition stage. + */ + WithCreate withServer(BucketServerProperties server); + } + + /** + * The stage of the Bucket definition allowing to specify permissions. + */ + interface WithPermissions { + /** + * Specifies the permissions property: Access permissions for the bucket. Either ReadOnly or ReadWrite. The + * default is ReadOnly if no value is provided during bucket creation.. + * + * @param permissions Access permissions for the bucket. Either ReadOnly or ReadWrite. The default is + * ReadOnly if no value is provided during bucket creation. + * @return the next definition stage. + */ + WithCreate withPermissions(BucketPermissions permissions); + } + } + + /** + * Begins update for the Bucket resource. + * + * @return the stage of resource update. + */ + Bucket.Update update(); + + /** + * The template for Bucket update. + */ + interface Update extends UpdateStages.WithPath, UpdateStages.WithFileSystemUser, UpdateStages.WithServer, + UpdateStages.WithPermissions { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Bucket apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Bucket apply(Context context); + } + + /** + * The Bucket update stages. + */ + interface UpdateStages { + /** + * The stage of the Bucket update allowing to specify path. + */ + interface WithPath { + /** + * Specifies the path property: The volume path mounted inside the bucket.. + * + * @param path The volume path mounted inside the bucket. + * @return the next definition stage. + */ + Update withPath(String path); + } + + /** + * The stage of the Bucket update allowing to specify fileSystemUser. + */ + interface WithFileSystemUser { + /** + * Specifies the fileSystemUser property: File System user having access to volume data. For Unix, this is + * the user's uid and gid. For Windows, this is the user's username. Note that the Unix and Windows user + * details are mutually exclusive, meaning one or other must be supplied, but not both.. + * + * @param fileSystemUser File System user having access to volume data. For Unix, this is the user's uid and + * gid. For Windows, this is the user's username. Note that the Unix and Windows user details are mutually + * exclusive, meaning one or other must be supplied, but not both. + * @return the next definition stage. + */ + Update withFileSystemUser(FileSystemUser fileSystemUser); + } + + /** + * The stage of the Bucket update allowing to specify server. + */ + interface WithServer { + /** + * Specifies the server property: Properties of the server managing the lifecycle of volume buckets. + * + * @param server Properties of the server managing the lifecycle of volume buckets. + * @return the next definition stage. + */ + Update withServer(BucketServerPatchProperties server); + } + + /** + * The stage of the Bucket update allowing to specify permissions. + */ + interface WithPermissions { + /** + * Specifies the permissions property: Access permissions for the bucket. Either ReadOnly or ReadWrite.. + * + * @param permissions Access permissions for the bucket. Either ReadOnly or ReadWrite. + * @return the next definition stage. + */ + Update withPermissions(BucketPatchPermissions permissions); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Bucket refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Bucket refresh(Context context); + + /** + * Generate the access key and secret key used for accessing the specified volume bucket. Also return expiry date + * and time of key pair (in UTC). + * + * @param body The bucket's Access and Secret key pair expiry time expressed as the number of days from now. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket Access Key, Secret Key, and Expiry date and time of the key pair along with {@link Response}. + */ + Response generateCredentialsWithResponse(BucketCredentialsExpiry body, Context context); + + /** + * Generate the access key and secret key used for accessing the specified volume bucket. Also return expiry date + * and time of key pair (in UTC). + * + * @param body The bucket's Access and Secret key pair expiry time expressed as the number of days from now. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket Access Key, Secret Key, and Expiry date and time of the key pair. + */ + BucketGenerateCredentials generateCredentials(BucketCredentialsExpiry body); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketCredentialsExpiry.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketCredentialsExpiry.java new file mode 100644 index 000000000000..4083449bd067 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketCredentialsExpiry.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; + +/** + * The bucket's Access and Secret key pair Expiry Time expressed as the number of days from now. + */ +@Fluent +public final class BucketCredentialsExpiry implements JsonSerializable { + /* + * The number of days from now until the newly generated Access and Secret key pair will expire. + */ + private Integer keyPairExpiryDays; + + /** + * Creates an instance of BucketCredentialsExpiry class. + */ + public BucketCredentialsExpiry() { + } + + /** + * Get the keyPairExpiryDays property: The number of days from now until the newly generated Access and Secret key + * pair will expire. + * + * @return the keyPairExpiryDays value. + */ + public Integer keyPairExpiryDays() { + return this.keyPairExpiryDays; + } + + /** + * Set the keyPairExpiryDays property: The number of days from now until the newly generated Access and Secret key + * pair will expire. + * + * @param keyPairExpiryDays the keyPairExpiryDays value to set. + * @return the BucketCredentialsExpiry object itself. + */ + public BucketCredentialsExpiry withKeyPairExpiryDays(Integer keyPairExpiryDays) { + this.keyPairExpiryDays = keyPairExpiryDays; + 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("keyPairExpiryDays", this.keyPairExpiryDays); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BucketCredentialsExpiry from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BucketCredentialsExpiry 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 BucketCredentialsExpiry. + */ + public static BucketCredentialsExpiry fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BucketCredentialsExpiry deserializedBucketCredentialsExpiry = new BucketCredentialsExpiry(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyPairExpiryDays".equals(fieldName)) { + deserializedBucketCredentialsExpiry.keyPairExpiryDays = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedBucketCredentialsExpiry; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketGenerateCredentials.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketGenerateCredentials.java new file mode 100644 index 000000000000..040b956cb2d8 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketGenerateCredentials.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.models; + +import com.azure.resourcemanager.netapp.fluent.models.BucketGenerateCredentialsInner; +import java.time.OffsetDateTime; + +/** + * An immutable client-side representation of BucketGenerateCredentials. + */ +public interface BucketGenerateCredentials { + /** + * Gets the accessKey property: The Access Key that is required along with the Secret Key to access the bucket. + * + * @return the accessKey value. + */ + String accessKey(); + + /** + * Gets the secretKey property: The Secret Key that is required along with the Access Key to access the bucket. + * + * @return the secretKey value. + */ + String secretKey(); + + /** + * Gets the keyPairExpiry property: The bucket's Access and Secret key pair expiry date and time (in UTC). + * + * @return the keyPairExpiry value. + */ + OffsetDateTime keyPairExpiry(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.BucketGenerateCredentialsInner object. + * + * @return the inner object. + */ + BucketGenerateCredentialsInner innerModel(); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketPatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketPatch.java new file mode 100644 index 000000000000..04be84fa6aa0 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketPatch.java @@ -0,0 +1,260 @@ +// Copyright (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.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.fluent.models.BucketPatchProperties; +import java.io.IOException; + +/** + * Bucket resource. + */ +@Fluent +public final class BucketPatch extends ProxyResource { + /* + * Bucket properties + */ + private BucketPatchProperties innerProperties; + + /* + * 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 BucketPatch class. + */ + public BucketPatch() { + } + + /** + * Get the innerProperties property: Bucket properties. + * + * @return the innerProperties value. + */ + private BucketPatchProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the 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; + } + + /** + * Get the path property: The volume path mounted inside the bucket. + * + * @return the path value. + */ + public String path() { + return this.innerProperties() == null ? null : this.innerProperties().path(); + } + + /** + * Set the path property: The volume path mounted inside the bucket. + * + * @param path the path value to set. + * @return the BucketPatch object itself. + */ + public BucketPatch withPath(String path) { + if (this.innerProperties() == null) { + this.innerProperties = new BucketPatchProperties(); + } + this.innerProperties().withPath(path); + return this; + } + + /** + * Get the fileSystemUser property: File System user having access to volume data. For Unix, this is the user's uid + * and gid. For Windows, this is the user's username. Note that the Unix and Windows user details are mutually + * exclusive, meaning one or other must be supplied, but not both. + * + * @return the fileSystemUser value. + */ + public FileSystemUser fileSystemUser() { + return this.innerProperties() == null ? null : this.innerProperties().fileSystemUser(); + } + + /** + * Set the fileSystemUser property: File System user having access to volume data. For Unix, this is the user's uid + * and gid. For Windows, this is the user's username. Note that the Unix and Windows user details are mutually + * exclusive, meaning one or other must be supplied, but not both. + * + * @param fileSystemUser the fileSystemUser value to set. + * @return the BucketPatch object itself. + */ + public BucketPatch withFileSystemUser(FileSystemUser fileSystemUser) { + if (this.innerProperties() == null) { + this.innerProperties = new BucketPatchProperties(); + } + this.innerProperties().withFileSystemUser(fileSystemUser); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the server property: Properties of the server managing the lifecycle of volume buckets. + * + * @return the server value. + */ + public BucketServerPatchProperties server() { + return this.innerProperties() == null ? null : this.innerProperties().server(); + } + + /** + * Set the server property: Properties of the server managing the lifecycle of volume buckets. + * + * @param server the server value to set. + * @return the BucketPatch object itself. + */ + public BucketPatch withServer(BucketServerPatchProperties server) { + if (this.innerProperties() == null) { + this.innerProperties = new BucketPatchProperties(); + } + this.innerProperties().withServer(server); + return this; + } + + /** + * Get the permissions property: Access permissions for the bucket. Either ReadOnly or ReadWrite. + * + * @return the permissions value. + */ + public BucketPatchPermissions permissions() { + return this.innerProperties() == null ? null : this.innerProperties().permissions(); + } + + /** + * Set the permissions property: Access permissions for the bucket. Either ReadOnly or ReadWrite. + * + * @param permissions the permissions value to set. + * @return the BucketPatch object itself. + */ + public BucketPatch withPermissions(BucketPatchPermissions permissions) { + if (this.innerProperties() == null) { + this.innerProperties = new BucketPatchProperties(); + } + this.innerProperties().withPermissions(permissions); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BucketPatch from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BucketPatch 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 BucketPatch. + */ + public static BucketPatch fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BucketPatch deserializedBucketPatch = new BucketPatch(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedBucketPatch.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedBucketPatch.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedBucketPatch.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedBucketPatch.innerProperties = BucketPatchProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedBucketPatch.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedBucketPatch; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketPatchPermissions.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketPatchPermissions.java new file mode 100644 index 000000000000..f75534272fec --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketPatchPermissions.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; + +/** + * Access permissions for the bucket. Either ReadOnly or ReadWrite. + */ +public final class BucketPatchPermissions extends ExpandableStringEnum { + /** + * Read-only access to bucket. + */ + public static final BucketPatchPermissions READ_ONLY = fromString("ReadOnly"); + + /** + * Read-write access to bucket. + */ + public static final BucketPatchPermissions READ_WRITE = fromString("ReadWrite"); + + /** + * Creates a new instance of BucketPatchPermissions value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BucketPatchPermissions() { + } + + /** + * Creates or finds a BucketPatchPermissions from its string representation. + * + * @param name a name to look for. + * @return the corresponding BucketPatchPermissions. + */ + public static BucketPatchPermissions fromString(String name) { + return fromString(name, BucketPatchPermissions.class); + } + + /** + * Gets known BucketPatchPermissions values. + * + * @return known BucketPatchPermissions values. + */ + public static Collection values() { + return values(BucketPatchPermissions.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketPermissions.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketPermissions.java new file mode 100644 index 000000000000..2b5f6b4a760d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketPermissions.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; + +/** + * Access permissions for the bucket. Either ReadOnly or ReadWrite. The default is ReadOnly if no value is provided + * during bucket creation. + */ +public final class BucketPermissions extends ExpandableStringEnum { + /** + * Read-only access to bucket. + */ + public static final BucketPermissions READ_ONLY = fromString("ReadOnly"); + + /** + * Read-write access to bucket. + */ + public static final BucketPermissions READ_WRITE = fromString("ReadWrite"); + + /** + * Creates a new instance of BucketPermissions value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BucketPermissions() { + } + + /** + * Creates or finds a BucketPermissions from its string representation. + * + * @param name a name to look for. + * @return the corresponding BucketPermissions. + */ + public static BucketPermissions fromString(String name) { + return fromString(name, BucketPermissions.class); + } + + /** + * Gets known BucketPermissions values. + * + * @return known BucketPermissions values. + */ + public static Collection values() { + return values(BucketPermissions.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketServerPatchProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketServerPatchProperties.java new file mode 100644 index 000000000000..045340a9c455 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketServerPatchProperties.java @@ -0,0 +1,128 @@ +// Copyright (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 the server managing the lifecycle of volume buckets. + */ +@Fluent +public final class BucketServerPatchProperties implements JsonSerializable { + /* + * The host part of the bucket URL, resolving to the bucket IP address and allowed by the server certificate. + */ + private String fqdn; + + /* + * A base64-encoded PEM file, which includes both the bucket server's certificate and private key. It is used to + * authenticate the user and allows access to volume data in a read-only manner. + */ + private String certificateObject; + + /** + * Creates an instance of BucketServerPatchProperties class. + */ + public BucketServerPatchProperties() { + } + + /** + * Get the fqdn property: The host part of the bucket URL, resolving to the bucket IP address and allowed by the + * server certificate. + * + * @return the fqdn value. + */ + public String fqdn() { + return this.fqdn; + } + + /** + * Set the fqdn property: The host part of the bucket URL, resolving to the bucket IP address and allowed by the + * server certificate. + * + * @param fqdn the fqdn value to set. + * @return the BucketServerPatchProperties object itself. + */ + public BucketServerPatchProperties withFqdn(String fqdn) { + this.fqdn = fqdn; + return this; + } + + /** + * Get the certificateObject property: A base64-encoded PEM file, which includes both the bucket server's + * certificate and private key. It is used to authenticate the user and allows access to volume data in a read-only + * manner. + * + * @return the certificateObject value. + */ + public String certificateObject() { + return this.certificateObject; + } + + /** + * Set the certificateObject property: A base64-encoded PEM file, which includes both the bucket server's + * certificate and private key. It is used to authenticate the user and allows access to volume data in a read-only + * manner. + * + * @param certificateObject the certificateObject value to set. + * @return the BucketServerPatchProperties object itself. + */ + public BucketServerPatchProperties withCertificateObject(String certificateObject) { + this.certificateObject = certificateObject; + 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("fqdn", this.fqdn); + jsonWriter.writeStringField("certificateObject", this.certificateObject); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BucketServerPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BucketServerPatchProperties 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 BucketServerPatchProperties. + */ + public static BucketServerPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BucketServerPatchProperties deserializedBucketServerPatchProperties = new BucketServerPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("fqdn".equals(fieldName)) { + deserializedBucketServerPatchProperties.fqdn = reader.getString(); + } else if ("certificateObject".equals(fieldName)) { + deserializedBucketServerPatchProperties.certificateObject = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBucketServerPatchProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketServerProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketServerProperties.java new file mode 100644 index 000000000000..c4381ffbc351 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/BucketServerProperties.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.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +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; + +/** + * Properties of the server managing the lifecycle of volume buckets. + */ +@Fluent +public final class BucketServerProperties implements JsonSerializable { + /* + * The host part of the bucket URL, resolving to the bucket IP address and allowed by the server certificate. + */ + private String fqdn; + + /* + * Certificate Common Name taken from the certificate installed on the bucket server + */ + private String certificateCommonName; + + /* + * The bucket server's certificate expiry date. + */ + private OffsetDateTime certificateExpiryDate; + + /* + * The bucket server's IPv4 address + */ + private String ipAddress; + + /* + * A base64-encoded PEM file, which includes both the bucket server's certificate and private key. It is used to + * authenticate the user and allows access to volume data in a read-only manner. + */ + private String certificateObject; + + /** + * Creates an instance of BucketServerProperties class. + */ + public BucketServerProperties() { + } + + /** + * Get the fqdn property: The host part of the bucket URL, resolving to the bucket IP address and allowed by the + * server certificate. + * + * @return the fqdn value. + */ + public String fqdn() { + return this.fqdn; + } + + /** + * Set the fqdn property: The host part of the bucket URL, resolving to the bucket IP address and allowed by the + * server certificate. + * + * @param fqdn the fqdn value to set. + * @return the BucketServerProperties object itself. + */ + public BucketServerProperties withFqdn(String fqdn) { + this.fqdn = fqdn; + return this; + } + + /** + * Get the certificateCommonName property: Certificate Common Name taken from the certificate installed on the + * bucket server. + * + * @return the certificateCommonName value. + */ + public String certificateCommonName() { + return this.certificateCommonName; + } + + /** + * Get the certificateExpiryDate property: The bucket server's certificate expiry date. + * + * @return the certificateExpiryDate value. + */ + public OffsetDateTime certificateExpiryDate() { + return this.certificateExpiryDate; + } + + /** + * Get the ipAddress property: The bucket server's IPv4 address. + * + * @return the ipAddress value. + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Get the certificateObject property: A base64-encoded PEM file, which includes both the bucket server's + * certificate and private key. It is used to authenticate the user and allows access to volume data in a read-only + * manner. + * + * @return the certificateObject value. + */ + public String certificateObject() { + return this.certificateObject; + } + + /** + * Set the certificateObject property: A base64-encoded PEM file, which includes both the bucket server's + * certificate and private key. It is used to authenticate the user and allows access to volume data in a read-only + * manner. + * + * @param certificateObject the certificateObject value to set. + * @return the BucketServerProperties object itself. + */ + public BucketServerProperties withCertificateObject(String certificateObject) { + this.certificateObject = certificateObject; + 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("fqdn", this.fqdn); + jsonWriter.writeStringField("certificateObject", this.certificateObject); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BucketServerProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BucketServerProperties 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 BucketServerProperties. + */ + public static BucketServerProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BucketServerProperties deserializedBucketServerProperties = new BucketServerProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("fqdn".equals(fieldName)) { + deserializedBucketServerProperties.fqdn = reader.getString(); + } else if ("certificateCommonName".equals(fieldName)) { + deserializedBucketServerProperties.certificateCommonName = reader.getString(); + } else if ("certificateExpiryDate".equals(fieldName)) { + deserializedBucketServerProperties.certificateExpiryDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("ipAddress".equals(fieldName)) { + deserializedBucketServerProperties.ipAddress = reader.getString(); + } else if ("certificateObject".equals(fieldName)) { + deserializedBucketServerProperties.certificateObject = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedBucketServerProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Buckets.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Buckets.java new file mode 100644 index 000000000000..f1d23cba8127 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Buckets.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.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of Buckets. + */ +public interface Buckets { + /** + * Get the details of the specified volume's bucket. A bucket allows additional services, such as AI services, + * connect to the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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's bucket along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String accountName, String poolName, String volumeName, + String bucketName, Context context); + + /** + * Get the details of the specified volume's bucket. A bucket allows additional services, such as AI services, + * connect to the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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's bucket. + */ + Bucket get(String resourceGroupName, String accountName, String poolName, String volumeName, String bucketName); + + /** + * Delete a volume's bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 bucketName); + + /** + * Delete a volume's bucket. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 bucketName, + Context context); + + /** + * Describes all buckets belonging to a volume. Buckets allow additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of volume bucket resources as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String accountName, String poolName, String volumeName); + + /** + * Describes all buckets belonging to a volume. Buckets allow additional services, such as AI services, connect to + * the volume data contained in those buckets. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of volume bucket resources as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String accountName, String poolName, String volumeName, + Context context); + + /** + * Generate the access key and secret key used for accessing the specified volume bucket. Also return expiry date + * and time of key pair (in UTC). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket's Access and Secret key pair expiry time expressed as the number of days from now. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket Access Key, Secret Key, and Expiry date and time of the key pair along with {@link Response}. + */ + Response generateCredentialsWithResponse(String resourceGroupName, String accountName, + String poolName, String volumeName, String bucketName, BucketCredentialsExpiry body, Context context); + + /** + * Generate the access key and secret key used for accessing the specified volume bucket. Also return expiry date + * and time of key pair (in UTC). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param bucketName The name of the bucket. + * @param body The bucket's Access and Secret key pair expiry time expressed as the number of days from now. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bucket Access Key, Secret Key, and Expiry date and time of the key pair. + */ + BucketGenerateCredentials generateCredentials(String resourceGroupName, String accountName, String poolName, + String volumeName, String bucketName, BucketCredentialsExpiry body); + + /** + * Get the details of the specified volume's bucket. A bucket allows additional services, such as AI services, + * connect to the volume data contained in those buckets. + * + * @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's bucket along with {@link Response}. + */ + Bucket getById(String id); + + /** + * Get the details of the specified volume's bucket. A bucket allows additional services, such as AI services, + * connect to the volume data contained in those buckets. + * + * @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's bucket along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a volume's bucket. + * + * @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 volume's bucket. + * + * @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 Bucket resource. + * + * @param name resource name. + * @return the first stage of the new Bucket definition. + */ + Bucket.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Cache.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Cache.java new file mode 100644 index 000000000000..bf3925343e18 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Cache.java @@ -0,0 +1,343 @@ +// Copyright (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.CacheInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of Cache. + */ +public interface Cache { + /** + * 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: Cache properties. + * + * @return the properties value. + */ + CacheProperties 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.CacheInner object. + * + * @return the inner object. + */ + CacheInner innerModel(); + + /** + * The entirety of the Cache definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * The Cache definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the Cache definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the Cache 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 Cache 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 NetApp account. + * @param poolName The name of the capacity pool. + * @return the next definition stage. + */ + WithProperties withExistingCapacityPool(String resourceGroupName, String accountName, String poolName); + } + + /** + * The stage of the Cache definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: Cache properties. + * + * @param properties Cache properties. + * @return the next definition stage. + */ + WithCreate withProperties(CacheProperties properties); + } + + /** + * The stage of the Cache 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.WithZones { + /** + * Executes the create request. + * + * @return the created resource. + */ + Cache create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Cache create(Context context); + } + + /** + * The stage of the Cache 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 Cache 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 Cache resource. + * + * @return the stage of resource update. + */ + Cache.Update update(); + + /** + * The template for Cache update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Cache apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Cache apply(Context context); + } + + /** + * The Cache update stages. + */ + interface UpdateStages { + /** + * The stage of the Cache 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 Cache 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(CacheUpdateProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Cache refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Cache refresh(Context context); + + /** + * This operation will list the cluster peering command, cluster peering passphrase and the vserver peering command. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response containing peering passphrases and commands for cluster and vserver peering along with + * {@link Response}. + */ + Response listPeeringPassphrasesWithResponse(Context context); + + /** + * This operation will list the cluster peering command, cluster peering passphrase and the vserver peering command. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response containing peering passphrases and commands for cluster and vserver peering. + */ + PeeringPassphrases listPeeringPassphrases(); + + /** + * Moves Cache to another Capacity Pool. + * + * @param body Move cache to the pool supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Cache poolChange(PoolChangeRequest body); + + /** + * Moves Cache to another Capacity Pool. + * + * @param body Move cache to the pool supplied in the body of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Cache poolChange(PoolChangeRequest body, Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheLifeCycleState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheLifeCycleState.java new file mode 100644 index 000000000000..b249e7561248 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheLifeCycleState.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; + +/** + * Azure NetApp Files Cache lifecycle management. + */ +public final class CacheLifeCycleState extends ExpandableStringEnum { + /** + * Cluster peering offer has been sent. + */ + public static final CacheLifeCycleState CLUSTER_PEERING_OFFER_SENT = fromString("ClusterPeeringOfferSent"); + + /** + * VServer peering offer has been sent. + */ + public static final CacheLifeCycleState VSERVER_PEERING_OFFER_SENT = fromString("VserverPeeringOfferSent"); + + /** + * Cache creation in progress. + */ + public static final CacheLifeCycleState CREATING = fromString("Creating"); + + /** + * Cache creation succeeded and is available for use. + */ + public static final CacheLifeCycleState SUCCEEDED = fromString("Succeeded"); + + /** + * Cache is in a failed state. + */ + public static final CacheLifeCycleState FAILED = fromString("Failed"); + + /** + * Creates a new instance of CacheLifeCycleState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CacheLifeCycleState() { + } + + /** + * Creates or finds a CacheLifeCycleState from its string representation. + * + * @param name a name to look for. + * @return the corresponding CacheLifeCycleState. + */ + public static CacheLifeCycleState fromString(String name) { + return fromString(name, CacheLifeCycleState.class); + } + + /** + * Gets known CacheLifeCycleState values. + * + * @return known CacheLifeCycleState values. + */ + public static Collection values() { + return values(CacheLifeCycleState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheMountTargetProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheMountTargetProperties.java new file mode 100644 index 000000000000..4cee408ac92f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheMountTargetProperties.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.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 a cache. + */ +@Immutable +public final class CacheMountTargetProperties implements JsonSerializable { + /* + * UUID v4 used to identify the MountTarget + */ + private String mountTargetId; + + /* + * The mount target's IPv4 address, used to mount the cache. + */ + private String ipAddress; + + /* + * The SMB server's Fully Qualified Domain Name, FQDN + */ + private String smbServerFqdn; + + /** + * Creates an instance of CacheMountTargetProperties class. + */ + private CacheMountTargetProperties() { + } + + /** + * Get the mountTargetId property: UUID v4 used to identify the MountTarget. + * + * @return the mountTargetId value. + */ + public String mountTargetId() { + return this.mountTargetId; + } + + /** + * Get the ipAddress property: The mount target's IPv4 address, used to mount the cache. + * + * @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 CacheMountTargetProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CacheMountTargetProperties 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 CacheMountTargetProperties. + */ + public static CacheMountTargetProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CacheMountTargetProperties deserializedCacheMountTargetProperties = new CacheMountTargetProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("mountTargetId".equals(fieldName)) { + deserializedCacheMountTargetProperties.mountTargetId = reader.getString(); + } else if ("ipAddress".equals(fieldName)) { + deserializedCacheMountTargetProperties.ipAddress = reader.getString(); + } else if ("smbServerFqdn".equals(fieldName)) { + deserializedCacheMountTargetProperties.smbServerFqdn = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCacheMountTargetProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheProperties.java new file mode 100644 index 000000000000..896c921d63e8 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheProperties.java @@ -0,0 +1,729 @@ +// Copyright (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; + +/** + * Cache resource properties. + */ +@Fluent +public final class CacheProperties implements JsonSerializable { + /* + * The file path of the Cache. + */ + private String filepath; + + /* + * Maximum storage quota allowed for a file system in bytes. Valid values are in the range 50GiB to 1PiB. Values + * expressed in bytes as multiples of 1GiB. + */ + private long size; + + /* + * Set of export policy rules + */ + private List exportPolicy; + + /* + * Set of protocol types, default NFSv3, CIFS for SMB protocol + */ + private List protocolTypes; + + /* + * Azure lifecycle management + */ + private CacheProvisioningState provisioningState; + + /* + * Azure NetApp Files Cache lifecycle management + */ + private CacheLifeCycleState cacheState; + + /* + * The Azure Resource URI for a delegated cache subnet that will be used to allocate data IPs. + */ + private String cacheSubnetResourceId; + + /* + * The Azure Resource URI for a delegated subnet that will be used for ANF Intercluster Interface IP addresses. + */ + private String peeringSubnetResourceId; + + /* + * List of mount targets that can be used to mount this cache + */ + private List mountTargets; + + /* + * Describe if a cache is Kerberos enabled. + */ + private KerberosState kerberos; + + /* + * SMB information for the cache + */ + private SmbSettings smbSettings; + + /* + * Maximum throughput in MiB/s that can be achieved by this cache volume and this will be accepted as input only for + * manual qosType cache + */ + private Float throughputMibps; + + /* + * Actual throughput in MiB/s for auto qosType volumes calculated based on size and serviceLevel + */ + private Float actualThroughputMibps; + + /* + * Source of key used to encrypt data in the cache. Applicable if NetApp account has encryption.keySource = + * 'Microsoft.KeyVault'. Possible values (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault' + */ + private EncryptionKeySource encryptionKeySource; + + /* + * 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; + + /* + * Maximum number of files allowed. + */ + private Long maximumNumberOfFiles; + + /* + * Specifies if the cache is encryption or not. + */ + private EncryptionState encryption; + + /* + * Language supported for volume. + */ + private VolumeLanguage language; + + /* + * Specifies whether LDAP is enabled or not for flexcache volume. + */ + private LdapState ldap; + + /* + * Specifies the type of LDAP server for flexcache volume. + */ + private LdapServerType ldapServerType; + + /* + * Origin cluster information + */ + private OriginClusterInformation originClusterInformation; + + /* + * Flag indicating whether a CIFS change notification is enabled for the cache. + */ + private CifsChangeNotifyState cifsChangeNotifications; + + /* + * Flag indicating whether the global file lock is enabled for the cache. + */ + private GlobalFileLockingState globalFileLocking; + + /* + * Flag indicating whether writeback is enabled for the cache. + */ + private EnableWriteBackState writeBack; + + /** + * Creates an instance of CacheProperties class. + */ + public CacheProperties() { + } + + /** + * Get the filepath property: The file path of the Cache. + * + * @return the filepath value. + */ + public String filepath() { + return this.filepath; + } + + /** + * Set the filepath property: The file path of the Cache. + * + * @param filepath the filepath value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withFilepath(String filepath) { + this.filepath = filepath; + return this; + } + + /** + * Get the size property: Maximum storage quota allowed for a file system in bytes. Valid values are in the range + * 50GiB to 1PiB. Values expressed in bytes as multiples of 1GiB. + * + * @return the size value. + */ + public long size() { + return this.size; + } + + /** + * Set the size property: Maximum storage quota allowed for a file system in bytes. Valid values are in the range + * 50GiB to 1PiB. Values expressed in bytes as multiples of 1GiB. + * + * @param size the size value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withSize(long size) { + this.size = size; + return this; + } + + /** + * Get the exportPolicy property: Set of export policy rules. + * + * @return the exportPolicy value. + */ + public List exportPolicy() { + return this.exportPolicy; + } + + /** + * Set the exportPolicy property: Set of export policy rules. + * + * @param exportPolicy the exportPolicy value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withExportPolicy(List exportPolicy) { + this.exportPolicy = exportPolicy; + return this; + } + + /** + * Get the protocolTypes property: Set of protocol types, default NFSv3, CIFS for SMB protocol. + * + * @return the protocolTypes value. + */ + public List protocolTypes() { + return this.protocolTypes; + } + + /** + * Set the protocolTypes property: Set of protocol types, default NFSv3, CIFS for SMB protocol. + * + * @param protocolTypes the protocolTypes value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withProtocolTypes(List protocolTypes) { + this.protocolTypes = protocolTypes; + return this; + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public CacheProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the cacheState property: Azure NetApp Files Cache lifecycle management. + * + * @return the cacheState value. + */ + public CacheLifeCycleState cacheState() { + return this.cacheState; + } + + /** + * Get the cacheSubnetResourceId property: The Azure Resource URI for a delegated cache subnet that will be used to + * allocate data IPs. + * + * @return the cacheSubnetResourceId value. + */ + public String cacheSubnetResourceId() { + return this.cacheSubnetResourceId; + } + + /** + * Set the cacheSubnetResourceId property: The Azure Resource URI for a delegated cache subnet that will be used to + * allocate data IPs. + * + * @param cacheSubnetResourceId the cacheSubnetResourceId value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withCacheSubnetResourceId(String cacheSubnetResourceId) { + this.cacheSubnetResourceId = cacheSubnetResourceId; + return this; + } + + /** + * Get the peeringSubnetResourceId property: The Azure Resource URI for a delegated subnet that will be used for ANF + * Intercluster Interface IP addresses. + * + * @return the peeringSubnetResourceId value. + */ + public String peeringSubnetResourceId() { + return this.peeringSubnetResourceId; + } + + /** + * Set the peeringSubnetResourceId property: The Azure Resource URI for a delegated subnet that will be used for ANF + * Intercluster Interface IP addresses. + * + * @param peeringSubnetResourceId the peeringSubnetResourceId value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withPeeringSubnetResourceId(String peeringSubnetResourceId) { + this.peeringSubnetResourceId = peeringSubnetResourceId; + return this; + } + + /** + * Get the mountTargets property: List of mount targets that can be used to mount this cache. + * + * @return the mountTargets value. + */ + public List mountTargets() { + return this.mountTargets; + } + + /** + * Get the kerberos property: Describe if a cache is Kerberos enabled. + * + * @return the kerberos value. + */ + public KerberosState kerberos() { + return this.kerberos; + } + + /** + * Set the kerberos property: Describe if a cache is Kerberos enabled. + * + * @param kerberos the kerberos value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withKerberos(KerberosState kerberos) { + this.kerberos = kerberos; + return this; + } + + /** + * Get the smbSettings property: SMB information for the cache. + * + * @return the smbSettings value. + */ + public SmbSettings smbSettings() { + return this.smbSettings; + } + + /** + * Set the smbSettings property: SMB information for the cache. + * + * @param smbSettings the smbSettings value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withSmbSettings(SmbSettings smbSettings) { + this.smbSettings = smbSettings; + return this; + } + + /** + * Get the throughputMibps property: Maximum throughput in MiB/s that can be achieved by this cache volume and this + * will be accepted as input only for manual qosType cache. + * + * @return the throughputMibps value. + */ + public Float throughputMibps() { + return this.throughputMibps; + } + + /** + * Set the throughputMibps property: Maximum throughput in MiB/s that can be achieved by this cache volume and this + * will be accepted as input only for manual qosType cache. + * + * @param throughputMibps the throughputMibps value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withThroughputMibps(Float throughputMibps) { + this.throughputMibps = throughputMibps; + return this; + } + + /** + * Get the actualThroughputMibps property: Actual throughput in MiB/s for auto qosType volumes calculated based on + * size and serviceLevel. + * + * @return the actualThroughputMibps value. + */ + public Float actualThroughputMibps() { + return this.actualThroughputMibps; + } + + /** + * Get the encryptionKeySource property: Source of key used to encrypt data in the cache. Applicable if NetApp + * account has encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: + * 'Microsoft.NetApp, Microsoft.KeyVault'. + * + * @return the encryptionKeySource value. + */ + public EncryptionKeySource encryptionKeySource() { + return this.encryptionKeySource; + } + + /** + * Set the encryptionKeySource property: Source of key used to encrypt data in the cache. Applicable if NetApp + * account has encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: + * 'Microsoft.NetApp, Microsoft.KeyVault'. + * + * @param encryptionKeySource the encryptionKeySource value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withEncryptionKeySource(EncryptionKeySource encryptionKeySource) { + this.encryptionKeySource = encryptionKeySource; + 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 CacheProperties object itself. + */ + public CacheProperties withKeyVaultPrivateEndpointResourceId(String keyVaultPrivateEndpointResourceId) { + this.keyVaultPrivateEndpointResourceId = keyVaultPrivateEndpointResourceId; + return this; + } + + /** + * Get the maximumNumberOfFiles property: Maximum number of files allowed. + * + * @return the maximumNumberOfFiles value. + */ + public Long maximumNumberOfFiles() { + return this.maximumNumberOfFiles; + } + + /** + * Get the encryption property: Specifies if the cache is encryption or not. + * + * @return the encryption value. + */ + public EncryptionState encryption() { + return this.encryption; + } + + /** + * Get the language property: Language supported for volume. + * + * @return the language value. + */ + public VolumeLanguage language() { + return this.language; + } + + /** + * Get the ldap property: Specifies whether LDAP is enabled or not for flexcache volume. + * + * @return the ldap value. + */ + public LdapState ldap() { + return this.ldap; + } + + /** + * Set the ldap property: Specifies whether LDAP is enabled or not for flexcache volume. + * + * @param ldap the ldap value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withLdap(LdapState ldap) { + this.ldap = ldap; + return this; + } + + /** + * Get the ldapServerType property: Specifies the type of LDAP server for flexcache volume. + * + * @return the ldapServerType value. + */ + public LdapServerType ldapServerType() { + return this.ldapServerType; + } + + /** + * Set the ldapServerType property: Specifies the type of LDAP server for flexcache volume. + * + * @param ldapServerType the ldapServerType value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withLdapServerType(LdapServerType ldapServerType) { + this.ldapServerType = ldapServerType; + return this; + } + + /** + * Get the originClusterInformation property: Origin cluster information. + * + * @return the originClusterInformation value. + */ + public OriginClusterInformation originClusterInformation() { + return this.originClusterInformation; + } + + /** + * Set the originClusterInformation property: Origin cluster information. + * + * @param originClusterInformation the originClusterInformation value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withOriginClusterInformation(OriginClusterInformation originClusterInformation) { + this.originClusterInformation = originClusterInformation; + return this; + } + + /** + * Get the cifsChangeNotifications property: Flag indicating whether a CIFS change notification is enabled for the + * cache. + * + * @return the cifsChangeNotifications value. + */ + public CifsChangeNotifyState cifsChangeNotifications() { + return this.cifsChangeNotifications; + } + + /** + * Set the cifsChangeNotifications property: Flag indicating whether a CIFS change notification is enabled for the + * cache. + * + * @param cifsChangeNotifications the cifsChangeNotifications value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withCifsChangeNotifications(CifsChangeNotifyState cifsChangeNotifications) { + this.cifsChangeNotifications = cifsChangeNotifications; + return this; + } + + /** + * Get the globalFileLocking property: Flag indicating whether the global file lock is enabled for the cache. + * + * @return the globalFileLocking value. + */ + public GlobalFileLockingState globalFileLocking() { + return this.globalFileLocking; + } + + /** + * Set the globalFileLocking property: Flag indicating whether the global file lock is enabled for the cache. + * + * @param globalFileLocking the globalFileLocking value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withGlobalFileLocking(GlobalFileLockingState globalFileLocking) { + this.globalFileLocking = globalFileLocking; + return this; + } + + /** + * Get the writeBack property: Flag indicating whether writeback is enabled for the cache. + * + * @return the writeBack value. + */ + public EnableWriteBackState writeBack() { + return this.writeBack; + } + + /** + * Set the writeBack property: Flag indicating whether writeback is enabled for the cache. + * + * @param writeBack the writeBack value to set. + * @return the CacheProperties object itself. + */ + public CacheProperties withWriteBack(EnableWriteBackState writeBack) { + this.writeBack = writeBack; + 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 CacheProperties")); + } + if (exportPolicy() != null) { + exportPolicy().forEach(e -> e.validate()); + } + if (cacheSubnetResourceId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property cacheSubnetResourceId in model CacheProperties")); + } + if (peeringSubnetResourceId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property peeringSubnetResourceId in model CacheProperties")); + } + if (mountTargets() != null) { + mountTargets().forEach(e -> e.validate()); + } + if (smbSettings() != null) { + smbSettings().validate(); + } + if (encryptionKeySource() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property encryptionKeySource in model CacheProperties")); + } + if (originClusterInformation() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property originClusterInformation in model CacheProperties")); + } else { + originClusterInformation().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CacheProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("filepath", this.filepath); + jsonWriter.writeLongField("size", this.size); + jsonWriter.writeStringField("cacheSubnetResourceId", this.cacheSubnetResourceId); + jsonWriter.writeStringField("peeringSubnetResourceId", this.peeringSubnetResourceId); + jsonWriter.writeStringField("encryptionKeySource", + this.encryptionKeySource == null ? null : this.encryptionKeySource.toString()); + jsonWriter.writeJsonField("originClusterInformation", this.originClusterInformation); + jsonWriter.writeArrayField("exportPolicy", this.exportPolicy, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("protocolTypes", this.protocolTypes, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeStringField("kerberos", this.kerberos == null ? null : this.kerberos.toString()); + jsonWriter.writeJsonField("smbSettings", this.smbSettings); + jsonWriter.writeNumberField("throughputMibps", this.throughputMibps); + jsonWriter.writeStringField("keyVaultPrivateEndpointResourceId", this.keyVaultPrivateEndpointResourceId); + jsonWriter.writeStringField("ldap", this.ldap == null ? null : this.ldap.toString()); + jsonWriter.writeStringField("ldapServerType", + this.ldapServerType == null ? null : this.ldapServerType.toString()); + jsonWriter.writeStringField("cifsChangeNotifications", + this.cifsChangeNotifications == null ? null : this.cifsChangeNotifications.toString()); + jsonWriter.writeStringField("globalFileLocking", + this.globalFileLocking == null ? null : this.globalFileLocking.toString()); + jsonWriter.writeStringField("writeBack", this.writeBack == null ? null : this.writeBack.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CacheProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CacheProperties 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 CacheProperties. + */ + public static CacheProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CacheProperties deserializedCacheProperties = new CacheProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("filepath".equals(fieldName)) { + deserializedCacheProperties.filepath = reader.getString(); + } else if ("size".equals(fieldName)) { + deserializedCacheProperties.size = reader.getLong(); + } else if ("cacheSubnetResourceId".equals(fieldName)) { + deserializedCacheProperties.cacheSubnetResourceId = reader.getString(); + } else if ("peeringSubnetResourceId".equals(fieldName)) { + deserializedCacheProperties.peeringSubnetResourceId = reader.getString(); + } else if ("encryptionKeySource".equals(fieldName)) { + deserializedCacheProperties.encryptionKeySource + = EncryptionKeySource.fromString(reader.getString()); + } else if ("originClusterInformation".equals(fieldName)) { + deserializedCacheProperties.originClusterInformation = OriginClusterInformation.fromJson(reader); + } else if ("exportPolicy".equals(fieldName)) { + List exportPolicy + = reader.readArray(reader1 -> ExportPolicyRule.fromJson(reader1)); + deserializedCacheProperties.exportPolicy = exportPolicy; + } else if ("protocolTypes".equals(fieldName)) { + List protocolTypes + = reader.readArray(reader1 -> ProtocolTypes.fromString(reader1.getString())); + deserializedCacheProperties.protocolTypes = protocolTypes; + } else if ("provisioningState".equals(fieldName)) { + deserializedCacheProperties.provisioningState + = CacheProvisioningState.fromString(reader.getString()); + } else if ("cacheState".equals(fieldName)) { + deserializedCacheProperties.cacheState = CacheLifeCycleState.fromString(reader.getString()); + } else if ("mountTargets".equals(fieldName)) { + List mountTargets + = reader.readArray(reader1 -> CacheMountTargetProperties.fromJson(reader1)); + deserializedCacheProperties.mountTargets = mountTargets; + } else if ("kerberos".equals(fieldName)) { + deserializedCacheProperties.kerberos = KerberosState.fromString(reader.getString()); + } else if ("smbSettings".equals(fieldName)) { + deserializedCacheProperties.smbSettings = SmbSettings.fromJson(reader); + } else if ("throughputMibps".equals(fieldName)) { + deserializedCacheProperties.throughputMibps = reader.getNullable(JsonReader::getFloat); + } else if ("actualThroughputMibps".equals(fieldName)) { + deserializedCacheProperties.actualThroughputMibps = reader.getNullable(JsonReader::getFloat); + } else if ("keyVaultPrivateEndpointResourceId".equals(fieldName)) { + deserializedCacheProperties.keyVaultPrivateEndpointResourceId = reader.getString(); + } else if ("maximumNumberOfFiles".equals(fieldName)) { + deserializedCacheProperties.maximumNumberOfFiles = reader.getNullable(JsonReader::getLong); + } else if ("encryption".equals(fieldName)) { + deserializedCacheProperties.encryption = EncryptionState.fromString(reader.getString()); + } else if ("language".equals(fieldName)) { + deserializedCacheProperties.language = VolumeLanguage.fromString(reader.getString()); + } else if ("ldap".equals(fieldName)) { + deserializedCacheProperties.ldap = LdapState.fromString(reader.getString()); + } else if ("ldapServerType".equals(fieldName)) { + deserializedCacheProperties.ldapServerType = LdapServerType.fromString(reader.getString()); + } else if ("cifsChangeNotifications".equals(fieldName)) { + deserializedCacheProperties.cifsChangeNotifications + = CifsChangeNotifyState.fromString(reader.getString()); + } else if ("globalFileLocking".equals(fieldName)) { + deserializedCacheProperties.globalFileLocking + = GlobalFileLockingState.fromString(reader.getString()); + } else if ("writeBack".equals(fieldName)) { + deserializedCacheProperties.writeBack = EnableWriteBackState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedCacheProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheProvisioningState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheProvisioningState.java new file mode 100644 index 000000000000..a766df0c91ae --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheProvisioningState.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; + +/** + * Azure lifecycle management. + */ +public final class CacheProvisioningState extends ExpandableStringEnum { + /** + * The resource is being created. + */ + public static final CacheProvisioningState CREATING = fromString("Creating"); + + /** + * The resource is being updated. + */ + public static final CacheProvisioningState UPDATING = fromString("Updating"); + + /** + * The resource is being deleted. + */ + public static final CacheProvisioningState DELETING = fromString("Deleting"); + + /** + * The resource is in a failed state. + */ + public static final CacheProvisioningState FAILED = fromString("Failed"); + + /** + * The resource is succeeded. + */ + public static final CacheProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Resource creation was canceled. + */ + public static final CacheProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of CacheProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CacheProvisioningState() { + } + + /** + * Creates or finds a CacheProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding CacheProvisioningState. + */ + public static CacheProvisioningState fromString(String name) { + return fromString(name, CacheProvisioningState.class); + } + + /** + * Gets known CacheProvisioningState values. + * + * @return known CacheProvisioningState values. + */ + public static Collection values() { + return values(CacheProvisioningState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheUpdate.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheUpdate.java new file mode 100644 index 000000000000..e40aeb752f63 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheUpdate.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 Cache. + */ +@Fluent +public final class CacheUpdate implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + + /* + * The resource-specific properties for this resource. + */ + private CacheUpdateProperties properties; + + /** + * Creates an instance of CacheUpdate class. + */ + public CacheUpdate() { + } + + /** + * 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 CacheUpdate object itself. + */ + public CacheUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public CacheUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the CacheUpdate object itself. + */ + public CacheUpdate withProperties(CacheUpdateProperties 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 CacheUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CacheUpdate 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 CacheUpdate. + */ + public static CacheUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CacheUpdate deserializedCacheUpdate = new CacheUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedCacheUpdate.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedCacheUpdate.properties = CacheUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedCacheUpdate; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheUpdateProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheUpdateProperties.java new file mode 100644 index 000000000000..79353a2528ca --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CacheUpdateProperties.java @@ -0,0 +1,314 @@ +// Copyright (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 Cache. + */ +@Fluent +public final class CacheUpdateProperties implements JsonSerializable { + /* + * Maximum storage quota allowed for a file system in bytes. Valid values are in the range 50GiB to 1PiB. Values + * expressed in bytes as multiples of 1GiB. + */ + private Long size; + + /* + * Set of export policy rules + */ + private List exportPolicy; + + /* + * Set of protocol types, default NFSv3, CIFS for SMB protocol + */ + private List protocolTypes; + + /* + * SMB information for the cache + */ + private SmbSettings smbSettings; + + /* + * Maximum throughput in MiB/s that can be achieved by this cache volume and this will be accepted as input only for + * manual qosType cache + */ + private Float throughputMibps; + + /* + * 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; + + /* + * Flag indicating whether a CIFS change notification is enabled for the cache. + */ + private CifsChangeNotifyState cifsChangeNotifications; + + /* + * Flag indicating whether writeback is enabled for the cache. + */ + private EnableWriteBackState writeBack; + + /** + * Creates an instance of CacheUpdateProperties class. + */ + public CacheUpdateProperties() { + } + + /** + * Get the size property: Maximum storage quota allowed for a file system in bytes. Valid values are in the range + * 50GiB to 1PiB. Values expressed in bytes as multiples of 1GiB. + * + * @return the size value. + */ + public Long size() { + return this.size; + } + + /** + * Set the size property: Maximum storage quota allowed for a file system in bytes. Valid values are in the range + * 50GiB to 1PiB. Values expressed in bytes as multiples of 1GiB. + * + * @param size the size value to set. + * @return the CacheUpdateProperties object itself. + */ + public CacheUpdateProperties withSize(Long size) { + this.size = size; + return this; + } + + /** + * Get the exportPolicy property: Set of export policy rules. + * + * @return the exportPolicy value. + */ + public List exportPolicy() { + return this.exportPolicy; + } + + /** + * Set the exportPolicy property: Set of export policy rules. + * + * @param exportPolicy the exportPolicy value to set. + * @return the CacheUpdateProperties object itself. + */ + public CacheUpdateProperties withExportPolicy(List exportPolicy) { + this.exportPolicy = exportPolicy; + return this; + } + + /** + * Get the protocolTypes property: Set of protocol types, default NFSv3, CIFS for SMB protocol. + * + * @return the protocolTypes value. + */ + public List protocolTypes() { + return this.protocolTypes; + } + + /** + * Set the protocolTypes property: Set of protocol types, default NFSv3, CIFS for SMB protocol. + * + * @param protocolTypes the protocolTypes value to set. + * @return the CacheUpdateProperties object itself. + */ + public CacheUpdateProperties withProtocolTypes(List protocolTypes) { + this.protocolTypes = protocolTypes; + return this; + } + + /** + * Get the smbSettings property: SMB information for the cache. + * + * @return the smbSettings value. + */ + public SmbSettings smbSettings() { + return this.smbSettings; + } + + /** + * Set the smbSettings property: SMB information for the cache. + * + * @param smbSettings the smbSettings value to set. + * @return the CacheUpdateProperties object itself. + */ + public CacheUpdateProperties withSmbSettings(SmbSettings smbSettings) { + this.smbSettings = smbSettings; + return this; + } + + /** + * Get the throughputMibps property: Maximum throughput in MiB/s that can be achieved by this cache volume and this + * will be accepted as input only for manual qosType cache. + * + * @return the throughputMibps value. + */ + public Float throughputMibps() { + return this.throughputMibps; + } + + /** + * Set the throughputMibps property: Maximum throughput in MiB/s that can be achieved by this cache volume and this + * will be accepted as input only for manual qosType cache. + * + * @param throughputMibps the throughputMibps value to set. + * @return the CacheUpdateProperties object itself. + */ + public CacheUpdateProperties withThroughputMibps(Float throughputMibps) { + this.throughputMibps = throughputMibps; + 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 CacheUpdateProperties object itself. + */ + public CacheUpdateProperties withKeyVaultPrivateEndpointResourceId(String keyVaultPrivateEndpointResourceId) { + this.keyVaultPrivateEndpointResourceId = keyVaultPrivateEndpointResourceId; + return this; + } + + /** + * Get the cifsChangeNotifications property: Flag indicating whether a CIFS change notification is enabled for the + * cache. + * + * @return the cifsChangeNotifications value. + */ + public CifsChangeNotifyState cifsChangeNotifications() { + return this.cifsChangeNotifications; + } + + /** + * Set the cifsChangeNotifications property: Flag indicating whether a CIFS change notification is enabled for the + * cache. + * + * @param cifsChangeNotifications the cifsChangeNotifications value to set. + * @return the CacheUpdateProperties object itself. + */ + public CacheUpdateProperties withCifsChangeNotifications(CifsChangeNotifyState cifsChangeNotifications) { + this.cifsChangeNotifications = cifsChangeNotifications; + return this; + } + + /** + * Get the writeBack property: Flag indicating whether writeback is enabled for the cache. + * + * @return the writeBack value. + */ + public EnableWriteBackState writeBack() { + return this.writeBack; + } + + /** + * Set the writeBack property: Flag indicating whether writeback is enabled for the cache. + * + * @param writeBack the writeBack value to set. + * @return the CacheUpdateProperties object itself. + */ + public CacheUpdateProperties withWriteBack(EnableWriteBackState writeBack) { + this.writeBack = writeBack; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (exportPolicy() != null) { + exportPolicy().forEach(e -> e.validate()); + } + if (smbSettings() != null) { + smbSettings().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("size", this.size); + jsonWriter.writeArrayField("exportPolicy", this.exportPolicy, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("protocolTypes", this.protocolTypes, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeJsonField("smbSettings", this.smbSettings); + jsonWriter.writeNumberField("throughputMibps", this.throughputMibps); + jsonWriter.writeStringField("keyVaultPrivateEndpointResourceId", this.keyVaultPrivateEndpointResourceId); + jsonWriter.writeStringField("cifsChangeNotifications", + this.cifsChangeNotifications == null ? null : this.cifsChangeNotifications.toString()); + jsonWriter.writeStringField("writeBack", this.writeBack == null ? null : this.writeBack.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CacheUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CacheUpdateProperties 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 CacheUpdateProperties. + */ + public static CacheUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CacheUpdateProperties deserializedCacheUpdateProperties = new CacheUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("size".equals(fieldName)) { + deserializedCacheUpdateProperties.size = reader.getNullable(JsonReader::getLong); + } else if ("exportPolicy".equals(fieldName)) { + List exportPolicy + = reader.readArray(reader1 -> ExportPolicyRule.fromJson(reader1)); + deserializedCacheUpdateProperties.exportPolicy = exportPolicy; + } else if ("protocolTypes".equals(fieldName)) { + List protocolTypes + = reader.readArray(reader1 -> ProtocolTypes.fromString(reader1.getString())); + deserializedCacheUpdateProperties.protocolTypes = protocolTypes; + } else if ("smbSettings".equals(fieldName)) { + deserializedCacheUpdateProperties.smbSettings = SmbSettings.fromJson(reader); + } else if ("throughputMibps".equals(fieldName)) { + deserializedCacheUpdateProperties.throughputMibps = reader.getNullable(JsonReader::getFloat); + } else if ("keyVaultPrivateEndpointResourceId".equals(fieldName)) { + deserializedCacheUpdateProperties.keyVaultPrivateEndpointResourceId = reader.getString(); + } else if ("cifsChangeNotifications".equals(fieldName)) { + deserializedCacheUpdateProperties.cifsChangeNotifications + = CifsChangeNotifyState.fromString(reader.getString()); + } else if ("writeBack".equals(fieldName)) { + deserializedCacheUpdateProperties.writeBack = EnableWriteBackState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedCacheUpdateProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Caches.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Caches.java new file mode 100644 index 000000000000..7a67b8b70775 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Caches.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.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of Caches. + */ +public interface Caches { + /** + * Get the details of the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 Cache along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String accountName, String poolName, String cacheName, + Context context); + + /** + * Get the details of the specified Cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 Cache. + */ + Cache get(String resourceGroupName, String accountName, String poolName, String cacheName); + + /** + * Delete the specified cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 cacheName); + + /** + * Delete the specified cache. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 cacheName, Context context); + + /** + * List all Caches within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 Cache resources as paginated response with {@link PagedIterable}. + */ + PagedIterable listByCapacityPools(String resourceGroupName, String accountName, String poolName); + + /** + * List all Caches within the Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 Cache resources as paginated response with {@link PagedIterable}. + */ + PagedIterable listByCapacityPools(String resourceGroupName, String accountName, String poolName, + Context context); + + /** + * This operation will list the cluster peering command, cluster peering passphrase and the vserver peering command. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response containing peering passphrases and commands for cluster and vserver peering along with + * {@link Response}. + */ + Response listPeeringPassphrasesWithResponse(String resourceGroupName, String accountName, + String poolName, String cacheName, Context context); + + /** + * This operation will list the cluster peering command, cluster peering passphrase and the vserver peering command. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response containing peering passphrases and commands for cluster and vserver peering. + */ + PeeringPassphrases listPeeringPassphrases(String resourceGroupName, String accountName, String poolName, + String cacheName); + + /** + * Moves Cache to another Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body Move cache to the pool supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Cache poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, + PoolChangeRequest body); + + /** + * Moves Cache to another Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param cacheName The name of the cache resource. + * @param body Move cache to the pool supplied in the body of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Cache poolChange(String resourceGroupName, String accountName, String poolName, String cacheName, + PoolChangeRequest body, Context context); + + /** + * Get the details of the specified Cache. + * + * @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 Cache along with {@link Response}. + */ + Cache getById(String id); + + /** + * Get the details of the specified Cache. + * + * @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 Cache along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete the specified cache. + * + * @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 cache. + * + * @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 Cache resource. + * + * @param name resource name. + * @return the first stage of the new Cache definition. + */ + Cache.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ChangeZoneRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ChangeZoneRequest.java new file mode 100644 index 000000000000..752861d01369 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ChangeZoneRequest.java @@ -0,0 +1,101 @@ +// Copyright (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; + +/** + * Changes the zone for the Zone Redundant elastic capacity pool. + */ +@Fluent +public final class ChangeZoneRequest implements JsonSerializable { + /* + * Availability zone to move Zone Redundant elastic capacity pool to + */ + private String newZone; + + /** + * Creates an instance of ChangeZoneRequest class. + */ + public ChangeZoneRequest() { + } + + /** + * Get the newZone property: Availability zone to move Zone Redundant elastic capacity pool to. + * + * @return the newZone value. + */ + public String newZone() { + return this.newZone; + } + + /** + * Set the newZone property: Availability zone to move Zone Redundant elastic capacity pool to. + * + * @param newZone the newZone value to set. + * @return the ChangeZoneRequest object itself. + */ + public ChangeZoneRequest withNewZone(String newZone) { + this.newZone = newZone; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (newZone() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property newZone in model ChangeZoneRequest")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ChangeZoneRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("newZone", this.newZone); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ChangeZoneRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ChangeZoneRequest if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ChangeZoneRequest. + */ + public static ChangeZoneRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ChangeZoneRequest deserializedChangeZoneRequest = new ChangeZoneRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("newZone".equals(fieldName)) { + deserializedChangeZoneRequest.newZone = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedChangeZoneRequest; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityReason.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityReason.java new file mode 100644 index 000000000000..3b1409dad2b9 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityReason.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Availability reason. + */ +public final class CheckElasticResourceAvailabilityReason + extends ExpandableStringEnum { + /** + * Value indicating the name provided does not match Azure NetApp Files naming requirements. + */ + public static final CheckElasticResourceAvailabilityReason INVALID = fromString("Invalid"); + + /** + * Value indicating the name is already in use and is therefore unavailable. + */ + public static final CheckElasticResourceAvailabilityReason ALREADY_EXISTS = fromString("AlreadyExists"); + + /** + * Creates a new instance of CheckElasticResourceAvailabilityReason value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CheckElasticResourceAvailabilityReason() { + } + + /** + * Creates or finds a CheckElasticResourceAvailabilityReason from its string representation. + * + * @param name a name to look for. + * @return the corresponding CheckElasticResourceAvailabilityReason. + */ + public static CheckElasticResourceAvailabilityReason fromString(String name) { + return fromString(name, CheckElasticResourceAvailabilityReason.class); + } + + /** + * Gets known CheckElasticResourceAvailabilityReason values. + * + * @return known CheckElasticResourceAvailabilityReason values. + */ + public static Collection values() { + return values(CheckElasticResourceAvailabilityReason.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityResponse.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityResponse.java new file mode 100644 index 000000000000..5af7e272e2e4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityResponse.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.resourcemanager.netapp.fluent.models.CheckElasticResourceAvailabilityResponseInner; + +/** + * An immutable client-side representation of CheckElasticResourceAvailabilityResponse. + */ +public interface CheckElasticResourceAvailabilityResponse { + /** + * Gets the isAvailable property: True indicates name is valid and available. False indicates the name is invalid, + * unavailable, or both. + * + * @return the isAvailable value. + */ + CheckElasticResourceAvailabilityStatus isAvailable(); + + /** + * Gets the reason property: Invalid indicates the name provided does not match Azure NetApp Files naming + * requirements. AlreadyExists indicates that the name is already in use and is therefore unavailable. + * + * @return the reason value. + */ + CheckElasticResourceAvailabilityReason reason(); + + /** + * Gets the message property: If reason == invalid, provide the user with the reason why the given name is invalid, + * and provide the resource naming requirements so that the user can select a valid name. If reason == + * AlreadyExists, explain that resource name is already in use, and direct them to select a different name. + * + * @return the message value. + */ + String message(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.CheckElasticResourceAvailabilityResponseInner + * object. + * + * @return the inner object. + */ + CheckElasticResourceAvailabilityResponseInner innerModel(); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityStatus.java new file mode 100644 index 000000000000..166f957b4018 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityStatus.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Availability status. + */ +public final class CheckElasticResourceAvailabilityStatus + extends ExpandableStringEnum { + /** + * Value indicating the name is valid and available. + */ + public static final CheckElasticResourceAvailabilityStatus TRUE = fromString("True"); + + /** + * Value indicating the the name is invalid, unavailable, or both. + */ + public static final CheckElasticResourceAvailabilityStatus FALSE = fromString("False"); + + /** + * Creates a new instance of CheckElasticResourceAvailabilityStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CheckElasticResourceAvailabilityStatus() { + } + + /** + * Creates or finds a CheckElasticResourceAvailabilityStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding CheckElasticResourceAvailabilityStatus. + */ + public static CheckElasticResourceAvailabilityStatus fromString(String name) { + return fromString(name, CheckElasticResourceAvailabilityStatus.class); + } + + /** + * Gets known CheckElasticResourceAvailabilityStatus values. + * + * @return known CheckElasticResourceAvailabilityStatus values. + */ + public static Collection values() { + return values(CheckElasticResourceAvailabilityStatus.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticVolumeFilePathAvailabilityRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticVolumeFilePathAvailabilityRequest.java new file mode 100644 index 000000000000..b12b14137a72 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticVolumeFilePathAvailabilityRequest.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * File path availability request content - availability is based on the elastic volume filePath within the given + * elastic capacityPool. + */ +@Fluent +public final class CheckElasticVolumeFilePathAvailabilityRequest + implements JsonSerializable { + /* + * A unique file path for the volume. Used when creating mount targets. This needs to be unique within the elastic + * capacity pool. + */ + private String filePath; + + /** + * Creates an instance of CheckElasticVolumeFilePathAvailabilityRequest class. + */ + public CheckElasticVolumeFilePathAvailabilityRequest() { + } + + /** + * Get the filePath property: A unique file path for the volume. Used when creating mount targets. This needs to be + * unique within the elastic capacity pool. + * + * @return the filePath value. + */ + public String filePath() { + return this.filePath; + } + + /** + * Set the filePath property: A unique file path for the volume. Used when creating mount targets. This needs to be + * unique within the elastic capacity pool. + * + * @param filePath the filePath value to set. + * @return the CheckElasticVolumeFilePathAvailabilityRequest object itself. + */ + public CheckElasticVolumeFilePathAvailabilityRequest withFilePath(String filePath) { + this.filePath = filePath; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (filePath() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property filePath in model CheckElasticVolumeFilePathAvailabilityRequest")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CheckElasticVolumeFilePathAvailabilityRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("filePath", this.filePath); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CheckElasticVolumeFilePathAvailabilityRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CheckElasticVolumeFilePathAvailabilityRequest if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the CheckElasticVolumeFilePathAvailabilityRequest. + */ + public static CheckElasticVolumeFilePathAvailabilityRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CheckElasticVolumeFilePathAvailabilityRequest deserializedCheckElasticVolumeFilePathAvailabilityRequest + = new CheckElasticVolumeFilePathAvailabilityRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("filePath".equals(fieldName)) { + deserializedCheckElasticVolumeFilePathAvailabilityRequest.filePath = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCheckElasticVolumeFilePathAvailabilityRequest; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CifsChangeNotifyState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CifsChangeNotifyState.java new file mode 100644 index 000000000000..b2a3862200f2 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CifsChangeNotifyState.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; + +/** + * Flag indicating whether a CIFS change notification is enabled for the cache. + */ +public final class CifsChangeNotifyState extends ExpandableStringEnum { + /** + * CIFS change notification is disabled. + */ + public static final CifsChangeNotifyState DISABLED = fromString("Disabled"); + + /** + * CIFS change notification is enabled. + */ + public static final CifsChangeNotifyState ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of CifsChangeNotifyState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CifsChangeNotifyState() { + } + + /** + * Creates or finds a CifsChangeNotifyState from its string representation. + * + * @param name a name to look for. + * @return the corresponding CifsChangeNotifyState. + */ + public static CifsChangeNotifyState fromString(String name) { + return fromString(name, CifsChangeNotifyState.class); + } + + /** + * Gets known CifsChangeNotifyState values. + * + * @return known CifsChangeNotifyState values. + */ + public static Collection values() { + return values(CifsChangeNotifyState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CifsUser.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CifsUser.java new file mode 100644 index 000000000000..e7e9d63eb7d6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CifsUser.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; + +/** + * The effective CIFS username when accessing the volume data. + */ +@Fluent +public final class CifsUser implements JsonSerializable { + /* + * The CIFS user's username + */ + private String username; + + /** + * Creates an instance of CifsUser class. + */ + public CifsUser() { + } + + /** + * Get the username property: The CIFS user's username. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Set the username property: The CIFS user's username. + * + * @param username the username value to set. + * @return the CifsUser object itself. + */ + public CifsUser withUsername(String username) { + this.username = username; + 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("username", this.username); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CifsUser from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CifsUser 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 CifsUser. + */ + public static CifsUser fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CifsUser deserializedCifsUser = new CifsUser(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("username".equals(fieldName)) { + deserializedCifsUser.username = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCifsUser; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CredentialsStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CredentialsStatus.java new file mode 100644 index 000000000000..8505b62e8d69 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/CredentialsStatus.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The bucket credentials status. There states: + * + * "NoCredentialsSet": Access and Secret key pair have not been generated. + * "CredentialsExpired": Access and Secret key pair have expired. + * "Active": The certificate has been installed and credentials are unexpired. + */ +public final class CredentialsStatus extends ExpandableStringEnum { + /** + * Access and Secret key pair have not been generated. + */ + public static final CredentialsStatus NO_CREDENTIALS_SET = fromString("NoCredentialsSet"); + + /** + * Access and Secret key pair have expired. + */ + public static final CredentialsStatus CREDENTIALS_EXPIRED = fromString("CredentialsExpired"); + + /** + * The certificate has been installed on the bucket server and the bucket credentials are unexpired. + */ + public static final CredentialsStatus ACTIVE = fromString("Active"); + + /** + * Creates a new instance of CredentialsStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CredentialsStatus() { + } + + /** + * Creates or finds a CredentialsStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding CredentialsStatus. + */ + public static CredentialsStatus fromString(String name) { + return fromString(name, CredentialsStatus.class); + } + + /** + * Gets known CredentialsStatus values. + * + * @return known CredentialsStatus values. + */ + public static Collection values() { + return values(CredentialsStatus.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/DayOfWeek.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/DayOfWeek.java new file mode 100644 index 000000000000..d53a7d76ef8d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/DayOfWeek.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.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Day of the week. + */ +public final class DayOfWeek extends ExpandableStringEnum { + /** + * 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/DesiredRansomwareProtectionState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/DesiredRansomwareProtectionState.java new file mode 100644 index 000000000000..33027f8f5185 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/DesiredRansomwareProtectionState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The desired state of the Advanced Ransomware Protection feature. + */ +public final class DesiredRansomwareProtectionState extends ExpandableStringEnum { + /** + * Advanced Ransomware Protection is disabled. + */ + public static final DesiredRansomwareProtectionState DISABLED = fromString("Disabled"); + + /** + * Advanced Ransomware Protection is enabled. + */ + public static final DesiredRansomwareProtectionState ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of DesiredRansomwareProtectionState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DesiredRansomwareProtectionState() { + } + + /** + * Creates or finds a DesiredRansomwareProtectionState from its string representation. + * + * @param name a name to look for. + * @return the corresponding DesiredRansomwareProtectionState. + */ + public static DesiredRansomwareProtectionState fromString(String name) { + return fromString(name, DesiredRansomwareProtectionState.class); + } + + /** + * Gets known DesiredRansomwareProtectionState values. + * + * @return known DesiredRansomwareProtectionState values. + */ + public static Collection values() { + return values(DesiredRansomwareProtectionState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccount.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccount.java new file mode 100644 index 000000000000..74a275dbed06 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccount.java @@ -0,0 +1,309 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.ElasticAccountInner; +import java.util.Map; + +/** + * An immutable client-side representation of ElasticAccount. + */ +public interface ElasticAccount { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + ElasticAccountProperties properties(); + + /** + * Gets the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + String eTag(); + + /** + * Gets the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.ElasticAccountInner object. + * + * @return the inner object. + */ + ElasticAccountInner innerModel(); + + /** + * The entirety of the ElasticAccount definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The ElasticAccount definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ElasticAccount definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the ElasticAccount definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** + * The stage of the ElasticAccount definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the ElasticAccount definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithIdentity { + /** + * Executes the create request. + * + * @return the created resource. + */ + ElasticAccount create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ElasticAccount create(Context context); + } + + /** + * The stage of the ElasticAccount definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the ElasticAccount definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(ElasticAccountProperties properties); + } + + /** + * The stage of the ElasticAccount definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + } + + /** + * Begins update for the ElasticAccount resource. + * + * @return the stage of resource update. + */ + ElasticAccount.Update update(); + + /** + * The template for ElasticAccount update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ElasticAccount apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ElasticAccount apply(Context context); + } + + /** + * The ElasticAccount update stages. + */ + interface UpdateStages { + /** + * The stage of the ElasticAccount update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + + /** + * The stage of the ElasticAccount update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentity identity); + } + + /** + * The stage of the ElasticAccount update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + Update withProperties(ElasticAccountUpdateProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ElasticAccount refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ElasticAccount refresh(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountProperties.java new file mode 100644 index 000000000000..ba88af2cec9b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountProperties.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * NetApp elastic account properties. + */ +@Fluent +public final class ElasticAccountProperties implements JsonSerializable { + /* + * Azure lifecycle management. + */ + private ProvisioningState provisioningState; + + /* + * Encryption settings + */ + private ElasticEncryption encryption; + + /** + * Creates an instance of ElasticAccountProperties class. + */ + public ElasticAccountProperties() { + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the encryption property: Encryption settings. + * + * @return the encryption value. + */ + public ElasticEncryption encryption() { + return this.encryption; + } + + /** + * Set the encryption property: Encryption settings. + * + * @param encryption the encryption value to set. + * @return the ElasticAccountProperties object itself. + */ + public ElasticAccountProperties withEncryption(ElasticEncryption encryption) { + this.encryption = encryption; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (encryption() != null) { + encryption().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("encryption", this.encryption); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticAccountProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticAccountProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticAccountProperties. + */ + public static ElasticAccountProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticAccountProperties deserializedElasticAccountProperties = new ElasticAccountProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedElasticAccountProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("encryption".equals(fieldName)) { + deserializedElasticAccountProperties.encryption = ElasticEncryption.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticAccountProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountUpdate.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountUpdate.java new file mode 100644 index 000000000000..73c6fe0da659 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountUpdate.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The type used for update operations of the ElasticAccount. + */ +@Fluent +public final class ElasticAccountUpdate implements JsonSerializable { + /* + * The managed service identities assigned to this resource. + */ + private ManagedServiceIdentity identity; + + /* + * Resource tags. + */ + private Map tags; + + /* + * The resource-specific properties for this resource. + */ + private ElasticAccountUpdateProperties properties; + + /** + * Creates an instance of ElasticAccountUpdate class. + */ + public ElasticAccountUpdate() { + } + + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the ElasticAccountUpdate object itself. + */ + public ElasticAccountUpdate withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the ElasticAccountUpdate object itself. + */ + public ElasticAccountUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticAccountUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticAccountUpdate object itself. + */ + public ElasticAccountUpdate withProperties(ElasticAccountUpdateProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticAccountUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticAccountUpdate if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticAccountUpdate. + */ + public static ElasticAccountUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticAccountUpdate deserializedElasticAccountUpdate = new ElasticAccountUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("identity".equals(fieldName)) { + deserializedElasticAccountUpdate.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticAccountUpdate.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedElasticAccountUpdate.properties = ElasticAccountUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticAccountUpdate; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountUpdateProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountUpdateProperties.java new file mode 100644 index 000000000000..10032af75144 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccountUpdateProperties.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The updatable properties of the ElasticAccount. + */ +@Fluent +public final class ElasticAccountUpdateProperties implements JsonSerializable { + /* + * Encryption settings + */ + private ElasticEncryption encryption; + + /** + * Creates an instance of ElasticAccountUpdateProperties class. + */ + public ElasticAccountUpdateProperties() { + } + + /** + * Get the encryption property: Encryption settings. + * + * @return the encryption value. + */ + public ElasticEncryption encryption() { + return this.encryption; + } + + /** + * Set the encryption property: Encryption settings. + * + * @param encryption the encryption value to set. + * @return the ElasticAccountUpdateProperties object itself. + */ + public ElasticAccountUpdateProperties withEncryption(ElasticEncryption encryption) { + this.encryption = encryption; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (encryption() != null) { + encryption().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("encryption", this.encryption); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticAccountUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticAccountUpdateProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticAccountUpdateProperties. + */ + public static ElasticAccountUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticAccountUpdateProperties deserializedElasticAccountUpdateProperties + = new ElasticAccountUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("encryption".equals(fieldName)) { + deserializedElasticAccountUpdateProperties.encryption = ElasticEncryption.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticAccountUpdateProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccounts.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccounts.java new file mode 100644 index 000000000000..d0a352417a67 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticAccounts.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ElasticAccounts. + */ +public interface ElasticAccounts { + /** + * Get the NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Account along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String accountName, + Context context); + + /** + * Get the NetApp Elastic Account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Account. + */ + ElasticAccount getByResourceGroup(String resourceGroupName, String accountName); + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String accountName); + + /** + * Delete the specified NetApp elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, Context context); + + /** + * List and describe all NetApp elastic accounts in the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List and describe all NetApp elastic accounts in the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List and describe all NetApp elastic accounts in the subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List and describe all NetApp elastic accounts in the subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticAccount list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Get the NetApp Elastic Account. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Account along with {@link Response}. + */ + ElasticAccount getById(String id); + + /** + * Get the NetApp Elastic Account. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Account along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete the specified NetApp elastic account. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete the specified NetApp elastic account. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ElasticAccount resource. + * + * @param name resource name. + * @return the first stage of the new ElasticAccount definition. + */ + ElasticAccount.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackup.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackup.java new file mode 100644 index 000000000000..5d92beb9983b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackup.java @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupInner; + +/** + * An immutable client-side representation of ElasticBackup. + */ +public interface ElasticBackup { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + ElasticBackupProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.ElasticBackupInner object. + * + * @return the inner object. + */ + ElasticBackupInner innerModel(); + + /** + * The entirety of the ElasticBackup definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The ElasticBackup definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ElasticBackup definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the ElasticBackup definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, accountName, backupVaultName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @return the next definition stage. + */ + WithCreate withExistingElasticBackupVault(String resourceGroupName, String accountName, + String backupVaultName); + } + + /** + * The stage of the ElasticBackup definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + ElasticBackup create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ElasticBackup create(Context context); + } + + /** + * The stage of the ElasticBackup definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(ElasticBackupProperties properties); + } + } + + /** + * Begins update for the ElasticBackup resource. + * + * @return the stage of resource update. + */ + ElasticBackup.Update update(); + + /** + * The template for ElasticBackup update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ElasticBackup apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ElasticBackup apply(Context context); + } + + /** + * The ElasticBackup update stages. + */ + interface UpdateStages { + /** + * The stage of the ElasticBackup update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + Update withProperties(ElasticBackupProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ElasticBackup refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ElasticBackup refresh(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicies.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicies.java new file mode 100644 index 000000000000..75cece14fea6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicies.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ElasticBackupPolicies. + */ +public interface ElasticBackupPolicies { + /** + * Get the Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Elastic Backup Policy along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String accountName, String backupPolicyName, + Context context); + + /** + * Get the Elastic Backup Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Elastic Backup Policy. + */ + ElasticBackupPolicy get(String resourceGroupName, String accountName, String backupPolicyName); + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String backupPolicyName); + + /** + * Delete the specified Elastic Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupPolicyName The name of the ElasticBackupPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String backupPolicyName, Context context); + + /** + * List and describe all Elastic Backup Policies in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByElasticAccount(String resourceGroupName, String accountName); + + /** + * List and describe all Elastic Backup Policies in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupPolicy list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByElasticAccount(String resourceGroupName, String accountName, + Context context); + + /** + * Get the Elastic Backup Policy. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Elastic Backup Policy along with {@link Response}. + */ + ElasticBackupPolicy getById(String id); + + /** + * Get the Elastic Backup Policy. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Elastic Backup Policy along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete the specified Elastic Policy. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete the specified Elastic Policy. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ElasticBackupPolicy resource. + * + * @param name resource name. + * @return the first stage of the new ElasticBackupPolicy definition. + */ + ElasticBackupPolicy.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicy.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicy.java new file mode 100644 index 000000000000..5665c3a2f9e6 --- /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(ElasticBackupPolicyProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ElasticBackupPolicy refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ElasticBackupPolicy refresh(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyProperties.java new file mode 100644 index 000000000000..a829e3c74291 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyProperties.java @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Elastic Backup Policy properties. + */ +@Fluent +public final class ElasticBackupPolicyProperties implements JsonSerializable { + /* + * Azure lifecycle management. + */ + private ProvisioningState provisioningState; + + /* + * Daily backups count to keep + */ + private Integer dailyBackupsToKeep; + + /* + * Weekly backups count to keep + */ + private Integer weeklyBackupsToKeep; + + /* + * Monthly backups count to keep + */ + private Integer monthlyBackupsToKeep; + + /* + * The number of volumes currently using this Backup Policy. + */ + private Integer assignedVolumesCount; + + /* + * The property to identify whether Backup Policy is enabled or not + */ + private ElasticBackupPolicyState policyState; + + /** + * Creates an instance of ElasticBackupPolicyProperties class. + */ + public ElasticBackupPolicyProperties() { + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the dailyBackupsToKeep property: Daily backups count to keep. + * + * @return the dailyBackupsToKeep value. + */ + public Integer dailyBackupsToKeep() { + return this.dailyBackupsToKeep; + } + + /** + * Set the dailyBackupsToKeep property: Daily backups count to keep. + * + * @param dailyBackupsToKeep the dailyBackupsToKeep value to set. + * @return the ElasticBackupPolicyProperties object itself. + */ + public ElasticBackupPolicyProperties withDailyBackupsToKeep(Integer dailyBackupsToKeep) { + this.dailyBackupsToKeep = dailyBackupsToKeep; + return this; + } + + /** + * Get the weeklyBackupsToKeep property: Weekly backups count to keep. + * + * @return the weeklyBackupsToKeep value. + */ + public Integer weeklyBackupsToKeep() { + return this.weeklyBackupsToKeep; + } + + /** + * Set the weeklyBackupsToKeep property: Weekly backups count to keep. + * + * @param weeklyBackupsToKeep the weeklyBackupsToKeep value to set. + * @return the ElasticBackupPolicyProperties object itself. + */ + public ElasticBackupPolicyProperties withWeeklyBackupsToKeep(Integer weeklyBackupsToKeep) { + this.weeklyBackupsToKeep = weeklyBackupsToKeep; + return this; + } + + /** + * Get the monthlyBackupsToKeep property: Monthly backups count to keep. + * + * @return the monthlyBackupsToKeep value. + */ + public Integer monthlyBackupsToKeep() { + return this.monthlyBackupsToKeep; + } + + /** + * Set the monthlyBackupsToKeep property: Monthly backups count to keep. + * + * @param monthlyBackupsToKeep the monthlyBackupsToKeep value to set. + * @return the ElasticBackupPolicyProperties object itself. + */ + public ElasticBackupPolicyProperties withMonthlyBackupsToKeep(Integer monthlyBackupsToKeep) { + this.monthlyBackupsToKeep = monthlyBackupsToKeep; + return this; + } + + /** + * Get the assignedVolumesCount property: The number of volumes currently using this Backup Policy. + * + * @return the assignedVolumesCount value. + */ + public Integer assignedVolumesCount() { + return this.assignedVolumesCount; + } + + /** + * Get the policyState property: The property to identify whether Backup Policy is enabled or not. + * + * @return the policyState value. + */ + public ElasticBackupPolicyState policyState() { + return this.policyState; + } + + /** + * Set the policyState property: The property to identify whether Backup Policy is enabled or not. + * + * @param policyState the policyState value to set. + * @return the ElasticBackupPolicyProperties object itself. + */ + public ElasticBackupPolicyProperties withPolicyState(ElasticBackupPolicyState policyState) { + this.policyState = policyState; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("dailyBackupsToKeep", this.dailyBackupsToKeep); + jsonWriter.writeNumberField("weeklyBackupsToKeep", this.weeklyBackupsToKeep); + jsonWriter.writeNumberField("monthlyBackupsToKeep", this.monthlyBackupsToKeep); + jsonWriter.writeStringField("policyState", this.policyState == null ? null : this.policyState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupPolicyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupPolicyProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticBackupPolicyProperties. + */ + public static ElasticBackupPolicyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupPolicyProperties deserializedElasticBackupPolicyProperties + = new ElasticBackupPolicyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedElasticBackupPolicyProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("dailyBackupsToKeep".equals(fieldName)) { + deserializedElasticBackupPolicyProperties.dailyBackupsToKeep + = reader.getNullable(JsonReader::getInt); + } else if ("weeklyBackupsToKeep".equals(fieldName)) { + deserializedElasticBackupPolicyProperties.weeklyBackupsToKeep + = reader.getNullable(JsonReader::getInt); + } else if ("monthlyBackupsToKeep".equals(fieldName)) { + deserializedElasticBackupPolicyProperties.monthlyBackupsToKeep + = reader.getNullable(JsonReader::getInt); + } else if ("assignedVolumesCount".equals(fieldName)) { + deserializedElasticBackupPolicyProperties.assignedVolumesCount + = reader.getNullable(JsonReader::getInt); + } else if ("policyState".equals(fieldName)) { + deserializedElasticBackupPolicyProperties.policyState + = ElasticBackupPolicyState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupPolicyProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyState.java new file mode 100644 index 000000000000..6b507c88adf5 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupPolicyState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Elastic Backup Policy state. + */ +public final class ElasticBackupPolicyState extends ExpandableStringEnum { + /** + * Value indicating the policy is enabled. + */ + public static final ElasticBackupPolicyState ENABLED = fromString("Enabled"); + + /** + * Value indicating the policy is disabled. + */ + public static final ElasticBackupPolicyState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of ElasticBackupPolicyState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticBackupPolicyState() { + } + + /** + * Creates or finds a ElasticBackupPolicyState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticBackupPolicyState. + */ + public static ElasticBackupPolicyState fromString(String name) { + return fromString(name, ElasticBackupPolicyState.class); + } + + /** + * Gets known ElasticBackupPolicyState values. + * + * @return known ElasticBackupPolicyState values. + */ + public static Collection values() { + return values(ElasticBackupPolicyState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupProperties.java new file mode 100644 index 000000000000..f494ee77a458 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupProperties.java @@ -0,0 +1,342 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Elastic Backup properties. + */ +@Fluent +public final class ElasticBackupProperties implements JsonSerializable { + /* + * The creation date of the backup + */ + private OffsetDateTime creationDate; + + /* + * The snapshot creation date of the backup + */ + private OffsetDateTime snapshotCreationDate; + + /* + * The completion date of the backup + */ + private OffsetDateTime completionDate; + + /* + * Azure lifecycle management. + */ + private ProvisioningState provisioningState; + + /* + * Size of backup in bytes + */ + private Long size; + + /* + * Label for backup + */ + private String label; + + /* + * Type of backup Manual or Scheduled + */ + private ElasticBackupType backupType; + + /* + * Failure reason + */ + private String failureReason; + + /* + * ResourceId used to identify the Elastic Volume + */ + private String elasticVolumeResourceId; + + /* + * Manual backup using an already existing snapshot. This will always be CreateNewSnapshot for scheduled backups and + * UseExistingSnapshot/CreateNewSnapshot for manual backups + */ + private SnapshotUsage snapshotUsage; + + /* + * ResourceId used to identify the elastic snapshot resource. This is required when an existing snapshot needs to be + * used for creating a manual backup + */ + private String elasticSnapshotResourceId; + + /* + * ResourceId used to identify the elastic backup policy + */ + private String elasticBackupPolicyResourceId; + + /* + * Specifies if the backup is for a large volume. + */ + private VolumeSize volumeSize; + + /** + * Creates an instance of ElasticBackupProperties class. + */ + public ElasticBackupProperties() { + } + + /** + * Get the creationDate property: The creation date of the backup. + * + * @return the creationDate value. + */ + public OffsetDateTime creationDate() { + return this.creationDate; + } + + /** + * Get the snapshotCreationDate property: The snapshot creation date of the backup. + * + * @return the snapshotCreationDate value. + */ + public OffsetDateTime snapshotCreationDate() { + return this.snapshotCreationDate; + } + + /** + * Get the completionDate property: The completion date of the backup. + * + * @return the completionDate value. + */ + public OffsetDateTime completionDate() { + return this.completionDate; + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the size property: Size of backup in bytes. + * + * @return the size value. + */ + public Long size() { + return this.size; + } + + /** + * Get the label property: Label for backup. + * + * @return the label value. + */ + public String label() { + return this.label; + } + + /** + * Set the label property: Label for backup. + * + * @param label the label value to set. + * @return the ElasticBackupProperties object itself. + */ + public ElasticBackupProperties withLabel(String label) { + this.label = label; + return this; + } + + /** + * Get the backupType property: Type of backup Manual or Scheduled. + * + * @return the backupType value. + */ + public ElasticBackupType backupType() { + return this.backupType; + } + + /** + * Get the failureReason property: Failure reason. + * + * @return the failureReason value. + */ + public String failureReason() { + return this.failureReason; + } + + /** + * Get the elasticVolumeResourceId property: ResourceId used to identify the Elastic Volume. + * + * @return the elasticVolumeResourceId value. + */ + public String elasticVolumeResourceId() { + return this.elasticVolumeResourceId; + } + + /** + * Set the elasticVolumeResourceId property: ResourceId used to identify the Elastic Volume. + * + * @param elasticVolumeResourceId the elasticVolumeResourceId value to set. + * @return the ElasticBackupProperties object itself. + */ + public ElasticBackupProperties withElasticVolumeResourceId(String elasticVolumeResourceId) { + this.elasticVolumeResourceId = elasticVolumeResourceId; + return this; + } + + /** + * Get the snapshotUsage property: Manual backup using an already existing snapshot. This will always be + * CreateNewSnapshot for scheduled backups and UseExistingSnapshot/CreateNewSnapshot for manual backups. + * + * @return the snapshotUsage value. + */ + public SnapshotUsage snapshotUsage() { + return this.snapshotUsage; + } + + /** + * Set the snapshotUsage property: Manual backup using an already existing snapshot. This will always be + * CreateNewSnapshot for scheduled backups and UseExistingSnapshot/CreateNewSnapshot for manual backups. + * + * @param snapshotUsage the snapshotUsage value to set. + * @return the ElasticBackupProperties object itself. + */ + public ElasticBackupProperties withSnapshotUsage(SnapshotUsage snapshotUsage) { + this.snapshotUsage = snapshotUsage; + return this; + } + + /** + * Get the elasticSnapshotResourceId property: ResourceId used to identify the elastic snapshot resource. This is + * required when an existing snapshot needs to be used for creating a manual backup. + * + * @return the elasticSnapshotResourceId value. + */ + public String elasticSnapshotResourceId() { + return this.elasticSnapshotResourceId; + } + + /** + * Set the elasticSnapshotResourceId property: ResourceId used to identify the elastic snapshot resource. This is + * required when an existing snapshot needs to be used for creating a manual backup. + * + * @param elasticSnapshotResourceId the elasticSnapshotResourceId value to set. + * @return the ElasticBackupProperties object itself. + */ + public ElasticBackupProperties withElasticSnapshotResourceId(String elasticSnapshotResourceId) { + this.elasticSnapshotResourceId = elasticSnapshotResourceId; + return this; + } + + /** + * Get the elasticBackupPolicyResourceId property: ResourceId used to identify the elastic backup policy. + * + * @return the elasticBackupPolicyResourceId value. + */ + public String elasticBackupPolicyResourceId() { + return this.elasticBackupPolicyResourceId; + } + + /** + * Get the volumeSize property: Specifies if the backup is for a large volume. + * + * @return the volumeSize value. + */ + public VolumeSize volumeSize() { + return this.volumeSize; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (elasticVolumeResourceId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property elasticVolumeResourceId in model ElasticBackupProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticBackupProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("elasticVolumeResourceId", this.elasticVolumeResourceId); + jsonWriter.writeStringField("label", this.label); + jsonWriter.writeStringField("snapshotUsage", this.snapshotUsage == null ? null : this.snapshotUsage.toString()); + jsonWriter.writeStringField("elasticSnapshotResourceId", this.elasticSnapshotResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticBackupProperties. + */ + public static ElasticBackupProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupProperties deserializedElasticBackupProperties = new ElasticBackupProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("elasticVolumeResourceId".equals(fieldName)) { + deserializedElasticBackupProperties.elasticVolumeResourceId = reader.getString(); + } else if ("creationDate".equals(fieldName)) { + deserializedElasticBackupProperties.creationDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("snapshotCreationDate".equals(fieldName)) { + deserializedElasticBackupProperties.snapshotCreationDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("completionDate".equals(fieldName)) { + deserializedElasticBackupProperties.completionDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("provisioningState".equals(fieldName)) { + deserializedElasticBackupProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("size".equals(fieldName)) { + deserializedElasticBackupProperties.size = reader.getNullable(JsonReader::getLong); + } else if ("label".equals(fieldName)) { + deserializedElasticBackupProperties.label = reader.getString(); + } else if ("backupType".equals(fieldName)) { + deserializedElasticBackupProperties.backupType = ElasticBackupType.fromString(reader.getString()); + } else if ("failureReason".equals(fieldName)) { + deserializedElasticBackupProperties.failureReason = reader.getString(); + } else if ("snapshotUsage".equals(fieldName)) { + deserializedElasticBackupProperties.snapshotUsage = SnapshotUsage.fromString(reader.getString()); + } else if ("elasticSnapshotResourceId".equals(fieldName)) { + deserializedElasticBackupProperties.elasticSnapshotResourceId = reader.getString(); + } else if ("elasticBackupPolicyResourceId".equals(fieldName)) { + deserializedElasticBackupProperties.elasticBackupPolicyResourceId = reader.getString(); + } else if ("volumeSize".equals(fieldName)) { + deserializedElasticBackupProperties.volumeSize = VolumeSize.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupType.java new file mode 100644 index 000000000000..76dece2d90fe --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Type of backup. + */ +public final class ElasticBackupType extends ExpandableStringEnum { + /** + * Manual backup type. + */ + public static final ElasticBackupType MANUAL = fromString("Manual"); + + /** + * Scheduled backup type. + */ + public static final ElasticBackupType SCHEDULED = fromString("Scheduled"); + + /** + * Creates a new instance of ElasticBackupType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticBackupType() { + } + + /** + * Creates or finds a ElasticBackupType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticBackupType. + */ + public static ElasticBackupType fromString(String name) { + return fromString(name, ElasticBackupType.class); + } + + /** + * Gets known ElasticBackupType values. + * + * @return known ElasticBackupType values. + */ + public static Collection values() { + return values(ElasticBackupType.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVault.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVault.java new file mode 100644 index 000000000000..e5d6f99a41ca --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVault.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.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, UpdateStages.WithProperties { + /** + * 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); + } + + /** + * The stage of the ElasticBackupVault 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(ElasticBackupVaultProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ElasticBackupVault refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ElasticBackupVault refresh(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaultProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaultProperties.java new file mode 100644 index 000000000000..8e5406661ee9 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaultProperties.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Elastic Backup Vault properties. + */ +@Immutable +public final class ElasticBackupVaultProperties implements JsonSerializable { + /* + * Azure lifecycle management. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of ElasticBackupVaultProperties class. + */ + public ElasticBackupVaultProperties() { + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticBackupVaultProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticBackupVaultProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticBackupVaultProperties. + */ + public static ElasticBackupVaultProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticBackupVaultProperties deserializedElasticBackupVaultProperties = new ElasticBackupVaultProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedElasticBackupVaultProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticBackupVaultProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaults.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaults.java new file mode 100644 index 000000000000..9f6b3c422549 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackupVaults.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ElasticBackupVaults. + */ +public interface ElasticBackupVaults { + /** + * Get the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Elastic Backup Vault along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String accountName, String backupVaultName, + Context context); + + /** + * Get the Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Elastic Backup Vault. + */ + ElasticBackupVault get(String resourceGroupName, String accountName, String backupVaultName); + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String backupVaultName); + + /** + * Delete the specified Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String backupVaultName, Context context); + + /** + * List and describe all Elastic Backup Vaults in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByElasticAccount(String resourceGroupName, String accountName); + + /** + * List and describe all Elastic Backup Vaults in the elastic account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackupVault list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByElasticAccount(String resourceGroupName, String accountName, + Context context); + + /** + * Get the Elastic Backup Vault. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Elastic Backup Vault along with {@link Response}. + */ + ElasticBackupVault getById(String id); + + /** + * Get the Elastic Backup Vault. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Elastic Backup Vault along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete the specified Elastic Backup Vault. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete the specified Elastic Backup Vault. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ElasticBackupVault resource. + * + * @param name resource name. + * @return the first stage of the new ElasticBackupVault definition. + */ + ElasticBackupVault.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackups.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackups.java new file mode 100644 index 000000000000..e158b9e65f00 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticBackups.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ElasticBackups. + */ +public interface ElasticBackups { + /** + * Get the specified Elastic Backup under Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Elastic Backup under Elastic Backup Vault along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String accountName, String backupVaultName, + String backupName, Context context); + + /** + * Get the specified Elastic Backup under Elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Elastic Backup under Elastic Backup Vault. + */ + ElasticBackup get(String resourceGroupName, String accountName, String backupVaultName, String backupName); + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String backupVaultName, String backupName); + + /** + * Delete a ElasticBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param backupName The name of the ElasticBackup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String backupVaultName, String backupName, + Context context); + + /** + * List all elastic backups Under an elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByVault(String resourceGroupName, String accountName, String backupVaultName); + + /** + * List all elastic backups Under an elastic Backup Vault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param backupVaultName The name of the ElasticBackupVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticBackup list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByVault(String resourceGroupName, String accountName, String backupVaultName, + Context context); + + /** + * Get the specified Elastic Backup under Elastic Backup Vault. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Elastic Backup under Elastic Backup Vault along with {@link Response}. + */ + ElasticBackup getById(String id); + + /** + * Get the specified Elastic Backup under Elastic Backup Vault. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Elastic Backup under Elastic Backup Vault along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a ElasticBackup. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a ElasticBackup. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ElasticBackup resource. + * + * @param name resource name. + * @return the first stage of the new ElasticBackup definition. + */ + ElasticBackup.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPool.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPool.java new file mode 100644 index 000000000000..98c16ebbd407 --- /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 the response. + */ + 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 the response. + */ + ElasticCapacityPool changeZone(ChangeZoneRequest body, Context context); + + /** + * Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding availability of a resource along with {@link Response}. + */ + Response checkVolumeFilePathAvailabilityWithResponse( + CheckElasticVolumeFilePathAvailabilityRequest body, Context context); + + /** + * Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding availability of a resource. + */ + CheckElasticResourceAvailabilityResponse + checkVolumeFilePathAvailability(CheckElasticVolumeFilePathAvailabilityRequest body); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolProperties.java new file mode 100644 index 000000000000..4f03b65a3831 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolProperties.java @@ -0,0 +1,305 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Elastic capacity pool properties. + */ +@Fluent +public final class ElasticCapacityPoolProperties implements JsonSerializable { + /* + * Provisioned size of the pool (in bytes). For zoneRedundant service level pool, value must be in the range 1TiB to + * 16TiB or 1TiB to 128TiB for supported region. Values expressed in bytes as multiples of 1TiB till 16TiB and in + * multiples of 8TiB from 24TiB to 128TiB. Pool size can't be shrunk once it is created. + */ + private long size; + + /* + * The service level of the elastic capacity pool + */ + private ElasticServiceLevel serviceLevel; + + /* + * Azure lifecycle management. + */ + private ProvisioningState provisioningState; + + /* + * Encryption settings + */ + private ElasticEncryptionConfiguration encryption; + + /* + * Total throughput of the pool in MiB/s + */ + private Double totalThroughputMibps; + + /* + * The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/elasticVolumes, this is + * used by all the volumes within the pool + */ + private String subnetResourceId; + + /* + * Indicates the current zone of the pool. This can be changed for zoneRedundant service level pool with the + * changeZone action + */ + private String currentZone; + + /* + * Current availability status of the resource. + */ + private ElasticResourceAvailabilityStatus availabilityStatus; + + /* + * The Azure Resource URI for an Active Directory configuration. This is used by all the SMB volumes within the pool + */ + private String activeDirectoryConfigResourceId; + + /** + * Creates an instance of ElasticCapacityPoolProperties class. + */ + public ElasticCapacityPoolProperties() { + } + + /** + * Get the size property: Provisioned size of the pool (in bytes). For zoneRedundant service level pool, value must + * be in the range 1TiB to 16TiB or 1TiB to 128TiB for supported region. Values expressed in bytes as multiples of + * 1TiB till 16TiB and in multiples of 8TiB from 24TiB to 128TiB. Pool size can't be shrunk once it is created. + * + * @return the size value. + */ + public long size() { + return this.size; + } + + /** + * Set the size property: Provisioned size of the pool (in bytes). For zoneRedundant service level pool, value must + * be in the range 1TiB to 16TiB or 1TiB to 128TiB for supported region. Values expressed in bytes as multiples of + * 1TiB till 16TiB and in multiples of 8TiB from 24TiB to 128TiB. Pool size can't be shrunk once it is created. + * + * @param size the size value to set. + * @return the ElasticCapacityPoolProperties object itself. + */ + public ElasticCapacityPoolProperties withSize(long size) { + this.size = size; + return this; + } + + /** + * Get the serviceLevel property: The service level of the elastic capacity pool. + * + * @return the serviceLevel value. + */ + public ElasticServiceLevel serviceLevel() { + return this.serviceLevel; + } + + /** + * Set the serviceLevel property: The service level of the elastic capacity pool. + * + * @param serviceLevel the serviceLevel value to set. + * @return the ElasticCapacityPoolProperties object itself. + */ + public ElasticCapacityPoolProperties withServiceLevel(ElasticServiceLevel serviceLevel) { + this.serviceLevel = serviceLevel; + return this; + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the encryption property: Encryption settings. + * + * @return the encryption value. + */ + public ElasticEncryptionConfiguration encryption() { + return this.encryption; + } + + /** + * Set the encryption property: Encryption settings. + * + * @param encryption the encryption value to set. + * @return the ElasticCapacityPoolProperties object itself. + */ + public ElasticCapacityPoolProperties withEncryption(ElasticEncryptionConfiguration encryption) { + this.encryption = encryption; + return this; + } + + /** + * Get the totalThroughputMibps property: Total throughput of the pool in MiB/s. + * + * @return the totalThroughputMibps value. + */ + public Double totalThroughputMibps() { + return this.totalThroughputMibps; + } + + /** + * Get the subnetResourceId property: The Azure Resource URI for a delegated subnet. Must have the delegation + * Microsoft.NetApp/elasticVolumes, this is used by all the volumes within the pool. + * + * @return the subnetResourceId value. + */ + public String subnetResourceId() { + return this.subnetResourceId; + } + + /** + * Set the subnetResourceId property: The Azure Resource URI for a delegated subnet. Must have the delegation + * Microsoft.NetApp/elasticVolumes, this is used by all the volumes within the pool. + * + * @param subnetResourceId the subnetResourceId value to set. + * @return the ElasticCapacityPoolProperties object itself. + */ + public ElasticCapacityPoolProperties withSubnetResourceId(String subnetResourceId) { + this.subnetResourceId = subnetResourceId; + return this; + } + + /** + * Get the currentZone property: Indicates the current zone of the pool. This can be changed for zoneRedundant + * service level pool with the changeZone action. + * + * @return the currentZone value. + */ + public String currentZone() { + return this.currentZone; + } + + /** + * Get the availabilityStatus property: Current availability status of the resource. + * + * @return the availabilityStatus value. + */ + public ElasticResourceAvailabilityStatus availabilityStatus() { + return this.availabilityStatus; + } + + /** + * Get the activeDirectoryConfigResourceId property: The Azure Resource URI for an Active Directory configuration. + * This is used by all the SMB volumes within the pool. + * + * @return the activeDirectoryConfigResourceId value. + */ + public String activeDirectoryConfigResourceId() { + return this.activeDirectoryConfigResourceId; + } + + /** + * Set the activeDirectoryConfigResourceId property: The Azure Resource URI for an Active Directory configuration. + * This is used by all the SMB volumes within the pool. + * + * @param activeDirectoryConfigResourceId the activeDirectoryConfigResourceId value to set. + * @return the ElasticCapacityPoolProperties object itself. + */ + public ElasticCapacityPoolProperties withActiveDirectoryConfigResourceId(String activeDirectoryConfigResourceId) { + this.activeDirectoryConfigResourceId = activeDirectoryConfigResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (serviceLevel() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property serviceLevel in model ElasticCapacityPoolProperties")); + } + if (encryption() != null) { + encryption().validate(); + } + if (subnetResourceId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property subnetResourceId in model ElasticCapacityPoolProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticCapacityPoolProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeLongField("size", this.size); + jsonWriter.writeStringField("serviceLevel", this.serviceLevel == null ? null : this.serviceLevel.toString()); + jsonWriter.writeStringField("subnetResourceId", this.subnetResourceId); + jsonWriter.writeJsonField("encryption", this.encryption); + jsonWriter.writeStringField("activeDirectoryConfigResourceId", this.activeDirectoryConfigResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticCapacityPoolProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticCapacityPoolProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticCapacityPoolProperties. + */ + public static ElasticCapacityPoolProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticCapacityPoolProperties deserializedElasticCapacityPoolProperties + = new ElasticCapacityPoolProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("size".equals(fieldName)) { + deserializedElasticCapacityPoolProperties.size = reader.getLong(); + } else if ("serviceLevel".equals(fieldName)) { + deserializedElasticCapacityPoolProperties.serviceLevel + = ElasticServiceLevel.fromString(reader.getString()); + } else if ("subnetResourceId".equals(fieldName)) { + deserializedElasticCapacityPoolProperties.subnetResourceId = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedElasticCapacityPoolProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("encryption".equals(fieldName)) { + deserializedElasticCapacityPoolProperties.encryption + = ElasticEncryptionConfiguration.fromJson(reader); + } else if ("totalThroughputMibps".equals(fieldName)) { + deserializedElasticCapacityPoolProperties.totalThroughputMibps + = reader.getNullable(JsonReader::getDouble); + } else if ("currentZone".equals(fieldName)) { + deserializedElasticCapacityPoolProperties.currentZone = reader.getString(); + } else if ("availabilityStatus".equals(fieldName)) { + deserializedElasticCapacityPoolProperties.availabilityStatus + = ElasticResourceAvailabilityStatus.fromString(reader.getString()); + } else if ("activeDirectoryConfigResourceId".equals(fieldName)) { + deserializedElasticCapacityPoolProperties.activeDirectoryConfigResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticCapacityPoolProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolUpdate.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolUpdate.java new file mode 100644 index 000000000000..c0edc78dae90 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolUpdate.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The type used for update operations of the ElasticCapacityPool. + */ +@Fluent +public final class ElasticCapacityPoolUpdate implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + + /* + * The resource-specific properties for this resource. + */ + private ElasticCapacityPoolUpdateProperties properties; + + /** + * Creates an instance of ElasticCapacityPoolUpdate class. + */ + public ElasticCapacityPoolUpdate() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the ElasticCapacityPoolUpdate object itself. + */ + public ElasticCapacityPoolUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticCapacityPoolUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticCapacityPoolUpdate object itself. + */ + public ElasticCapacityPoolUpdate withProperties(ElasticCapacityPoolUpdateProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticCapacityPoolUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticCapacityPoolUpdate if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticCapacityPoolUpdate. + */ + public static ElasticCapacityPoolUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticCapacityPoolUpdate deserializedElasticCapacityPoolUpdate = new ElasticCapacityPoolUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticCapacityPoolUpdate.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedElasticCapacityPoolUpdate.properties + = ElasticCapacityPoolUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticCapacityPoolUpdate; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolUpdateProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolUpdateProperties.java new file mode 100644 index 000000000000..b88a394b7baf --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPoolUpdateProperties.java @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The updatable properties of the ElasticCapacityPool. + */ +@Fluent +public final class ElasticCapacityPoolUpdateProperties + implements JsonSerializable { + /* + * Provisioned size of the pool (in bytes). For zoneRedundant service level pool, value must be in the range 1TiB to + * 16TiB or 1TiB to 128TiB for supported region. Values expressed in bytes as multiples of 1TiB till 16TiB and in + * multiples of 8TiB from 24TiB to 128TiB. Pool size can't be shrunk once it is created. + */ + private Long size; + + /* + * Encryption settings + */ + private ElasticEncryptionConfiguration encryption; + + /* + * The Azure Resource URI for an Active Directory configuration. This is used by all the SMB volumes within the pool + */ + private String activeDirectoryConfigResourceId; + + /** + * Creates an instance of ElasticCapacityPoolUpdateProperties class. + */ + public ElasticCapacityPoolUpdateProperties() { + } + + /** + * Get the size property: Provisioned size of the pool (in bytes). For zoneRedundant service level pool, value must + * be in the range 1TiB to 16TiB or 1TiB to 128TiB for supported region. Values expressed in bytes as multiples of + * 1TiB till 16TiB and in multiples of 8TiB from 24TiB to 128TiB. Pool size can't be shrunk once it is created. + * + * @return the size value. + */ + public Long size() { + return this.size; + } + + /** + * Set the size property: Provisioned size of the pool (in bytes). For zoneRedundant service level pool, value must + * be in the range 1TiB to 16TiB or 1TiB to 128TiB for supported region. Values expressed in bytes as multiples of + * 1TiB till 16TiB and in multiples of 8TiB from 24TiB to 128TiB. Pool size can't be shrunk once it is created. + * + * @param size the size value to set. + * @return the ElasticCapacityPoolUpdateProperties object itself. + */ + public ElasticCapacityPoolUpdateProperties withSize(Long size) { + this.size = size; + return this; + } + + /** + * Get the encryption property: Encryption settings. + * + * @return the encryption value. + */ + public ElasticEncryptionConfiguration encryption() { + return this.encryption; + } + + /** + * Set the encryption property: Encryption settings. + * + * @param encryption the encryption value to set. + * @return the ElasticCapacityPoolUpdateProperties object itself. + */ + public ElasticCapacityPoolUpdateProperties withEncryption(ElasticEncryptionConfiguration encryption) { + this.encryption = encryption; + return this; + } + + /** + * Get the activeDirectoryConfigResourceId property: The Azure Resource URI for an Active Directory configuration. + * This is used by all the SMB volumes within the pool. + * + * @return the activeDirectoryConfigResourceId value. + */ + public String activeDirectoryConfigResourceId() { + return this.activeDirectoryConfigResourceId; + } + + /** + * Set the activeDirectoryConfigResourceId property: The Azure Resource URI for an Active Directory configuration. + * This is used by all the SMB volumes within the pool. + * + * @param activeDirectoryConfigResourceId the activeDirectoryConfigResourceId value to set. + * @return the ElasticCapacityPoolUpdateProperties object itself. + */ + public ElasticCapacityPoolUpdateProperties + withActiveDirectoryConfigResourceId(String activeDirectoryConfigResourceId) { + this.activeDirectoryConfigResourceId = activeDirectoryConfigResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (encryption() != null) { + encryption().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("size", this.size); + jsonWriter.writeJsonField("encryption", this.encryption); + jsonWriter.writeStringField("activeDirectoryConfigResourceId", this.activeDirectoryConfigResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticCapacityPoolUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticCapacityPoolUpdateProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticCapacityPoolUpdateProperties. + */ + public static ElasticCapacityPoolUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticCapacityPoolUpdateProperties deserializedElasticCapacityPoolUpdateProperties + = new ElasticCapacityPoolUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("size".equals(fieldName)) { + deserializedElasticCapacityPoolUpdateProperties.size = reader.getNullable(JsonReader::getLong); + } else if ("encryption".equals(fieldName)) { + deserializedElasticCapacityPoolUpdateProperties.encryption + = ElasticEncryptionConfiguration.fromJson(reader); + } else if ("activeDirectoryConfigResourceId".equals(fieldName)) { + deserializedElasticCapacityPoolUpdateProperties.activeDirectoryConfigResourceId + = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticCapacityPoolUpdateProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPools.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticCapacityPools.java new file mode 100644 index 000000000000..f878ee07d04e --- /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 the response. + */ + 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 the response. + */ + ElasticCapacityPool changeZone(String resourceGroupName, String accountName, String poolName, + ChangeZoneRequest body, Context context); + + /** + * Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding availability of a resource along with {@link Response}. + */ + Response checkVolumeFilePathAvailabilityWithResponse( + String resourceGroupName, String accountName, String poolName, + CheckElasticVolumeFilePathAvailabilityRequest body, Context context); + + /** + * Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding availability of a resource. + */ + CheckElasticResourceAvailabilityResponse checkVolumeFilePathAvailability(String resourceGroupName, + String accountName, String poolName, CheckElasticVolumeFilePathAvailabilityRequest body); + + /** + * Get the NetApp Elastic Capacity Pool. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Capacity Pool along with {@link Response}. + */ + ElasticCapacityPool getById(String id); + + /** + * Get the NetApp Elastic Capacity Pool. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the NetApp Elastic Capacity Pool along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete the specified NetApp Elastic Capacity Pool. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ElasticCapacityPool resource. + * + * @param name resource name. + * @return the first stage of the new ElasticCapacityPool definition. + */ + ElasticCapacityPool.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryption.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryption.java new file mode 100644 index 000000000000..e4340a9c9b29 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryption.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Encryption settings. + */ +@Fluent +public final class ElasticEncryption implements JsonSerializable { + /* + * The encryption keySource (provider). Possible values (case-insensitive): Microsoft.NetApp, Microsoft.KeyVault + */ + private KeySource keySource; + + /* + * Properties provided by KeyVault. Applicable if keySource is 'Microsoft.KeyVault'. + */ + private ElasticKeyVaultProperties keyVaultProperties; + + /* + * Identity used to authenticate to KeyVault. Applicable if keySource is 'Microsoft.KeyVault'. + */ + private ElasticEncryptionIdentity identity; + + /** + * Creates an instance of ElasticEncryption class. + */ + public ElasticEncryption() { + } + + /** + * Get the keySource property: The encryption keySource (provider). Possible values (case-insensitive): + * Microsoft.NetApp, Microsoft.KeyVault. + * + * @return the keySource value. + */ + public KeySource keySource() { + return this.keySource; + } + + /** + * Set the keySource property: The encryption keySource (provider). Possible values (case-insensitive): + * Microsoft.NetApp, Microsoft.KeyVault. + * + * @param keySource the keySource value to set. + * @return the ElasticEncryption object itself. + */ + public ElasticEncryption withKeySource(KeySource keySource) { + this.keySource = keySource; + return this; + } + + /** + * Get the keyVaultProperties property: Properties provided by KeyVault. Applicable if keySource is + * 'Microsoft.KeyVault'. + * + * @return the keyVaultProperties value. + */ + public ElasticKeyVaultProperties keyVaultProperties() { + return this.keyVaultProperties; + } + + /** + * Set the keyVaultProperties property: Properties provided by KeyVault. Applicable if keySource is + * 'Microsoft.KeyVault'. + * + * @param keyVaultProperties the keyVaultProperties value to set. + * @return the ElasticEncryption object itself. + */ + public ElasticEncryption withKeyVaultProperties(ElasticKeyVaultProperties keyVaultProperties) { + this.keyVaultProperties = keyVaultProperties; + return this; + } + + /** + * Get the identity property: Identity used to authenticate to KeyVault. Applicable if keySource is + * 'Microsoft.KeyVault'. + * + * @return the identity value. + */ + public ElasticEncryptionIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Identity used to authenticate to KeyVault. Applicable if keySource is + * 'Microsoft.KeyVault'. + * + * @param identity the identity value to set. + * @return the ElasticEncryption object itself. + */ + public ElasticEncryption withIdentity(ElasticEncryptionIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (keyVaultProperties() != null) { + keyVaultProperties().validate(); + } + if (identity() != null) { + identity().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("keySource", this.keySource == null ? null : this.keySource.toString()); + jsonWriter.writeJsonField("keyVaultProperties", this.keyVaultProperties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticEncryption from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticEncryption if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticEncryption. + */ + public static ElasticEncryption fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticEncryption deserializedElasticEncryption = new ElasticEncryption(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keySource".equals(fieldName)) { + deserializedElasticEncryption.keySource = KeySource.fromString(reader.getString()); + } else if ("keyVaultProperties".equals(fieldName)) { + deserializedElasticEncryption.keyVaultProperties = ElasticKeyVaultProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedElasticEncryption.identity = ElasticEncryptionIdentity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticEncryption; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryptionConfiguration.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryptionConfiguration.java new file mode 100644 index 000000000000..75a5ab4ad93f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryptionConfiguration.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * CMK Encryption Configuration. + */ +@Fluent +public final class ElasticEncryptionConfiguration implements JsonSerializable { + /* + * Pool Encryption Key Source. + */ + private ElasticPoolEncryptionKeySource elasticPoolEncryptionKeySource; + + /* + * The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable + * if encryptionKeySource = 'Microsoft.KeyVault'. + */ + private String keyVaultPrivateEndpointResourceId; + + /** + * Creates an instance of ElasticEncryptionConfiguration class. + */ + public ElasticEncryptionConfiguration() { + } + + /** + * Get the elasticPoolEncryptionKeySource property: Pool Encryption Key Source. + * + * @return the elasticPoolEncryptionKeySource value. + */ + public ElasticPoolEncryptionKeySource elasticPoolEncryptionKeySource() { + return this.elasticPoolEncryptionKeySource; + } + + /** + * Set the elasticPoolEncryptionKeySource property: Pool Encryption Key Source. + * + * @param elasticPoolEncryptionKeySource the elasticPoolEncryptionKeySource value to set. + * @return the ElasticEncryptionConfiguration object itself. + */ + public ElasticEncryptionConfiguration + withElasticPoolEncryptionKeySource(ElasticPoolEncryptionKeySource elasticPoolEncryptionKeySource) { + this.elasticPoolEncryptionKeySource = elasticPoolEncryptionKeySource; + return this; + } + + /** + * Get the keyVaultPrivateEndpointResourceId property: The resource ID of private endpoint for KeyVault. It must + * reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + * + * @return the keyVaultPrivateEndpointResourceId value. + */ + public String keyVaultPrivateEndpointResourceId() { + return this.keyVaultPrivateEndpointResourceId; + } + + /** + * Set the keyVaultPrivateEndpointResourceId property: The resource ID of private endpoint for KeyVault. It must + * reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + * + * @param keyVaultPrivateEndpointResourceId the keyVaultPrivateEndpointResourceId value to set. + * @return the ElasticEncryptionConfiguration object itself. + */ + public ElasticEncryptionConfiguration + withKeyVaultPrivateEndpointResourceId(String keyVaultPrivateEndpointResourceId) { + this.keyVaultPrivateEndpointResourceId = keyVaultPrivateEndpointResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (elasticPoolEncryptionKeySource() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property elasticPoolEncryptionKeySource in model ElasticEncryptionConfiguration")); + } + if (keyVaultPrivateEndpointResourceId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property keyVaultPrivateEndpointResourceId in model ElasticEncryptionConfiguration")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticEncryptionConfiguration.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("elasticPoolEncryptionKeySource", + this.elasticPoolEncryptionKeySource == null ? null : this.elasticPoolEncryptionKeySource.toString()); + jsonWriter.writeStringField("keyVaultPrivateEndpointResourceId", this.keyVaultPrivateEndpointResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticEncryptionConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticEncryptionConfiguration if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticEncryptionConfiguration. + */ + public static ElasticEncryptionConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticEncryptionConfiguration deserializedElasticEncryptionConfiguration + = new ElasticEncryptionConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("elasticPoolEncryptionKeySource".equals(fieldName)) { + deserializedElasticEncryptionConfiguration.elasticPoolEncryptionKeySource + = ElasticPoolEncryptionKeySource.fromString(reader.getString()); + } else if ("keyVaultPrivateEndpointResourceId".equals(fieldName)) { + deserializedElasticEncryptionConfiguration.keyVaultPrivateEndpointResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticEncryptionConfiguration; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryptionIdentity.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryptionIdentity.java new file mode 100644 index 000000000000..f170391179bc --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticEncryptionIdentity.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 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; + + /** + * 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; + } + + /** + * 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 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 { + reader.skipChildren(); + } + } + + return deserializedElasticEncryptionIdentity; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticExportPolicy.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticExportPolicy.java new file mode 100644 index 000000000000..86e47d808720 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticExportPolicy.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Set of export policy rules. + */ +@Fluent +public final class ElasticExportPolicy implements JsonSerializable { + /* + * Export policy rule + */ + private List rules; + + /** + * Creates an instance of ElasticExportPolicy class. + */ + public ElasticExportPolicy() { + } + + /** + * Get the rules property: Export policy rule. + * + * @return the rules value. + */ + public List rules() { + return this.rules; + } + + /** + * Set the rules property: Export policy rule. + * + * @param rules the rules value to set. + * @return the ElasticExportPolicy object itself. + */ + public ElasticExportPolicy withRules(List rules) { + this.rules = rules; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (rules() != null) { + rules().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("rules", this.rules, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticExportPolicy from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticExportPolicy if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticExportPolicy. + */ + public static ElasticExportPolicy fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticExportPolicy deserializedElasticExportPolicy = new ElasticExportPolicy(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("rules".equals(fieldName)) { + List rules + = reader.readArray(reader1 -> ElasticExportPolicyRule.fromJson(reader1)); + deserializedElasticExportPolicy.rules = rules; + } else { + reader.skipChildren(); + } + } + + return deserializedElasticExportPolicy; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticExportPolicyRule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticExportPolicyRule.java new file mode 100644 index 000000000000..32b4063961f9 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticExportPolicyRule.java @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Elastic Volume Export Policy Rule. + */ +@Fluent +public final class ElasticExportPolicyRule implements JsonSerializable { + /* + * Controls the priority of the export policy rule. When connecting to the volume the rule with the lowest index + * that applies to the connecting client is used + */ + private Integer ruleIndex; + + /* + * Specifies the Unix file access level for the volume. It encompasses both read-only and read-write permissions. + * Additionally, NoAccess can be set to block all access to the volume + */ + private ElasticUnixAccessRule unixAccessRule; + + /* + * Allows clients to access the volume with the NFSv3 protocol. Enable only for NFSv3 type volumes + */ + private ElasticNfsv3Access nfsv3; + + /* + * Allows clients to access the volume with at least NFSv4.1 protocol. + */ + private ElasticNfsv4Access nfsv4; + + /* + * Client ingress specification for the export policy as list of IPv4 CIDRs, IPv4 host addresses and host names. + */ + private List allowedClients; + + /* + * Indicates whether root access to the volume is granted to clients affected by this rule + */ + private ElasticRootAccess rootAccess; + + /** + * Creates an instance of ElasticExportPolicyRule class. + */ + public ElasticExportPolicyRule() { + } + + /** + * Get the ruleIndex property: Controls the priority of the export policy rule. When connecting to the volume the + * rule with the lowest index that applies to the connecting client is used. + * + * @return the ruleIndex value. + */ + public Integer ruleIndex() { + return this.ruleIndex; + } + + /** + * Set the ruleIndex property: Controls the priority of the export policy rule. When connecting to the volume the + * rule with the lowest index that applies to the connecting client is used. + * + * @param ruleIndex the ruleIndex value to set. + * @return the ElasticExportPolicyRule object itself. + */ + public ElasticExportPolicyRule withRuleIndex(Integer ruleIndex) { + this.ruleIndex = ruleIndex; + return this; + } + + /** + * Get the unixAccessRule property: Specifies the Unix file access level for the volume. It encompasses both + * read-only and read-write permissions. Additionally, NoAccess can be set to block all access to the volume. + * + * @return the unixAccessRule value. + */ + public ElasticUnixAccessRule unixAccessRule() { + return this.unixAccessRule; + } + + /** + * Set the unixAccessRule property: Specifies the Unix file access level for the volume. It encompasses both + * read-only and read-write permissions. Additionally, NoAccess can be set to block all access to the volume. + * + * @param unixAccessRule the unixAccessRule value to set. + * @return the ElasticExportPolicyRule object itself. + */ + public ElasticExportPolicyRule withUnixAccessRule(ElasticUnixAccessRule unixAccessRule) { + this.unixAccessRule = unixAccessRule; + return this; + } + + /** + * Get the nfsv3 property: Allows clients to access the volume with the NFSv3 protocol. Enable only for NFSv3 type + * volumes. + * + * @return the nfsv3 value. + */ + public ElasticNfsv3Access nfsv3() { + return this.nfsv3; + } + + /** + * Set the nfsv3 property: Allows clients to access the volume with the NFSv3 protocol. Enable only for NFSv3 type + * volumes. + * + * @param nfsv3 the nfsv3 value to set. + * @return the ElasticExportPolicyRule object itself. + */ + public ElasticExportPolicyRule withNfsv3(ElasticNfsv3Access nfsv3) { + this.nfsv3 = nfsv3; + return this; + } + + /** + * Get the nfsv4 property: Allows clients to access the volume with at least NFSv4.1 protocol. + * + * @return the nfsv4 value. + */ + public ElasticNfsv4Access nfsv4() { + return this.nfsv4; + } + + /** + * Set the nfsv4 property: Allows clients to access the volume with at least NFSv4.1 protocol. + * + * @param nfsv4 the nfsv4 value to set. + * @return the ElasticExportPolicyRule object itself. + */ + public ElasticExportPolicyRule withNfsv4(ElasticNfsv4Access nfsv4) { + this.nfsv4 = nfsv4; + return this; + } + + /** + * Get the allowedClients property: Client ingress specification for the export policy as list of IPv4 CIDRs, IPv4 + * host addresses and host names. + * + * @return the allowedClients value. + */ + public List allowedClients() { + return this.allowedClients; + } + + /** + * Set the allowedClients property: Client ingress specification for the export policy as list of IPv4 CIDRs, IPv4 + * host addresses and host names. + * + * @param allowedClients the allowedClients value to set. + * @return the ElasticExportPolicyRule object itself. + */ + public ElasticExportPolicyRule withAllowedClients(List allowedClients) { + this.allowedClients = allowedClients; + return this; + } + + /** + * Get the rootAccess property: Indicates whether root access to the volume is granted to clients affected by this + * rule. + * + * @return the rootAccess value. + */ + public ElasticRootAccess rootAccess() { + return this.rootAccess; + } + + /** + * Set the rootAccess property: Indicates whether root access to the volume is granted to clients affected by this + * rule. + * + * @param rootAccess the rootAccess value to set. + * @return the ElasticExportPolicyRule object itself. + */ + public ElasticExportPolicyRule withRootAccess(ElasticRootAccess rootAccess) { + this.rootAccess = rootAccess; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("ruleIndex", this.ruleIndex); + jsonWriter.writeStringField("unixAccessRule", + this.unixAccessRule == null ? null : this.unixAccessRule.toString()); + jsonWriter.writeStringField("nfsv3", this.nfsv3 == null ? null : this.nfsv3.toString()); + jsonWriter.writeStringField("nfsv4", this.nfsv4 == null ? null : this.nfsv4.toString()); + jsonWriter.writeArrayField("allowedClients", this.allowedClients, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("rootAccess", this.rootAccess == null ? null : this.rootAccess.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticExportPolicyRule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticExportPolicyRule if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticExportPolicyRule. + */ + public static ElasticExportPolicyRule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticExportPolicyRule deserializedElasticExportPolicyRule = new ElasticExportPolicyRule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ruleIndex".equals(fieldName)) { + deserializedElasticExportPolicyRule.ruleIndex = reader.getNullable(JsonReader::getInt); + } else if ("unixAccessRule".equals(fieldName)) { + deserializedElasticExportPolicyRule.unixAccessRule + = ElasticUnixAccessRule.fromString(reader.getString()); + } else if ("nfsv3".equals(fieldName)) { + deserializedElasticExportPolicyRule.nfsv3 = ElasticNfsv3Access.fromString(reader.getString()); + } else if ("nfsv4".equals(fieldName)) { + deserializedElasticExportPolicyRule.nfsv4 = ElasticNfsv4Access.fromString(reader.getString()); + } else if ("allowedClients".equals(fieldName)) { + List allowedClients = reader.readArray(reader1 -> reader1.getString()); + deserializedElasticExportPolicyRule.allowedClients = allowedClients; + } else if ("rootAccess".equals(fieldName)) { + deserializedElasticExportPolicyRule.rootAccess = ElasticRootAccess.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticExportPolicyRule; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticKeyVaultProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticKeyVaultProperties.java new file mode 100644 index 000000000000..e0b7f1ab7fcf --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticKeyVaultProperties.java @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Properties of key vault. + */ +@Fluent +public final class ElasticKeyVaultProperties implements JsonSerializable { + /* + * The Uri of KeyVault. + */ + private String keyVaultUri; + + /* + * The name of KeyVault key. + */ + private String keyName; + + /* + * The resource ID of KeyVault. + */ + private String keyVaultResourceId; + + /* + * Status of the KeyVault connection. + */ + private ElasticKeyVaultStatus status; + + /** + * Creates an instance of ElasticKeyVaultProperties class. + */ + public ElasticKeyVaultProperties() { + } + + /** + * Get the keyVaultUri property: The Uri of KeyVault. + * + * @return the keyVaultUri value. + */ + public String keyVaultUri() { + return this.keyVaultUri; + } + + /** + * Set the keyVaultUri property: The Uri of KeyVault. + * + * @param keyVaultUri the keyVaultUri value to set. + * @return the ElasticKeyVaultProperties object itself. + */ + public ElasticKeyVaultProperties withKeyVaultUri(String keyVaultUri) { + this.keyVaultUri = keyVaultUri; + return this; + } + + /** + * Get the keyName property: The name of KeyVault key. + * + * @return the keyName value. + */ + public String keyName() { + return this.keyName; + } + + /** + * Set the keyName property: The name of KeyVault key. + * + * @param keyName the keyName value to set. + * @return the ElasticKeyVaultProperties object itself. + */ + public ElasticKeyVaultProperties withKeyName(String keyName) { + this.keyName = keyName; + return this; + } + + /** + * Get the keyVaultResourceId property: The resource ID of KeyVault. + * + * @return the keyVaultResourceId value. + */ + public String keyVaultResourceId() { + return this.keyVaultResourceId; + } + + /** + * Set the keyVaultResourceId property: The resource ID of KeyVault. + * + * @param keyVaultResourceId the keyVaultResourceId value to set. + * @return the ElasticKeyVaultProperties object itself. + */ + public ElasticKeyVaultProperties withKeyVaultResourceId(String keyVaultResourceId) { + this.keyVaultResourceId = keyVaultResourceId; + return this; + } + + /** + * Get the status property: Status of the KeyVault connection. + * + * @return the status value. + */ + public ElasticKeyVaultStatus status() { + return this.status; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("keyVaultUri", this.keyVaultUri); + jsonWriter.writeStringField("keyName", this.keyName); + jsonWriter.writeStringField("keyVaultResourceId", this.keyVaultResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticKeyVaultProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticKeyVaultProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticKeyVaultProperties. + */ + public static ElasticKeyVaultProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticKeyVaultProperties deserializedElasticKeyVaultProperties = new ElasticKeyVaultProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyVaultUri".equals(fieldName)) { + deserializedElasticKeyVaultProperties.keyVaultUri = reader.getString(); + } else if ("keyName".equals(fieldName)) { + deserializedElasticKeyVaultProperties.keyName = reader.getString(); + } else if ("keyVaultResourceId".equals(fieldName)) { + deserializedElasticKeyVaultProperties.keyVaultResourceId = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedElasticKeyVaultProperties.status = ElasticKeyVaultStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticKeyVaultProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticKeyVaultStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticKeyVaultStatus.java new file mode 100644 index 000000000000..b03bf923133d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticKeyVaultStatus.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * KeyVault status. + */ +public final class ElasticKeyVaultStatus extends ExpandableStringEnum { + /** + * KeyVault connection created but not in use. + */ + public static final ElasticKeyVaultStatus CREATED = fromString("Created"); + + /** + * KeyVault connection in use by SMB Volume. + */ + public static final ElasticKeyVaultStatus IN_USE = fromString("InUse"); + + /** + * KeyVault connection Deleted. + */ + public static final ElasticKeyVaultStatus DELETED = fromString("Deleted"); + + /** + * Error with the KeyVault connection. + */ + public static final ElasticKeyVaultStatus ERROR = fromString("Error"); + + /** + * KeyVault connection Updating. + */ + public static final ElasticKeyVaultStatus UPDATING = fromString("Updating"); + + /** + * Creates a new instance of ElasticKeyVaultStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticKeyVaultStatus() { + } + + /** + * Creates or finds a ElasticKeyVaultStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticKeyVaultStatus. + */ + public static ElasticKeyVaultStatus fromString(String name) { + return fromString(name, ElasticKeyVaultStatus.class); + } + + /** + * Gets known ElasticKeyVaultStatus values. + * + * @return known ElasticKeyVaultStatus values. + */ + public static Collection values() { + return values(ElasticKeyVaultStatus.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticMountTargetProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticMountTargetProperties.java new file mode 100644 index 000000000000..8cd6c9a184f1 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticMountTargetProperties.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Contains all the information needed to mount an elastic volume. + */ +@Immutable +public final class ElasticMountTargetProperties implements JsonSerializable { + /* + * The mount target's IPv4 address, used to mount the volume + */ + private String ipAddress; + + /* + * The SMB server's Fully Qualified Domain Name, FQDN + */ + private String smbServerFqdn; + + /** + * Creates an instance of ElasticMountTargetProperties class. + */ + private ElasticMountTargetProperties() { + } + + /** + * Get the ipAddress property: The mount target's IPv4 address, used to mount the volume. + * + * @return the ipAddress value. + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Get the smbServerFqdn property: The SMB server's Fully Qualified Domain Name, FQDN. + * + * @return the smbServerFqdn value. + */ + public String smbServerFqdn() { + return this.smbServerFqdn; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticMountTargetProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticMountTargetProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticMountTargetProperties. + */ + public static ElasticMountTargetProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticMountTargetProperties deserializedElasticMountTargetProperties = new ElasticMountTargetProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ipAddress".equals(fieldName)) { + deserializedElasticMountTargetProperties.ipAddress = reader.getString(); + } else if ("smbServerFqdn".equals(fieldName)) { + deserializedElasticMountTargetProperties.smbServerFqdn = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticMountTargetProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticNfsv3Access.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticNfsv3Access.java new file mode 100644 index 000000000000..5869cd66b457 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticNfsv3Access.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * NFSv3 access. + */ +public final class ElasticNfsv3Access extends ExpandableStringEnum { + /** + * Clients can connect to the volume using the NFSv3 protocol. + */ + public static final ElasticNfsv3Access ENABLED = fromString("Enabled"); + + /** + * Clients can't connect to the volume using the NFSv3 protocol. + */ + public static final ElasticNfsv3Access DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of ElasticNfsv3Access value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticNfsv3Access() { + } + + /** + * Creates or finds a ElasticNfsv3Access from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticNfsv3Access. + */ + public static ElasticNfsv3Access fromString(String name) { + return fromString(name, ElasticNfsv3Access.class); + } + + /** + * Gets known ElasticNfsv3Access values. + * + * @return known ElasticNfsv3Access values. + */ + public static Collection values() { + return values(ElasticNfsv3Access.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticNfsv4Access.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticNfsv4Access.java new file mode 100644 index 000000000000..189fde0509d6 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticNfsv4Access.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * NFSv4 access. + */ +public final class ElasticNfsv4Access extends ExpandableStringEnum { + /** + * Clients can connect to the volume using the NFSv4 protocol. + */ + public static final ElasticNfsv4Access ENABLED = fromString("Enabled"); + + /** + * Clients can't connect to the volume using the NFSv4 protocol. + */ + public static final ElasticNfsv4Access DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of ElasticNfsv4Access value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticNfsv4Access() { + } + + /** + * Creates or finds a ElasticNfsv4Access from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticNfsv4Access. + */ + public static ElasticNfsv4Access fromString(String name) { + return fromString(name, ElasticNfsv4Access.class); + } + + /** + * Gets known ElasticNfsv4Access values. + * + * @return known ElasticNfsv4Access values. + */ + public static Collection values() { + return values(ElasticNfsv4Access.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticPoolEncryptionKeySource.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticPoolEncryptionKeySource.java new file mode 100644 index 000000000000..aa4cc4f721a7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticPoolEncryptionKeySource.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Pool Encryption Key Source. + */ +public final class ElasticPoolEncryptionKeySource extends ExpandableStringEnum { + /** + * Represents the encryption key source of Elastic pool is Microsoft.NetApp. + */ + public static final ElasticPoolEncryptionKeySource NET_APP = fromString("NetApp"); + + /** + * Represents the encryption key source of Elastic pool is Microsoft.KeyVault. + */ + public static final ElasticPoolEncryptionKeySource KEY_VAULT = fromString("KeyVault"); + + /** + * Creates a new instance of ElasticPoolEncryptionKeySource value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticPoolEncryptionKeySource() { + } + + /** + * Creates or finds a ElasticPoolEncryptionKeySource from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticPoolEncryptionKeySource. + */ + public static ElasticPoolEncryptionKeySource fromString(String name) { + return fromString(name, ElasticPoolEncryptionKeySource.class); + } + + /** + * Gets known ElasticPoolEncryptionKeySource values. + * + * @return known ElasticPoolEncryptionKeySource values. + */ + public static Collection values() { + return values(ElasticPoolEncryptionKeySource.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticProtocolType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticProtocolType.java new file mode 100644 index 000000000000..d6a30768d5f2 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticProtocolType.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Protocol types for elastic volume. + */ +public final class ElasticProtocolType extends ExpandableStringEnum { + /** + * NFSv3 protocol type. + */ + public static final ElasticProtocolType NFSV3 = fromString("NFSv3"); + + /** + * NFSv4 protocol type. + */ + public static final ElasticProtocolType NFSV4 = fromString("NFSv4"); + + /** + * SMB/CIFS protocol type. + */ + public static final ElasticProtocolType SMB = fromString("SMB"); + + /** + * Creates a new instance of ElasticProtocolType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticProtocolType() { + } + + /** + * Creates or finds a ElasticProtocolType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticProtocolType. + */ + public static ElasticProtocolType fromString(String name) { + return fromString(name, ElasticProtocolType.class); + } + + /** + * Gets known ElasticProtocolType values. + * + * @return known ElasticProtocolType values. + */ + public static Collection values() { + return values(ElasticProtocolType.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticResourceAvailabilityStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticResourceAvailabilityStatus.java new file mode 100644 index 000000000000..438fe0bd73b9 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticResourceAvailabilityStatus.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Current availability status of the resource. + */ +public final class ElasticResourceAvailabilityStatus extends ExpandableStringEnum { + /** + * The resource is currently Online and accessible. + */ + public static final ElasticResourceAvailabilityStatus ONLINE = fromString("Online"); + + /** + * The resource is currently Offline and not accessible. + */ + public static final ElasticResourceAvailabilityStatus OFFLINE = fromString("Offline"); + + /** + * Creates a new instance of ElasticResourceAvailabilityStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticResourceAvailabilityStatus() { + } + + /** + * Creates or finds a ElasticResourceAvailabilityStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticResourceAvailabilityStatus. + */ + public static ElasticResourceAvailabilityStatus fromString(String name) { + return fromString(name, ElasticResourceAvailabilityStatus.class); + } + + /** + * Gets known ElasticResourceAvailabilityStatus values. + * + * @return known ElasticResourceAvailabilityStatus values. + */ + public static Collection values() { + return values(ElasticResourceAvailabilityStatus.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticRootAccess.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticRootAccess.java new file mode 100644 index 000000000000..72aeb2eb784d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticRootAccess.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Root access. + */ +public final class ElasticRootAccess extends ExpandableStringEnum { + /** + * Root user access is enabled for clients affected by this rule. + */ + public static final ElasticRootAccess ENABLED = fromString("Enabled"); + + /** + * Root user access is disabled for clients affected by this rule. + */ + public static final ElasticRootAccess DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of ElasticRootAccess value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticRootAccess() { + } + + /** + * Creates or finds a ElasticRootAccess from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticRootAccess. + */ + public static ElasticRootAccess fromString(String name) { + return fromString(name, ElasticRootAccess.class); + } + + /** + * Gets known ElasticRootAccess values. + * + * @return known ElasticRootAccess values. + */ + public static Collection values() { + return values(ElasticRootAccess.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticServiceLevel.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticServiceLevel.java new file mode 100644 index 000000000000..d7eba1c8da06 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticServiceLevel.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Service level for elastic capacity pool. + */ +public final class ElasticServiceLevel extends ExpandableStringEnum { + /** + * Zone redundant storage service level. + */ + public static final ElasticServiceLevel ZONE_REDUNDANT = fromString("ZoneRedundant"); + + /** + * Creates a new instance of ElasticServiceLevel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticServiceLevel() { + } + + /** + * Creates or finds a ElasticServiceLevel from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticServiceLevel. + */ + public static ElasticServiceLevel fromString(String name) { + return fromString(name, ElasticServiceLevel.class); + } + + /** + * Gets known ElasticServiceLevel values. + * + * @return known ElasticServiceLevel values. + */ + public static Collection values() { + return values(ElasticServiceLevel.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbEncryption.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbEncryption.java new file mode 100644 index 000000000000..8595a9bd4819 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbEncryption.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * SMB encryption. + */ +public final class ElasticSmbEncryption extends ExpandableStringEnum { + /** + * Value indicating the SMB encryption is enabled. + */ + public static final ElasticSmbEncryption ENABLED = fromString("Enabled"); + + /** + * Value indicating the SMB encryption is disabled. + */ + public static final ElasticSmbEncryption DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of ElasticSmbEncryption value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticSmbEncryption() { + } + + /** + * Creates or finds a ElasticSmbEncryption from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticSmbEncryption. + */ + public static ElasticSmbEncryption fromString(String name) { + return fromString(name, ElasticSmbEncryption.class); + } + + /** + * Gets known ElasticSmbEncryption values. + * + * @return known ElasticSmbEncryption values. + */ + public static Collection values() { + return values(ElasticSmbEncryption.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbPatchProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbPatchProperties.java new file mode 100644 index 000000000000..7766dfc4442c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbPatchProperties.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * SMB Patch Properties. + */ +@Fluent +public final class ElasticSmbPatchProperties implements JsonSerializable { + /* + * Used to enable or disable encryption for in-flight SMB data volume. This flag can be modified during Elastic + * volume update operation as well. Only applicable for SMB protocol Elastic volumes. + */ + private ElasticSmbEncryption smbEncryption; + + /** + * Creates an instance of ElasticSmbPatchProperties class. + */ + public ElasticSmbPatchProperties() { + } + + /** + * Get the smbEncryption property: Used to enable or disable encryption for in-flight SMB data volume. This flag can + * be modified during Elastic volume update operation as well. Only applicable for SMB protocol Elastic volumes. + * + * @return the smbEncryption value. + */ + public ElasticSmbEncryption smbEncryption() { + return this.smbEncryption; + } + + /** + * Set the smbEncryption property: Used to enable or disable encryption for in-flight SMB data volume. This flag can + * be modified during Elastic volume update operation as well. Only applicable for SMB protocol Elastic volumes. + * + * @param smbEncryption the smbEncryption value to set. + * @return the ElasticSmbPatchProperties object itself. + */ + public ElasticSmbPatchProperties withSmbEncryption(ElasticSmbEncryption smbEncryption) { + this.smbEncryption = smbEncryption; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("smbEncryption", this.smbEncryption == null ? null : this.smbEncryption.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSmbPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSmbPatchProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticSmbPatchProperties. + */ + public static ElasticSmbPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSmbPatchProperties deserializedElasticSmbPatchProperties = new ElasticSmbPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("smbEncryption".equals(fieldName)) { + deserializedElasticSmbPatchProperties.smbEncryption + = ElasticSmbEncryption.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSmbPatchProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbProperties.java new file mode 100644 index 000000000000..ce54c98ff0ed --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSmbProperties.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * SMB Properties. + */ +@Fluent +public final class ElasticSmbProperties implements JsonSerializable { + /* + * Used to enable or disable encryption for in-flight SMB data volume. This flag can be modified during Elastic + * volume update operation as well. Only applicable for SMB protocol Elastic volumes. + */ + private ElasticSmbEncryption smbEncryption; + + /** + * Creates an instance of ElasticSmbProperties class. + */ + public ElasticSmbProperties() { + } + + /** + * Get the smbEncryption property: Used to enable or disable encryption for in-flight SMB data volume. This flag can + * be modified during Elastic volume update operation as well. Only applicable for SMB protocol Elastic volumes. + * + * @return the smbEncryption value. + */ + public ElasticSmbEncryption smbEncryption() { + return this.smbEncryption; + } + + /** + * Set the smbEncryption property: Used to enable or disable encryption for in-flight SMB data volume. This flag can + * be modified during Elastic volume update operation as well. Only applicable for SMB protocol Elastic volumes. + * + * @param smbEncryption the smbEncryption value to set. + * @return the ElasticSmbProperties object itself. + */ + public ElasticSmbProperties withSmbEncryption(ElasticSmbEncryption smbEncryption) { + this.smbEncryption = smbEncryption; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("smbEncryption", this.smbEncryption == null ? null : this.smbEncryption.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSmbProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSmbProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticSmbProperties. + */ + public static ElasticSmbProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSmbProperties deserializedElasticSmbProperties = new ElasticSmbProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("smbEncryption".equals(fieldName)) { + deserializedElasticSmbProperties.smbEncryption + = ElasticSmbEncryption.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSmbProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshot.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshot.java new file mode 100644 index 000000000000..9e1816bc2354 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshot.java @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotInner; + +/** + * An immutable client-side representation of ElasticSnapshot. + */ +public interface ElasticSnapshot { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + ElasticSnapshotProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotInner object. + * + * @return the inner object. + */ + ElasticSnapshotInner innerModel(); + + /** + * The entirety of the ElasticSnapshot definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The ElasticSnapshot definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ElasticSnapshot definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the ElasticSnapshot definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, accountName, poolName, volumeName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @return the next definition stage. + */ + WithCreate withExistingElasticVolume(String resourceGroupName, String accountName, String poolName, + String volumeName); + } + + /** + * The stage of the ElasticSnapshot definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + ElasticSnapshot create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ElasticSnapshot create(Context context); + } + + /** + * The stage of the ElasticSnapshot definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(ElasticSnapshotProperties properties); + } + } + + /** + * Begins update for the ElasticSnapshot resource. + * + * @return the stage of resource update. + */ + ElasticSnapshot.Update update(); + + /** + * The template for ElasticSnapshot update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ElasticSnapshot apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ElasticSnapshot apply(Context context); + } + + /** + * The ElasticSnapshot update stages. + */ + interface UpdateStages { + /** + * The stage of the ElasticSnapshot update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + Update withProperties(ElasticSnapshotProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ElasticSnapshot refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ElasticSnapshot refresh(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicies.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicies.java new file mode 100644 index 000000000000..75aed519de08 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicies.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ElasticSnapshotPolicies. + */ +public interface ElasticSnapshotPolicies { + /** + * Get a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshotPolicy along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context); + + /** + * Get a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshotPolicy. + */ + ElasticSnapshotPolicy get(String resourceGroupName, String accountName, String snapshotPolicyName); + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String snapshotPolicyName); + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String snapshotPolicyName, Context context); + + /** + * List ElasticSnapshotPolicy resources by ElasticAccount. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByElasticAccount(String resourceGroupName, String accountName); + + /** + * List ElasticSnapshotPolicy resources by ElasticAccount. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshotPolicy list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByElasticAccount(String resourceGroupName, String accountName, + Context context); + + /** + * Get elastic volumes associated with Elastic Snapshot Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic volumes associated with Elastic Snapshot Policy as paginated response with {@link PagedIterable}. + */ + PagedIterable listElasticVolumes(String resourceGroupName, String accountName, + String snapshotPolicyName); + + /** + * Get elastic volumes associated with Elastic Snapshot Policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param snapshotPolicyName The name of the ElasticSnapshotPolicy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return elastic volumes associated with Elastic Snapshot Policy as paginated response with {@link PagedIterable}. + */ + PagedIterable listElasticVolumes(String resourceGroupName, String accountName, + String snapshotPolicyName, Context context); + + /** + * Get a ElasticSnapshotPolicy. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshotPolicy along with {@link Response}. + */ + ElasticSnapshotPolicy getById(String id); + + /** + * Get a ElasticSnapshotPolicy. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshotPolicy along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a ElasticSnapshotPolicy. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ElasticSnapshotPolicy resource. + * + * @param name resource name. + * @return the first stage of the new ElasticSnapshotPolicy definition. + */ + ElasticSnapshotPolicy.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicy.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicy.java new file mode 100644 index 000000000000..d5e54f857544 --- /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(ElasticSnapshotPolicyProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ElasticSnapshotPolicy refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ElasticSnapshotPolicy refresh(Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyDailySchedule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyDailySchedule.java new file mode 100644 index 000000000000..d21f63d3ca15 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyDailySchedule.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Daily Schedule properties used to create NetApp snapshot policy. + */ +@Fluent +public final class ElasticSnapshotPolicyDailySchedule implements JsonSerializable { + /* + * Daily snapshot count to keep + */ + private Integer snapshotsToKeep; + + /* + * Indicates which hour in UTC timezone a snapshot should be taken + */ + private Integer hour; + + /* + * Indicates which minute snapshot should be taken + */ + private Integer minute; + + /** + * Creates an instance of ElasticSnapshotPolicyDailySchedule class. + */ + public ElasticSnapshotPolicyDailySchedule() { + } + + /** + * Get the snapshotsToKeep property: Daily snapshot count to keep. + * + * @return the snapshotsToKeep value. + */ + public Integer snapshotsToKeep() { + return this.snapshotsToKeep; + } + + /** + * Set the snapshotsToKeep property: Daily snapshot count to keep. + * + * @param snapshotsToKeep the snapshotsToKeep value to set. + * @return the ElasticSnapshotPolicyDailySchedule object itself. + */ + public ElasticSnapshotPolicyDailySchedule withSnapshotsToKeep(Integer snapshotsToKeep) { + this.snapshotsToKeep = snapshotsToKeep; + return this; + } + + /** + * Get the hour property: Indicates which hour in UTC timezone a snapshot should be taken. + * + * @return the hour value. + */ + public Integer hour() { + return this.hour; + } + + /** + * Set the hour property: Indicates which hour in UTC timezone a snapshot should be taken. + * + * @param hour the hour value to set. + * @return the ElasticSnapshotPolicyDailySchedule object itself. + */ + public ElasticSnapshotPolicyDailySchedule withHour(Integer hour) { + this.hour = hour; + return this; + } + + /** + * Get the minute property: Indicates which minute snapshot should be taken. + * + * @return the minute value. + */ + public Integer minute() { + return this.minute; + } + + /** + * Set the minute property: Indicates which minute snapshot should be taken. + * + * @param minute the minute value to set. + * @return the ElasticSnapshotPolicyDailySchedule object itself. + */ + public ElasticSnapshotPolicyDailySchedule withMinute(Integer minute) { + this.minute = minute; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("snapshotsToKeep", this.snapshotsToKeep); + jsonWriter.writeNumberField("hour", this.hour); + jsonWriter.writeNumberField("minute", this.minute); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotPolicyDailySchedule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotPolicyDailySchedule if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticSnapshotPolicyDailySchedule. + */ + public static ElasticSnapshotPolicyDailySchedule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotPolicyDailySchedule deserializedElasticSnapshotPolicyDailySchedule + = new ElasticSnapshotPolicyDailySchedule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshotsToKeep".equals(fieldName)) { + deserializedElasticSnapshotPolicyDailySchedule.snapshotsToKeep + = reader.getNullable(JsonReader::getInt); + } else if ("hour".equals(fieldName)) { + deserializedElasticSnapshotPolicyDailySchedule.hour = reader.getNullable(JsonReader::getInt); + } else if ("minute".equals(fieldName)) { + deserializedElasticSnapshotPolicyDailySchedule.minute = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotPolicyDailySchedule; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyHourlySchedule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyHourlySchedule.java new file mode 100644 index 000000000000..bdec028a79b5 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyHourlySchedule.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Hourly Schedule properties used to create NetApp snapshot policy. + */ +@Fluent +public final class ElasticSnapshotPolicyHourlySchedule + implements JsonSerializable { + /* + * Hourly snapshot count to keep + */ + private Integer snapshotsToKeep; + + /* + * Indicates which minute snapshot should be taken + */ + private Integer minute; + + /** + * Creates an instance of ElasticSnapshotPolicyHourlySchedule class. + */ + public ElasticSnapshotPolicyHourlySchedule() { + } + + /** + * Get the snapshotsToKeep property: Hourly snapshot count to keep. + * + * @return the snapshotsToKeep value. + */ + public Integer snapshotsToKeep() { + return this.snapshotsToKeep; + } + + /** + * Set the snapshotsToKeep property: Hourly snapshot count to keep. + * + * @param snapshotsToKeep the snapshotsToKeep value to set. + * @return the ElasticSnapshotPolicyHourlySchedule object itself. + */ + public ElasticSnapshotPolicyHourlySchedule withSnapshotsToKeep(Integer snapshotsToKeep) { + this.snapshotsToKeep = snapshotsToKeep; + return this; + } + + /** + * Get the minute property: Indicates which minute snapshot should be taken. + * + * @return the minute value. + */ + public Integer minute() { + return this.minute; + } + + /** + * Set the minute property: Indicates which minute snapshot should be taken. + * + * @param minute the minute value to set. + * @return the ElasticSnapshotPolicyHourlySchedule object itself. + */ + public ElasticSnapshotPolicyHourlySchedule withMinute(Integer minute) { + this.minute = minute; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("snapshotsToKeep", this.snapshotsToKeep); + jsonWriter.writeNumberField("minute", this.minute); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotPolicyHourlySchedule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotPolicyHourlySchedule if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticSnapshotPolicyHourlySchedule. + */ + public static ElasticSnapshotPolicyHourlySchedule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotPolicyHourlySchedule deserializedElasticSnapshotPolicyHourlySchedule + = new ElasticSnapshotPolicyHourlySchedule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshotsToKeep".equals(fieldName)) { + deserializedElasticSnapshotPolicyHourlySchedule.snapshotsToKeep + = reader.getNullable(JsonReader::getInt); + } else if ("minute".equals(fieldName)) { + deserializedElasticSnapshotPolicyHourlySchedule.minute = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotPolicyHourlySchedule; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyMonthlySchedule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyMonthlySchedule.java new file mode 100644 index 000000000000..1cbac2277d20 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyMonthlySchedule.java @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Monthly Schedule properties used to create NetApp snapshot policy. + */ +@Fluent +public final class ElasticSnapshotPolicyMonthlySchedule + implements JsonSerializable { + /* + * Monthly snapshot count to keep + */ + private Integer snapshotsToKeep; + + /* + * Indicates which days of the month snapshot (1-31) should be taken, accepts a list of integers + */ + private List daysOfMonth; + + /* + * Indicates which hour in UTC timezone a snapshot should be taken + */ + private Integer hour; + + /* + * Indicates which minute snapshot should be taken + */ + private Integer minute; + + /** + * Creates an instance of ElasticSnapshotPolicyMonthlySchedule class. + */ + public ElasticSnapshotPolicyMonthlySchedule() { + } + + /** + * Get the snapshotsToKeep property: Monthly snapshot count to keep. + * + * @return the snapshotsToKeep value. + */ + public Integer snapshotsToKeep() { + return this.snapshotsToKeep; + } + + /** + * Set the snapshotsToKeep property: Monthly snapshot count to keep. + * + * @param snapshotsToKeep the snapshotsToKeep value to set. + * @return the ElasticSnapshotPolicyMonthlySchedule object itself. + */ + public ElasticSnapshotPolicyMonthlySchedule withSnapshotsToKeep(Integer snapshotsToKeep) { + this.snapshotsToKeep = snapshotsToKeep; + return this; + } + + /** + * Get the daysOfMonth property: Indicates which days of the month snapshot (1-31) should be taken, accepts a list + * of integers. + * + * @return the daysOfMonth value. + */ + public List daysOfMonth() { + return this.daysOfMonth; + } + + /** + * Set the daysOfMonth property: Indicates which days of the month snapshot (1-31) should be taken, accepts a list + * of integers. + * + * @param daysOfMonth the daysOfMonth value to set. + * @return the ElasticSnapshotPolicyMonthlySchedule object itself. + */ + public ElasticSnapshotPolicyMonthlySchedule withDaysOfMonth(List daysOfMonth) { + this.daysOfMonth = daysOfMonth; + return this; + } + + /** + * Get the hour property: Indicates which hour in UTC timezone a snapshot should be taken. + * + * @return the hour value. + */ + public Integer hour() { + return this.hour; + } + + /** + * Set the hour property: Indicates which hour in UTC timezone a snapshot should be taken. + * + * @param hour the hour value to set. + * @return the ElasticSnapshotPolicyMonthlySchedule object itself. + */ + public ElasticSnapshotPolicyMonthlySchedule withHour(Integer hour) { + this.hour = hour; + return this; + } + + /** + * Get the minute property: Indicates which minute snapshot should be taken. + * + * @return the minute value. + */ + public Integer minute() { + return this.minute; + } + + /** + * Set the minute property: Indicates which minute snapshot should be taken. + * + * @param minute the minute value to set. + * @return the ElasticSnapshotPolicyMonthlySchedule object itself. + */ + public ElasticSnapshotPolicyMonthlySchedule withMinute(Integer minute) { + this.minute = minute; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("snapshotsToKeep", this.snapshotsToKeep); + jsonWriter.writeArrayField("daysOfMonth", this.daysOfMonth, (writer, element) -> writer.writeInt(element)); + jsonWriter.writeNumberField("hour", this.hour); + jsonWriter.writeNumberField("minute", this.minute); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotPolicyMonthlySchedule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotPolicyMonthlySchedule if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticSnapshotPolicyMonthlySchedule. + */ + public static ElasticSnapshotPolicyMonthlySchedule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotPolicyMonthlySchedule deserializedElasticSnapshotPolicyMonthlySchedule + = new ElasticSnapshotPolicyMonthlySchedule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshotsToKeep".equals(fieldName)) { + deserializedElasticSnapshotPolicyMonthlySchedule.snapshotsToKeep + = reader.getNullable(JsonReader::getInt); + } else if ("daysOfMonth".equals(fieldName)) { + List daysOfMonth = reader.readArray(reader1 -> reader1.getInt()); + deserializedElasticSnapshotPolicyMonthlySchedule.daysOfMonth = daysOfMonth; + } else if ("hour".equals(fieldName)) { + deserializedElasticSnapshotPolicyMonthlySchedule.hour = reader.getNullable(JsonReader::getInt); + } else if ("minute".equals(fieldName)) { + deserializedElasticSnapshotPolicyMonthlySchedule.minute = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotPolicyMonthlySchedule; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyProperties.java new file mode 100644 index 000000000000..e606a93f9402 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyProperties.java @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Elastic Snapshot policy properties. + */ +@Fluent +public final class ElasticSnapshotPolicyProperties implements JsonSerializable { + /* + * Schedule for hourly snapshots + */ + private ElasticSnapshotPolicyHourlySchedule hourlySchedule; + + /* + * Schedule for daily snapshots + */ + private ElasticSnapshotPolicyDailySchedule dailySchedule; + + /* + * Schedule for weekly snapshots + */ + private ElasticSnapshotPolicyWeeklySchedule weeklySchedule; + + /* + * Schedule for monthly snapshots + */ + private ElasticSnapshotPolicyMonthlySchedule monthlySchedule; + + /* + * Configures if the snapshot policy is enabled on the volumes connected to the policy. + */ + private PolicyStatus policyStatus; + + /* + * Azure lifecycle management. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of ElasticSnapshotPolicyProperties class. + */ + public ElasticSnapshotPolicyProperties() { + } + + /** + * Get the hourlySchedule property: Schedule for hourly snapshots. + * + * @return the hourlySchedule value. + */ + public ElasticSnapshotPolicyHourlySchedule hourlySchedule() { + return this.hourlySchedule; + } + + /** + * Set the hourlySchedule property: Schedule for hourly snapshots. + * + * @param hourlySchedule the hourlySchedule value to set. + * @return the ElasticSnapshotPolicyProperties object itself. + */ + public ElasticSnapshotPolicyProperties withHourlySchedule(ElasticSnapshotPolicyHourlySchedule hourlySchedule) { + this.hourlySchedule = hourlySchedule; + return this; + } + + /** + * Get the dailySchedule property: Schedule for daily snapshots. + * + * @return the dailySchedule value. + */ + public ElasticSnapshotPolicyDailySchedule dailySchedule() { + return this.dailySchedule; + } + + /** + * Set the dailySchedule property: Schedule for daily snapshots. + * + * @param dailySchedule the dailySchedule value to set. + * @return the ElasticSnapshotPolicyProperties object itself. + */ + public ElasticSnapshotPolicyProperties withDailySchedule(ElasticSnapshotPolicyDailySchedule dailySchedule) { + this.dailySchedule = dailySchedule; + return this; + } + + /** + * Get the weeklySchedule property: Schedule for weekly snapshots. + * + * @return the weeklySchedule value. + */ + public ElasticSnapshotPolicyWeeklySchedule weeklySchedule() { + return this.weeklySchedule; + } + + /** + * Set the weeklySchedule property: Schedule for weekly snapshots. + * + * @param weeklySchedule the weeklySchedule value to set. + * @return the ElasticSnapshotPolicyProperties object itself. + */ + public ElasticSnapshotPolicyProperties withWeeklySchedule(ElasticSnapshotPolicyWeeklySchedule weeklySchedule) { + this.weeklySchedule = weeklySchedule; + return this; + } + + /** + * Get the monthlySchedule property: Schedule for monthly snapshots. + * + * @return the monthlySchedule value. + */ + public ElasticSnapshotPolicyMonthlySchedule monthlySchedule() { + return this.monthlySchedule; + } + + /** + * Set the monthlySchedule property: Schedule for monthly snapshots. + * + * @param monthlySchedule the monthlySchedule value to set. + * @return the ElasticSnapshotPolicyProperties object itself. + */ + public ElasticSnapshotPolicyProperties withMonthlySchedule(ElasticSnapshotPolicyMonthlySchedule monthlySchedule) { + this.monthlySchedule = monthlySchedule; + return this; + } + + /** + * Get the policyStatus property: Configures if the snapshot policy is enabled on the volumes connected to the + * policy. + * + * @return the policyStatus value. + */ + public PolicyStatus policyStatus() { + return this.policyStatus; + } + + /** + * Set the policyStatus property: Configures if the snapshot policy is enabled on the volumes connected to the + * policy. + * + * @param policyStatus the policyStatus value to set. + * @return the ElasticSnapshotPolicyProperties object itself. + */ + public ElasticSnapshotPolicyProperties withPolicyStatus(PolicyStatus policyStatus) { + this.policyStatus = policyStatus; + return this; + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (hourlySchedule() != null) { + hourlySchedule().validate(); + } + if (dailySchedule() != null) { + dailySchedule().validate(); + } + if (weeklySchedule() != null) { + weeklySchedule().validate(); + } + if (monthlySchedule() != null) { + monthlySchedule().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("hourlySchedule", this.hourlySchedule); + jsonWriter.writeJsonField("dailySchedule", this.dailySchedule); + jsonWriter.writeJsonField("weeklySchedule", this.weeklySchedule); + jsonWriter.writeJsonField("monthlySchedule", this.monthlySchedule); + jsonWriter.writeStringField("policyStatus", this.policyStatus == null ? null : this.policyStatus.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotPolicyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotPolicyProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticSnapshotPolicyProperties. + */ + public static ElasticSnapshotPolicyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotPolicyProperties deserializedElasticSnapshotPolicyProperties + = new ElasticSnapshotPolicyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("hourlySchedule".equals(fieldName)) { + deserializedElasticSnapshotPolicyProperties.hourlySchedule + = ElasticSnapshotPolicyHourlySchedule.fromJson(reader); + } else if ("dailySchedule".equals(fieldName)) { + deserializedElasticSnapshotPolicyProperties.dailySchedule + = ElasticSnapshotPolicyDailySchedule.fromJson(reader); + } else if ("weeklySchedule".equals(fieldName)) { + deserializedElasticSnapshotPolicyProperties.weeklySchedule + = ElasticSnapshotPolicyWeeklySchedule.fromJson(reader); + } else if ("monthlySchedule".equals(fieldName)) { + deserializedElasticSnapshotPolicyProperties.monthlySchedule + = ElasticSnapshotPolicyMonthlySchedule.fromJson(reader); + } else if ("policyStatus".equals(fieldName)) { + deserializedElasticSnapshotPolicyProperties.policyStatus + = PolicyStatus.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedElasticSnapshotPolicyProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotPolicyProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyWeeklySchedule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyWeeklySchedule.java new file mode 100644 index 000000000000..62a9b5ad9ac8 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotPolicyWeeklySchedule.java @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Weekly Schedule properties used to create NetApp snapshot policy. + */ +@Fluent +public final class ElasticSnapshotPolicyWeeklySchedule + implements JsonSerializable { + /* + * Weekly snapshot count to keep + */ + private Integer snapshotsToKeep; + + /* + * Indicates which weekday(s) snapshot(s) should be taken, accepts a list of week day names in english + */ + private List days; + + /* + * Indicates which hour in UTC timezone a snapshot should be taken + */ + private Integer hour; + + /* + * Indicates which minute snapshot should be taken + */ + private Integer minute; + + /** + * Creates an instance of ElasticSnapshotPolicyWeeklySchedule class. + */ + public ElasticSnapshotPolicyWeeklySchedule() { + } + + /** + * Get the snapshotsToKeep property: Weekly snapshot count to keep. + * + * @return the snapshotsToKeep value. + */ + public Integer snapshotsToKeep() { + return this.snapshotsToKeep; + } + + /** + * Set the snapshotsToKeep property: Weekly snapshot count to keep. + * + * @param snapshotsToKeep the snapshotsToKeep value to set. + * @return the ElasticSnapshotPolicyWeeklySchedule object itself. + */ + public ElasticSnapshotPolicyWeeklySchedule withSnapshotsToKeep(Integer snapshotsToKeep) { + this.snapshotsToKeep = snapshotsToKeep; + return this; + } + + /** + * Get the days property: Indicates which weekday(s) snapshot(s) should be taken, accepts a list of week day names + * in english. + * + * @return the days value. + */ + public List days() { + return this.days; + } + + /** + * Set the days property: Indicates which weekday(s) snapshot(s) should be taken, accepts a list of week day names + * in english. + * + * @param days the days value to set. + * @return the ElasticSnapshotPolicyWeeklySchedule object itself. + */ + public ElasticSnapshotPolicyWeeklySchedule withDays(List days) { + this.days = days; + return this; + } + + /** + * Get the hour property: Indicates which hour in UTC timezone a snapshot should be taken. + * + * @return the hour value. + */ + public Integer hour() { + return this.hour; + } + + /** + * Set the hour property: Indicates which hour in UTC timezone a snapshot should be taken. + * + * @param hour the hour value to set. + * @return the ElasticSnapshotPolicyWeeklySchedule object itself. + */ + public ElasticSnapshotPolicyWeeklySchedule withHour(Integer hour) { + this.hour = hour; + return this; + } + + /** + * Get the minute property: Indicates which minute snapshot should be taken. + * + * @return the minute value. + */ + public Integer minute() { + return this.minute; + } + + /** + * Set the minute property: Indicates which minute snapshot should be taken. + * + * @param minute the minute value to set. + * @return the ElasticSnapshotPolicyWeeklySchedule object itself. + */ + public ElasticSnapshotPolicyWeeklySchedule withMinute(Integer minute) { + this.minute = minute; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("snapshotsToKeep", this.snapshotsToKeep); + jsonWriter.writeArrayField("days", this.days, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeNumberField("hour", this.hour); + jsonWriter.writeNumberField("minute", this.minute); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotPolicyWeeklySchedule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotPolicyWeeklySchedule if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticSnapshotPolicyWeeklySchedule. + */ + public static ElasticSnapshotPolicyWeeklySchedule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotPolicyWeeklySchedule deserializedElasticSnapshotPolicyWeeklySchedule + = new ElasticSnapshotPolicyWeeklySchedule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshotsToKeep".equals(fieldName)) { + deserializedElasticSnapshotPolicyWeeklySchedule.snapshotsToKeep + = reader.getNullable(JsonReader::getInt); + } else if ("days".equals(fieldName)) { + List days = reader.readArray(reader1 -> DayOfWeek.fromString(reader1.getString())); + deserializedElasticSnapshotPolicyWeeklySchedule.days = days; + } else if ("hour".equals(fieldName)) { + deserializedElasticSnapshotPolicyWeeklySchedule.hour = reader.getNullable(JsonReader::getInt); + } else if ("minute".equals(fieldName)) { + deserializedElasticSnapshotPolicyWeeklySchedule.minute = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotPolicyWeeklySchedule; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotProperties.java new file mode 100644 index 000000000000..92a3c2587f96 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotProperties.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Elastic Snapshot properties. + */ +@Immutable +public final class ElasticSnapshotProperties implements JsonSerializable { + /* + * Azure lifecycle management. + */ + private ProvisioningState provisioningState; + + /** + * Creates an instance of ElasticSnapshotProperties class. + */ + public ElasticSnapshotProperties() { + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticSnapshotProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticSnapshotProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticSnapshotProperties. + */ + public static ElasticSnapshotProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticSnapshotProperties deserializedElasticSnapshotProperties = new ElasticSnapshotProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedElasticSnapshotProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticSnapshotProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshots.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshots.java new file mode 100644 index 000000000000..aa698ce37da1 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshots.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ElasticSnapshots. + */ +public interface ElasticSnapshots { + /** + * Get a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshot along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String snapshotName, Context context); + + /** + * Get a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshot. + */ + ElasticSnapshot get(String resourceGroupName, String accountName, String poolName, String volumeName, + String snapshotName); + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName); + + /** + * Delete a ElasticSnapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param snapshotName The name of the ElasticSnapshot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName, + Context context); + + /** + * List ElasticSnapshot resources by ElasticVolume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByElasticVolume(String resourceGroupName, String accountName, String poolName, + String volumeName); + + /** + * List ElasticSnapshot resources by ElasticVolume. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the ElasticAccount. + * @param poolName The name of the ElasticCapacityPool. + * @param volumeName The name of the ElasticVolume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ElasticSnapshot list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByElasticVolume(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context); + + /** + * Get a ElasticSnapshot. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshot along with {@link Response}. + */ + ElasticSnapshot getById(String id); + + /** + * Get a ElasticSnapshot. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ElasticSnapshot along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a ElasticSnapshot. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a ElasticSnapshot. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ElasticSnapshot resource. + * + * @param name resource name. + * @return the first stage of the new ElasticSnapshot definition. + */ + ElasticSnapshot.DefinitionStages.Blank define(String name); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticUnixAccessRule.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticUnixAccessRule.java new file mode 100644 index 000000000000..659566146864 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticUnixAccessRule.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Unix access rule. + */ +public final class ElasticUnixAccessRule extends ExpandableStringEnum { + /** + * Clients connecting with this rule will only have read access to the volume. + */ + public static final ElasticUnixAccessRule READ_ONLY = fromString("ReadOnly"); + + /** + * Clients connecting with this rule will have full read and write access to the volume. + */ + public static final ElasticUnixAccessRule READ_WRITE = fromString("ReadWrite"); + + /** + * Clients connecting with this rule will have no access to the volume. + */ + public static final ElasticUnixAccessRule NO_ACCESS = fromString("NoAccess"); + + /** + * Creates a new instance of ElasticUnixAccessRule value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticUnixAccessRule() { + } + + /** + * Creates or finds a ElasticUnixAccessRule from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticUnixAccessRule. + */ + public static ElasticUnixAccessRule fromString(String name) { + return fromString(name, ElasticUnixAccessRule.class); + } + + /** + * Gets known ElasticUnixAccessRule values. + * + * @return known ElasticUnixAccessRule values. + */ + public static Collection values() { + return values(ElasticUnixAccessRule.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolume.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolume.java new file mode 100644 index 000000000000..356a025e8029 --- /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 the response. + */ + 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 the response. + */ + ElasticVolume revert(ElasticVolumeRevert body, Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeBackupProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeBackupProperties.java new file mode 100644 index 000000000000..0ad6d3a993de --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeBackupProperties.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Elastic Volume Backup Properties. + */ +@Fluent +public final class ElasticVolumeBackupProperties implements JsonSerializable { + /* + * ResourceId used to identify Elastic Backup Policy + */ + private String elasticBackupPolicyResourceId; + + /* + * The property to decide policy is enforced or not on the volume + */ + private ElasticVolumePolicyEnforcement policyEnforcement; + + /* + * ResourceId used to identify Elastic Backup Vault + */ + private String elasticBackupVaultResourceId; + + /** + * Creates an instance of ElasticVolumeBackupProperties class. + */ + public ElasticVolumeBackupProperties() { + } + + /** + * Get the elasticBackupPolicyResourceId property: ResourceId used to identify Elastic Backup Policy. + * + * @return the elasticBackupPolicyResourceId value. + */ + public String elasticBackupPolicyResourceId() { + return this.elasticBackupPolicyResourceId; + } + + /** + * Set the elasticBackupPolicyResourceId property: ResourceId used to identify Elastic Backup Policy. + * + * @param elasticBackupPolicyResourceId the elasticBackupPolicyResourceId value to set. + * @return the ElasticVolumeBackupProperties object itself. + */ + public ElasticVolumeBackupProperties withElasticBackupPolicyResourceId(String elasticBackupPolicyResourceId) { + this.elasticBackupPolicyResourceId = elasticBackupPolicyResourceId; + return this; + } + + /** + * Get the policyEnforcement property: The property to decide policy is enforced or not on the volume. + * + * @return the policyEnforcement value. + */ + public ElasticVolumePolicyEnforcement policyEnforcement() { + return this.policyEnforcement; + } + + /** + * Set the policyEnforcement property: The property to decide policy is enforced or not on the volume. + * + * @param policyEnforcement the policyEnforcement value to set. + * @return the ElasticVolumeBackupProperties object itself. + */ + public ElasticVolumeBackupProperties withPolicyEnforcement(ElasticVolumePolicyEnforcement policyEnforcement) { + this.policyEnforcement = policyEnforcement; + return this; + } + + /** + * Get the elasticBackupVaultResourceId property: ResourceId used to identify Elastic Backup Vault. + * + * @return the elasticBackupVaultResourceId value. + */ + public String elasticBackupVaultResourceId() { + return this.elasticBackupVaultResourceId; + } + + /** + * Set the elasticBackupVaultResourceId property: ResourceId used to identify Elastic Backup Vault. + * + * @param elasticBackupVaultResourceId the elasticBackupVaultResourceId value to set. + * @return the ElasticVolumeBackupProperties object itself. + */ + public ElasticVolumeBackupProperties withElasticBackupVaultResourceId(String elasticBackupVaultResourceId) { + this.elasticBackupVaultResourceId = elasticBackupVaultResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("elasticBackupPolicyResourceId", this.elasticBackupPolicyResourceId); + jsonWriter.writeStringField("policyEnforcement", + this.policyEnforcement == null ? null : this.policyEnforcement.toString()); + jsonWriter.writeStringField("elasticBackupVaultResourceId", this.elasticBackupVaultResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticVolumeBackupProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticVolumeBackupProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticVolumeBackupProperties. + */ + public static ElasticVolumeBackupProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticVolumeBackupProperties deserializedElasticVolumeBackupProperties + = new ElasticVolumeBackupProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("elasticBackupPolicyResourceId".equals(fieldName)) { + deserializedElasticVolumeBackupProperties.elasticBackupPolicyResourceId = reader.getString(); + } else if ("policyEnforcement".equals(fieldName)) { + deserializedElasticVolumeBackupProperties.policyEnforcement + = ElasticVolumePolicyEnforcement.fromString(reader.getString()); + } else if ("elasticBackupVaultResourceId".equals(fieldName)) { + deserializedElasticVolumeBackupProperties.elasticBackupVaultResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticVolumeBackupProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeDataProtectionPatchProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeDataProtectionPatchProperties.java new file mode 100644 index 000000000000..5bef7dd86892 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeDataProtectionPatchProperties.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Data protection configuration option for updating the volume, including snapshot policies and backup. + */ +@Fluent +public final class ElasticVolumeDataProtectionPatchProperties + implements JsonSerializable { + /* + * Used to apply a snapshot policy to a volume. + */ + private ElasticVolumeSnapshotProperties snapshot; + + /* + * Used to configure backups on an elastic volume. + */ + private ElasticVolumeBackupProperties backup; + + /** + * Creates an instance of ElasticVolumeDataProtectionPatchProperties class. + */ + public ElasticVolumeDataProtectionPatchProperties() { + } + + /** + * Get the snapshot property: Used to apply a snapshot policy to a volume. + * + * @return the snapshot value. + */ + public ElasticVolumeSnapshotProperties snapshot() { + return this.snapshot; + } + + /** + * Set the snapshot property: Used to apply a snapshot policy to a volume. + * + * @param snapshot the snapshot value to set. + * @return the ElasticVolumeDataProtectionPatchProperties object itself. + */ + public ElasticVolumeDataProtectionPatchProperties withSnapshot(ElasticVolumeSnapshotProperties snapshot) { + this.snapshot = snapshot; + return this; + } + + /** + * Get the backup property: Used to configure backups on an elastic volume. + * + * @return the backup value. + */ + public ElasticVolumeBackupProperties backup() { + return this.backup; + } + + /** + * Set the backup property: Used to configure backups on an elastic volume. + * + * @param backup the backup value to set. + * @return the ElasticVolumeDataProtectionPatchProperties object itself. + */ + public ElasticVolumeDataProtectionPatchProperties withBackup(ElasticVolumeBackupProperties backup) { + this.backup = backup; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (snapshot() != null) { + snapshot().validate(); + } + if (backup() != null) { + backup().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("snapshot", this.snapshot); + jsonWriter.writeJsonField("backup", this.backup); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticVolumeDataProtectionPatchProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticVolumeDataProtectionPatchProperties if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticVolumeDataProtectionPatchProperties. + */ + public static ElasticVolumeDataProtectionPatchProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticVolumeDataProtectionPatchProperties deserializedElasticVolumeDataProtectionPatchProperties + = new ElasticVolumeDataProtectionPatchProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshot".equals(fieldName)) { + deserializedElasticVolumeDataProtectionPatchProperties.snapshot + = ElasticVolumeSnapshotProperties.fromJson(reader); + } else if ("backup".equals(fieldName)) { + deserializedElasticVolumeDataProtectionPatchProperties.backup + = ElasticVolumeBackupProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticVolumeDataProtectionPatchProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeDataProtectionProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeDataProtectionProperties.java new file mode 100644 index 000000000000..1275a92577bc --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeDataProtectionProperties.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Data protection configuration option for the volume, including snapshot policies and backup. + */ +@Fluent +public final class ElasticVolumeDataProtectionProperties + implements JsonSerializable { + /* + * Used to apply a snapshot policy to a volume. + */ + private ElasticVolumeSnapshotProperties snapshot; + + /* + * Used to configure backups on an elastic volume. + */ + private ElasticVolumeBackupProperties backup; + + /** + * Creates an instance of ElasticVolumeDataProtectionProperties class. + */ + public ElasticVolumeDataProtectionProperties() { + } + + /** + * Get the snapshot property: Used to apply a snapshot policy to a volume. + * + * @return the snapshot value. + */ + public ElasticVolumeSnapshotProperties snapshot() { + return this.snapshot; + } + + /** + * Set the snapshot property: Used to apply a snapshot policy to a volume. + * + * @param snapshot the snapshot value to set. + * @return the ElasticVolumeDataProtectionProperties object itself. + */ + public ElasticVolumeDataProtectionProperties withSnapshot(ElasticVolumeSnapshotProperties snapshot) { + this.snapshot = snapshot; + return this; + } + + /** + * Get the backup property: Used to configure backups on an elastic volume. + * + * @return the backup value. + */ + public ElasticVolumeBackupProperties backup() { + return this.backup; + } + + /** + * Set the backup property: Used to configure backups on an elastic volume. + * + * @param backup the backup value to set. + * @return the ElasticVolumeDataProtectionProperties object itself. + */ + public ElasticVolumeDataProtectionProperties withBackup(ElasticVolumeBackupProperties backup) { + this.backup = backup; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (snapshot() != null) { + snapshot().validate(); + } + if (backup() != null) { + backup().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("snapshot", this.snapshot); + jsonWriter.writeJsonField("backup", this.backup); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticVolumeDataProtectionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticVolumeDataProtectionProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticVolumeDataProtectionProperties. + */ + public static ElasticVolumeDataProtectionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticVolumeDataProtectionProperties deserializedElasticVolumeDataProtectionProperties + = new ElasticVolumeDataProtectionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshot".equals(fieldName)) { + deserializedElasticVolumeDataProtectionProperties.snapshot + = ElasticVolumeSnapshotProperties.fromJson(reader); + } else if ("backup".equals(fieldName)) { + deserializedElasticVolumeDataProtectionProperties.backup + = ElasticVolumeBackupProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticVolumeDataProtectionProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumePolicyEnforcement.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumePolicyEnforcement.java new file mode 100644 index 000000000000..6a1bb984ee91 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumePolicyEnforcement.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Policy enforcement. + */ +public final class ElasticVolumePolicyEnforcement extends ExpandableStringEnum { + /** + * Value indicating the policy is enforced on the volume. + */ + public static final ElasticVolumePolicyEnforcement ENFORCED = fromString("Enforced"); + + /** + * Value indicating the policy is not enforced on the volume. + */ + public static final ElasticVolumePolicyEnforcement NOT_ENFORCED = fromString("NotEnforced"); + + /** + * Creates a new instance of ElasticVolumePolicyEnforcement value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticVolumePolicyEnforcement() { + } + + /** + * Creates or finds a ElasticVolumePolicyEnforcement from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticVolumePolicyEnforcement. + */ + public static ElasticVolumePolicyEnforcement fromString(String name) { + return fromString(name, ElasticVolumePolicyEnforcement.class); + } + + /** + * Gets known ElasticVolumePolicyEnforcement values. + * + * @return known ElasticVolumePolicyEnforcement values. + */ + public static Collection values() { + return values(ElasticVolumePolicyEnforcement.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeProperties.java new file mode 100644 index 000000000000..d4c03bb13886 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeProperties.java @@ -0,0 +1,431 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Elastic Volume properties. + */ +@Fluent +public final class ElasticVolumeProperties implements JsonSerializable { + /* + * A unique file path for the volume. Used when creating mount targets. This needs to be unique within the elastic + * capacity pool. + */ + private String filePath; + + /* + * Maximum size allowed for a volume in bytes. Valid values are in the range 1GiB to 16TiB. Values expressed in + * bytes as multiples of 1 GiB. + */ + private long size; + + /* + * Set of export policy rules + */ + private ElasticExportPolicy exportPolicy; + + /* + * Set of support protocol types for the elastic volume + */ + private List protocolTypes; + + /* + * Azure lifecycle management. + */ + private ProvisioningState provisioningState; + + /* + * Current availability status of the resource. + */ + private ElasticResourceAvailabilityStatus availabilityStatus; + + /* + * Resource identifier used to identify the Elastic Snapshot. + */ + private String snapshotResourceId; + + /* + * List of mount targets that can be used to mount this volume + */ + private List mountTargets; + + /* + * Data protection configuration option for the volume, including snapshot policies and backup. + */ + private ElasticVolumeDataProtectionProperties dataProtection; + + /* + * Controls the visibility of the volume's read-only snapshot directory, which provides access to each of the + * volume's snapshots. + */ + private SnapshotDirectoryVisibility snapshotDirectoryVisibility; + + /* + * SMB Properties + */ + private ElasticSmbProperties smbProperties; + + /* + * Resource identifier used to identify the Elastic Backup. + */ + private String backupResourceId; + + /* + * The current state of the restoration process. + */ + private ElasticVolumeRestorationState restorationState; + + /** + * Creates an instance of ElasticVolumeProperties class. + */ + public ElasticVolumeProperties() { + } + + /** + * Get the filePath property: A unique file path for the volume. Used when creating mount targets. This needs to be + * unique within the elastic capacity pool. + * + * @return the filePath value. + */ + public String filePath() { + return this.filePath; + } + + /** + * Set the filePath property: A unique file path for the volume. Used when creating mount targets. This needs to be + * unique within the elastic capacity pool. + * + * @param filePath the filePath value to set. + * @return the ElasticVolumeProperties object itself. + */ + public ElasticVolumeProperties withFilePath(String filePath) { + this.filePath = filePath; + return this; + } + + /** + * Get the size property: Maximum size allowed for a volume in bytes. Valid values are in the range 1GiB to 16TiB. + * Values expressed in bytes as multiples of 1 GiB. + * + * @return the size value. + */ + public long size() { + return this.size; + } + + /** + * Set the size property: Maximum size allowed for a volume in bytes. Valid values are in the range 1GiB to 16TiB. + * Values expressed in bytes as multiples of 1 GiB. + * + * @param size the size value to set. + * @return the ElasticVolumeProperties object itself. + */ + public ElasticVolumeProperties withSize(long size) { + this.size = size; + return this; + } + + /** + * Get the exportPolicy property: Set of export policy rules. + * + * @return the exportPolicy value. + */ + public ElasticExportPolicy exportPolicy() { + return this.exportPolicy; + } + + /** + * Set the exportPolicy property: Set of export policy rules. + * + * @param exportPolicy the exportPolicy value to set. + * @return the ElasticVolumeProperties object itself. + */ + public ElasticVolumeProperties withExportPolicy(ElasticExportPolicy exportPolicy) { + this.exportPolicy = exportPolicy; + return this; + } + + /** + * Get the protocolTypes property: Set of support protocol types for the elastic volume. + * + * @return the protocolTypes value. + */ + public List protocolTypes() { + return this.protocolTypes; + } + + /** + * Set the protocolTypes property: Set of support protocol types for the elastic volume. + * + * @param protocolTypes the protocolTypes value to set. + * @return the ElasticVolumeProperties object itself. + */ + public ElasticVolumeProperties withProtocolTypes(List protocolTypes) { + this.protocolTypes = protocolTypes; + return this; + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the availabilityStatus property: Current availability status of the resource. + * + * @return the availabilityStatus value. + */ + public ElasticResourceAvailabilityStatus availabilityStatus() { + return this.availabilityStatus; + } + + /** + * Get the snapshotResourceId property: Resource identifier used to identify the Elastic Snapshot. + * + * @return the snapshotResourceId value. + */ + public String snapshotResourceId() { + return this.snapshotResourceId; + } + + /** + * Set the snapshotResourceId property: Resource identifier used to identify the Elastic Snapshot. + * + * @param snapshotResourceId the snapshotResourceId value to set. + * @return the ElasticVolumeProperties object itself. + */ + public ElasticVolumeProperties withSnapshotResourceId(String snapshotResourceId) { + this.snapshotResourceId = snapshotResourceId; + return this; + } + + /** + * Get the mountTargets property: List of mount targets that can be used to mount this volume. + * + * @return the mountTargets value. + */ + public List mountTargets() { + return this.mountTargets; + } + + /** + * Get the dataProtection property: Data protection configuration option for the volume, including snapshot policies + * and backup. + * + * @return the dataProtection value. + */ + public ElasticVolumeDataProtectionProperties dataProtection() { + return this.dataProtection; + } + + /** + * Set the dataProtection property: Data protection configuration option for the volume, including snapshot policies + * and backup. + * + * @param dataProtection the dataProtection value to set. + * @return the ElasticVolumeProperties object itself. + */ + public ElasticVolumeProperties withDataProtection(ElasticVolumeDataProtectionProperties dataProtection) { + this.dataProtection = dataProtection; + return this; + } + + /** + * Get the snapshotDirectoryVisibility property: Controls the visibility of the volume's read-only snapshot + * directory, which provides access to each of the volume's snapshots. + * + * @return the snapshotDirectoryVisibility value. + */ + public SnapshotDirectoryVisibility snapshotDirectoryVisibility() { + return this.snapshotDirectoryVisibility; + } + + /** + * Set the snapshotDirectoryVisibility property: Controls the visibility of the volume's read-only snapshot + * directory, which provides access to each of the volume's snapshots. + * + * @param snapshotDirectoryVisibility the snapshotDirectoryVisibility value to set. + * @return the ElasticVolumeProperties object itself. + */ + public ElasticVolumeProperties + withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility snapshotDirectoryVisibility) { + this.snapshotDirectoryVisibility = snapshotDirectoryVisibility; + return this; + } + + /** + * Get the smbProperties property: SMB Properties. + * + * @return the smbProperties value. + */ + public ElasticSmbProperties smbProperties() { + return this.smbProperties; + } + + /** + * Set the smbProperties property: SMB Properties. + * + * @param smbProperties the smbProperties value to set. + * @return the ElasticVolumeProperties object itself. + */ + public ElasticVolumeProperties withSmbProperties(ElasticSmbProperties smbProperties) { + this.smbProperties = smbProperties; + return this; + } + + /** + * Get the backupResourceId property: Resource identifier used to identify the Elastic Backup. + * + * @return the backupResourceId value. + */ + public String backupResourceId() { + return this.backupResourceId; + } + + /** + * Set the backupResourceId property: Resource identifier used to identify the Elastic Backup. + * + * @param backupResourceId the backupResourceId value to set. + * @return the ElasticVolumeProperties object itself. + */ + public ElasticVolumeProperties withBackupResourceId(String backupResourceId) { + this.backupResourceId = backupResourceId; + return this; + } + + /** + * Get the restorationState property: The current state of the restoration process. + * + * @return the restorationState value. + */ + public ElasticVolumeRestorationState restorationState() { + return this.restorationState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (filePath() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property filePath in model ElasticVolumeProperties")); + } + if (exportPolicy() != null) { + exportPolicy().validate(); + } + if (protocolTypes() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property protocolTypes in model ElasticVolumeProperties")); + } + if (mountTargets() != null) { + mountTargets().forEach(e -> e.validate()); + } + if (dataProtection() != null) { + dataProtection().validate(); + } + if (smbProperties() != null) { + smbProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticVolumeProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("filePath", this.filePath); + jsonWriter.writeLongField("size", this.size); + jsonWriter.writeArrayField("protocolTypes", this.protocolTypes, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeJsonField("exportPolicy", this.exportPolicy); + jsonWriter.writeStringField("snapshotResourceId", this.snapshotResourceId); + jsonWriter.writeJsonField("dataProtection", this.dataProtection); + jsonWriter.writeStringField("snapshotDirectoryVisibility", + this.snapshotDirectoryVisibility == null ? null : this.snapshotDirectoryVisibility.toString()); + jsonWriter.writeJsonField("smbProperties", this.smbProperties); + jsonWriter.writeStringField("backupResourceId", this.backupResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticVolumeProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticVolumeProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ElasticVolumeProperties. + */ + public static ElasticVolumeProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticVolumeProperties deserializedElasticVolumeProperties = new ElasticVolumeProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("filePath".equals(fieldName)) { + deserializedElasticVolumeProperties.filePath = reader.getString(); + } else if ("size".equals(fieldName)) { + deserializedElasticVolumeProperties.size = reader.getLong(); + } else if ("protocolTypes".equals(fieldName)) { + List protocolTypes + = reader.readArray(reader1 -> ElasticProtocolType.fromString(reader1.getString())); + deserializedElasticVolumeProperties.protocolTypes = protocolTypes; + } else if ("exportPolicy".equals(fieldName)) { + deserializedElasticVolumeProperties.exportPolicy = ElasticExportPolicy.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedElasticVolumeProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("availabilityStatus".equals(fieldName)) { + deserializedElasticVolumeProperties.availabilityStatus + = ElasticResourceAvailabilityStatus.fromString(reader.getString()); + } else if ("snapshotResourceId".equals(fieldName)) { + deserializedElasticVolumeProperties.snapshotResourceId = reader.getString(); + } else if ("mountTargets".equals(fieldName)) { + List mountTargets + = reader.readArray(reader1 -> ElasticMountTargetProperties.fromJson(reader1)); + deserializedElasticVolumeProperties.mountTargets = mountTargets; + } else if ("dataProtection".equals(fieldName)) { + deserializedElasticVolumeProperties.dataProtection + = ElasticVolumeDataProtectionProperties.fromJson(reader); + } else if ("snapshotDirectoryVisibility".equals(fieldName)) { + deserializedElasticVolumeProperties.snapshotDirectoryVisibility + = SnapshotDirectoryVisibility.fromString(reader.getString()); + } else if ("smbProperties".equals(fieldName)) { + deserializedElasticVolumeProperties.smbProperties = ElasticSmbProperties.fromJson(reader); + } else if ("backupResourceId".equals(fieldName)) { + deserializedElasticVolumeProperties.backupResourceId = reader.getString(); + } else if ("restorationState".equals(fieldName)) { + deserializedElasticVolumeProperties.restorationState + = ElasticVolumeRestorationState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticVolumeProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeRestorationState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeRestorationState.java new file mode 100644 index 000000000000..b6ff08208f5c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeRestorationState.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The current state of the restoration process. + */ +public final class ElasticVolumeRestorationState extends ExpandableStringEnum { + /** + * Value indicating that the volume is currently restoring. + */ + public static final ElasticVolumeRestorationState RESTORING = fromString("Restoring"); + + /** + * Value indicating that the volume is restored. + */ + public static final ElasticVolumeRestorationState RESTORED = fromString("Restored"); + + /** + * Value indicating that the volume restore has failed. + */ + public static final ElasticVolumeRestorationState FAILED = fromString("Failed"); + + /** + * Creates a new instance of ElasticVolumeRestorationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ElasticVolumeRestorationState() { + } + + /** + * Creates or finds a ElasticVolumeRestorationState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ElasticVolumeRestorationState. + */ + public static ElasticVolumeRestorationState fromString(String name) { + return fromString(name, ElasticVolumeRestorationState.class); + } + + /** + * Gets known ElasticVolumeRestorationState values. + * + * @return known ElasticVolumeRestorationState values. + */ + public static Collection values() { + return values(ElasticVolumeRestorationState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeRevert.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeRevert.java new file mode 100644 index 000000000000..1f1ec4a9d78e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeRevert.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Reverts the elastic volume to the specified snapshot. + */ +@Fluent +public final class ElasticVolumeRevert implements JsonSerializable { + /* + * Resource identifier used to identify the Elastic Snapshot. + */ + private String snapshotResourceId; + + /** + * Creates an instance of ElasticVolumeRevert class. + */ + public ElasticVolumeRevert() { + } + + /** + * Get the snapshotResourceId property: Resource identifier used to identify the Elastic Snapshot. + * + * @return the snapshotResourceId value. + */ + public String snapshotResourceId() { + return this.snapshotResourceId; + } + + /** + * Set the snapshotResourceId property: Resource identifier used to identify the Elastic Snapshot. + * + * @param snapshotResourceId the snapshotResourceId value to set. + * @return the ElasticVolumeRevert object itself. + */ + public ElasticVolumeRevert withSnapshotResourceId(String snapshotResourceId) { + this.snapshotResourceId = snapshotResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("snapshotResourceId", this.snapshotResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticVolumeRevert from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticVolumeRevert if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticVolumeRevert. + */ + public static ElasticVolumeRevert fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticVolumeRevert deserializedElasticVolumeRevert = new ElasticVolumeRevert(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshotResourceId".equals(fieldName)) { + deserializedElasticVolumeRevert.snapshotResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticVolumeRevert; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeSnapshotProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeSnapshotProperties.java new file mode 100644 index 000000000000..204f7885a30c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeSnapshotProperties.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Elastic Volume Snapshot Properties. + */ +@Fluent +public final class ElasticVolumeSnapshotProperties implements JsonSerializable { + /* + * Snapshot Policy ResourceId + */ + private String snapshotPolicyResourceId; + + /** + * Creates an instance of ElasticVolumeSnapshotProperties class. + */ + public ElasticVolumeSnapshotProperties() { + } + + /** + * Get the snapshotPolicyResourceId property: Snapshot Policy ResourceId. + * + * @return the snapshotPolicyResourceId value. + */ + public String snapshotPolicyResourceId() { + return this.snapshotPolicyResourceId; + } + + /** + * Set the snapshotPolicyResourceId property: Snapshot Policy ResourceId. + * + * @param snapshotPolicyResourceId the snapshotPolicyResourceId value to set. + * @return the ElasticVolumeSnapshotProperties object itself. + */ + public ElasticVolumeSnapshotProperties withSnapshotPolicyResourceId(String snapshotPolicyResourceId) { + this.snapshotPolicyResourceId = snapshotPolicyResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("snapshotPolicyResourceId", this.snapshotPolicyResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticVolumeSnapshotProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticVolumeSnapshotProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticVolumeSnapshotProperties. + */ + public static ElasticVolumeSnapshotProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticVolumeSnapshotProperties deserializedElasticVolumeSnapshotProperties + = new ElasticVolumeSnapshotProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("snapshotPolicyResourceId".equals(fieldName)) { + deserializedElasticVolumeSnapshotProperties.snapshotPolicyResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticVolumeSnapshotProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeUpdate.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeUpdate.java new file mode 100644 index 000000000000..047910d44201 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeUpdate.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The type used for update operations of the ElasticVolume. + */ +@Fluent +public final class ElasticVolumeUpdate implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + + /* + * The resource-specific properties for this resource. + */ + private ElasticVolumeUpdateProperties properties; + + /** + * Creates an instance of ElasticVolumeUpdate class. + */ + public ElasticVolumeUpdate() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the ElasticVolumeUpdate object itself. + */ + public ElasticVolumeUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ElasticVolumeUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ElasticVolumeUpdate object itself. + */ + public ElasticVolumeUpdate withProperties(ElasticVolumeUpdateProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticVolumeUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticVolumeUpdate if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticVolumeUpdate. + */ + public static ElasticVolumeUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticVolumeUpdate deserializedElasticVolumeUpdate = new ElasticVolumeUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedElasticVolumeUpdate.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedElasticVolumeUpdate.properties = ElasticVolumeUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticVolumeUpdate; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeUpdateProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeUpdateProperties.java new file mode 100644 index 000000000000..49adf76f4df0 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeUpdateProperties.java @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The updatable properties of the ElasticVolume. + */ +@Fluent +public final class ElasticVolumeUpdateProperties implements JsonSerializable { + /* + * Maximum size allowed for a volume in bytes. Valid values are in the range 1GiB to 16TiB. Values expressed in + * bytes as multiples of 1 GiB. + */ + private Long size; + + /* + * Set of export policy rules + */ + private ElasticExportPolicy exportPolicy; + + /* + * Data protection configuration option for the volume, including snapshot policies and backup. + */ + private ElasticVolumeDataProtectionPatchProperties dataProtection; + + /* + * Controls the visibility of the volume's read-only snapshot directory, which provides access to each of the + * volume's snapshots. + */ + private SnapshotDirectoryVisibility snapshotDirectoryVisibility; + + /* + * SMB Properties + */ + private ElasticSmbPatchProperties smbProperties; + + /** + * Creates an instance of ElasticVolumeUpdateProperties class. + */ + public ElasticVolumeUpdateProperties() { + } + + /** + * Get the size property: Maximum size allowed for a volume in bytes. Valid values are in the range 1GiB to 16TiB. + * Values expressed in bytes as multiples of 1 GiB. + * + * @return the size value. + */ + public Long size() { + return this.size; + } + + /** + * Set the size property: Maximum size allowed for a volume in bytes. Valid values are in the range 1GiB to 16TiB. + * Values expressed in bytes as multiples of 1 GiB. + * + * @param size the size value to set. + * @return the ElasticVolumeUpdateProperties object itself. + */ + public ElasticVolumeUpdateProperties withSize(Long size) { + this.size = size; + return this; + } + + /** + * Get the exportPolicy property: Set of export policy rules. + * + * @return the exportPolicy value. + */ + public ElasticExportPolicy exportPolicy() { + return this.exportPolicy; + } + + /** + * Set the exportPolicy property: Set of export policy rules. + * + * @param exportPolicy the exportPolicy value to set. + * @return the ElasticVolumeUpdateProperties object itself. + */ + public ElasticVolumeUpdateProperties withExportPolicy(ElasticExportPolicy exportPolicy) { + this.exportPolicy = exportPolicy; + return this; + } + + /** + * Get the dataProtection property: Data protection configuration option for the volume, including snapshot policies + * and backup. + * + * @return the dataProtection value. + */ + public ElasticVolumeDataProtectionPatchProperties dataProtection() { + return this.dataProtection; + } + + /** + * Set the dataProtection property: Data protection configuration option for the volume, including snapshot policies + * and backup. + * + * @param dataProtection the dataProtection value to set. + * @return the ElasticVolumeUpdateProperties object itself. + */ + public ElasticVolumeUpdateProperties withDataProtection(ElasticVolumeDataProtectionPatchProperties dataProtection) { + this.dataProtection = dataProtection; + return this; + } + + /** + * Get the snapshotDirectoryVisibility property: Controls the visibility of the volume's read-only snapshot + * directory, which provides access to each of the volume's snapshots. + * + * @return the snapshotDirectoryVisibility value. + */ + public SnapshotDirectoryVisibility snapshotDirectoryVisibility() { + return this.snapshotDirectoryVisibility; + } + + /** + * Set the snapshotDirectoryVisibility property: Controls the visibility of the volume's read-only snapshot + * directory, which provides access to each of the volume's snapshots. + * + * @param snapshotDirectoryVisibility the snapshotDirectoryVisibility value to set. + * @return the ElasticVolumeUpdateProperties object itself. + */ + public ElasticVolumeUpdateProperties + withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility snapshotDirectoryVisibility) { + this.snapshotDirectoryVisibility = snapshotDirectoryVisibility; + return this; + } + + /** + * Get the smbProperties property: SMB Properties. + * + * @return the smbProperties value. + */ + public ElasticSmbPatchProperties smbProperties() { + return this.smbProperties; + } + + /** + * Set the smbProperties property: SMB Properties. + * + * @param smbProperties the smbProperties value to set. + * @return the ElasticVolumeUpdateProperties object itself. + */ + public ElasticVolumeUpdateProperties withSmbProperties(ElasticSmbPatchProperties smbProperties) { + this.smbProperties = smbProperties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (exportPolicy() != null) { + exportPolicy().validate(); + } + if (dataProtection() != null) { + dataProtection().validate(); + } + if (smbProperties() != null) { + smbProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("size", this.size); + jsonWriter.writeJsonField("exportPolicy", this.exportPolicy); + jsonWriter.writeJsonField("dataProtection", this.dataProtection); + jsonWriter.writeStringField("snapshotDirectoryVisibility", + this.snapshotDirectoryVisibility == null ? null : this.snapshotDirectoryVisibility.toString()); + jsonWriter.writeJsonField("smbProperties", this.smbProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ElasticVolumeUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ElasticVolumeUpdateProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ElasticVolumeUpdateProperties. + */ + public static ElasticVolumeUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ElasticVolumeUpdateProperties deserializedElasticVolumeUpdateProperties + = new ElasticVolumeUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("size".equals(fieldName)) { + deserializedElasticVolumeUpdateProperties.size = reader.getNullable(JsonReader::getLong); + } else if ("exportPolicy".equals(fieldName)) { + deserializedElasticVolumeUpdateProperties.exportPolicy = ElasticExportPolicy.fromJson(reader); + } else if ("dataProtection".equals(fieldName)) { + deserializedElasticVolumeUpdateProperties.dataProtection + = ElasticVolumeDataProtectionPatchProperties.fromJson(reader); + } else if ("snapshotDirectoryVisibility".equals(fieldName)) { + deserializedElasticVolumeUpdateProperties.snapshotDirectoryVisibility + = SnapshotDirectoryVisibility.fromString(reader.getString()); + } else if ("smbProperties".equals(fieldName)) { + deserializedElasticVolumeUpdateProperties.smbProperties + = ElasticSmbPatchProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedElasticVolumeUpdateProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumes.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumes.java new file mode 100644 index 000000000000..73ee0d0607a5 --- /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 the response. + */ + 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 the response. + */ + 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/EnableWriteBackState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EnableWriteBackState.java new file mode 100644 index 000000000000..76f971251a36 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EnableWriteBackState.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; + +/** + * Flag indicating whether writeback is enabled for the cache. + */ +public final class EnableWriteBackState extends ExpandableStringEnum { + /** + * Writeback cache is disabled. + */ + public static final EnableWriteBackState DISABLED = fromString("Disabled"); + + /** + * Writeback cache is enabled. + */ + public static final EnableWriteBackState ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of EnableWriteBackState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EnableWriteBackState() { + } + + /** + * Creates or finds a EnableWriteBackState from its string representation. + * + * @param name a name to look for. + * @return the corresponding EnableWriteBackState. + */ + public static EnableWriteBackState fromString(String name) { + return fromString(name, EnableWriteBackState.class); + } + + /** + * Gets known EnableWriteBackState values. + * + * @return known EnableWriteBackState values. + */ + public static Collection values() { + return values(EnableWriteBackState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionState.java new file mode 100644 index 000000000000..340a5d57aa5b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/EncryptionState.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; + +/** + * Specifies if the cache is encryption or not. + */ +public final class EncryptionState extends ExpandableStringEnum { + /** + * Encryption is disabled. + */ + public static final EncryptionState DISABLED = fromString("Disabled"); + + /** + * Encryption is enabled. + */ + public static final EncryptionState ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of EncryptionState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EncryptionState() { + } + + /** + * Creates or finds a EncryptionState from its string representation. + * + * @param name a name to look for. + * @return the corresponding EncryptionState. + */ + public static EncryptionState fromString(String name) { + return fromString(name, EncryptionState.class); + } + + /** + * Gets known EncryptionState values. + * + * @return known EncryptionState values. + */ + public static Collection values() { + return values(EncryptionState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalReplicationSetupStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalReplicationSetupStatus.java new file mode 100644 index 000000000000..29ef8b9ca3b9 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ExternalReplicationSetupStatus.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Property that only applies to external replications. Provides a machine-readable value for the status of the external + * replication setup. + */ +public final class ExternalReplicationSetupStatus extends ExpandableStringEnum { + /** + * Your cluster needs to be peered by using the 'peerExternalCluster' action. + */ + public static final ExternalReplicationSetupStatus CLUSTER_PEER_REQUIRED = fromString("ClusterPeerRequired"); + + /** + * The peering needs to be accepted on your cluster before the setup can proceed. + */ + public static final ExternalReplicationSetupStatus CLUSTER_PEER_PENDING = fromString("ClusterPeerPending"); + + /** + * Need to call 'authorizeExternalReplication' and accept the returned 'vserver peer accept' command on your cluster + * to finish setting up the external replication. + */ + public static final ExternalReplicationSetupStatus VSERVER_PEER_REQUIRED = fromString("VServerPeerRequired"); + + /** + * Need to call 'authorizeExternalReplication' to finish setting up the external replication. + */ + public static final ExternalReplicationSetupStatus REPLICATION_CREATE_REQUIRED + = fromString("ReplicationCreateRequired"); + + /** + * External Replication setup is complete, you can now monitor the 'mirrorState' in the replication status for the + * health of the replication. + */ + public static final ExternalReplicationSetupStatus NO_ACTION_REQUIRED = fromString("NoActionRequired"); + + /** + * Creates a new instance of ExternalReplicationSetupStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ExternalReplicationSetupStatus() { + } + + /** + * Creates or finds a ExternalReplicationSetupStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExternalReplicationSetupStatus. + */ + public static ExternalReplicationSetupStatus fromString(String name) { + return fromString(name, ExternalReplicationSetupStatus.class); + } + + /** + * Gets known ExternalReplicationSetupStatus values. + * + * @return known ExternalReplicationSetupStatus values. + */ + public static Collection values() { + return values(ExternalReplicationSetupStatus.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/FileSystemUser.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/FileSystemUser.java new file mode 100644 index 000000000000..f6c25980284c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/FileSystemUser.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; + +/** + * File System user having access to volume data. For Unix, this is the user's uid and gid. For Windows, this is the + * user's username. Note that the Unix and Windows user details are mutually exclusive, meaning one or other must be + * supplied, but not both. + */ +@Fluent +public final class FileSystemUser implements JsonSerializable { + /* + * The effective NFS User ID and Group ID when accessing the volume data. + */ + private NfsUser nfsUser; + + /* + * The effective CIFS username when accessing the volume data. + */ + private CifsUser cifsUser; + + /** + * Creates an instance of FileSystemUser class. + */ + public FileSystemUser() { + } + + /** + * Get the nfsUser property: The effective NFS User ID and Group ID when accessing the volume data. + * + * @return the nfsUser value. + */ + public NfsUser nfsUser() { + return this.nfsUser; + } + + /** + * Set the nfsUser property: The effective NFS User ID and Group ID when accessing the volume data. + * + * @param nfsUser the nfsUser value to set. + * @return the FileSystemUser object itself. + */ + public FileSystemUser withNfsUser(NfsUser nfsUser) { + this.nfsUser = nfsUser; + return this; + } + + /** + * Get the cifsUser property: The effective CIFS username when accessing the volume data. + * + * @return the cifsUser value. + */ + public CifsUser cifsUser() { + return this.cifsUser; + } + + /** + * Set the cifsUser property: The effective CIFS username when accessing the volume data. + * + * @param cifsUser the cifsUser value to set. + * @return the FileSystemUser object itself. + */ + public FileSystemUser withCifsUser(CifsUser cifsUser) { + this.cifsUser = cifsUser; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (nfsUser() != null) { + nfsUser().validate(); + } + if (cifsUser() != null) { + cifsUser().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("nfsUser", this.nfsUser); + jsonWriter.writeJsonField("cifsUser", this.cifsUser); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FileSystemUser from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FileSystemUser 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 FileSystemUser. + */ + public static FileSystemUser fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FileSystemUser deserializedFileSystemUser = new FileSystemUser(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nfsUser".equals(fieldName)) { + deserializedFileSystemUser.nfsUser = NfsUser.fromJson(reader); + } else if ("cifsUser".equals(fieldName)) { + deserializedFileSystemUser.cifsUser = CifsUser.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedFileSystemUser; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/GlobalFileLockingState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/GlobalFileLockingState.java new file mode 100644 index 000000000000..313dd8691347 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/GlobalFileLockingState.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; + +/** + * Flag indicating whether the global file lock is enabled for the cache. + */ +public final class GlobalFileLockingState extends ExpandableStringEnum { + /** + * Global file locking is disabled. + */ + public static final GlobalFileLockingState DISABLED = fromString("Disabled"); + + /** + * Global file locking is enabled. + */ + public static final GlobalFileLockingState ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of GlobalFileLockingState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public GlobalFileLockingState() { + } + + /** + * Creates or finds a GlobalFileLockingState from its string representation. + * + * @param name a name to look for. + * @return the corresponding GlobalFileLockingState. + */ + public static GlobalFileLockingState fromString(String name) { + return fromString(name, GlobalFileLockingState.class); + } + + /** + * Gets known GlobalFileLockingState values. + * + * @return known GlobalFileLockingState values. + */ + public static Collection values() { + return values(GlobalFileLockingState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KerberosState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KerberosState.java new file mode 100644 index 000000000000..831dc4da96be --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/KerberosState.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; + +/** + * Describe if a cache is Kerberos enabled. + */ +public final class KerberosState extends ExpandableStringEnum { + /** + * Kerberos is disabled. + */ + public static final KerberosState DISABLED = fromString("Disabled"); + + /** + * Kerberos is enabled. + */ + public static final KerberosState ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of KerberosState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public KerberosState() { + } + + /** + * Creates or finds a KerberosState from its string representation. + * + * @param name a name to look for. + * @return the corresponding KerberosState. + */ + public static KerberosState fromString(String name) { + return fromString(name, KerberosState.class); + } + + /** + * Gets known KerberosState values. + * + * @return known KerberosState values. + */ + public static Collection values() { + return values(KerberosState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LargeVolumeType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LargeVolumeType.java new file mode 100644 index 000000000000..7f151ae470b7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LargeVolumeType.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the type of the Large Volume. When set to 'LargeVolume', the large volume is created with standard + * configuration. + * If it is set to 'ExtraLargeVolume7Dot2PiB', the extra large volume is created with higher capacity limit 7.2PiB with + * cool access enabled, + * delivering higher capacity limit with lower costs. + */ +public final class LargeVolumeType extends ExpandableStringEnum { + /** + * The large volume is created with standard configuration that provides standard performance and throughput. + */ + public static final LargeVolumeType LARGE_VOLUME = fromString("LargeVolume"); + + /** + * The extra large volume is created with higher volume capacity limit 7.2PiB with cool access enabled, delivering + * higher capacity limit with lower costs. + */ + public static final LargeVolumeType EXTRA_LARGE_VOLUME7DOT2PIB = fromString("PremExtraLargeVolume7Dot2PiB"); + + /** + * Creates a new instance of LargeVolumeType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LargeVolumeType() { + } + + /** + * Creates or finds a LargeVolumeType from its string representation. + * + * @param name a name to look for. + * @return the corresponding LargeVolumeType. + */ + public static LargeVolumeType fromString(String name) { + return fromString(name, LargeVolumeType.class); + } + + /** + * Gets known LargeVolumeType values. + * + * @return known LargeVolumeType values. + */ + public static Collection values() { + return values(LargeVolumeType.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapConfiguration.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapConfiguration.java new file mode 100644 index 000000000000..2c645570142c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapConfiguration.java @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * LDAP configuration. + */ +@Fluent +public final class LdapConfiguration implements JsonSerializable { + /* + * Name of the LDAP configuration domain + */ + private String domain; + + /* + * List of LDAP server IP addresses (IPv4 only) for the LDAP domain. + */ + private List ldapServers; + + /* + * Specifies whether or not the LDAP traffic needs to be secured via TLS. + */ + private Boolean ldapOverTLS; + + /* + * When LDAP over SSL/TLS is enabled, the LDAP client is required to have base64 encoded ldap servers CA + * certificate. + */ + private String serverCACertificate; + + /* + * The CN host name used while generating the certificate, LDAP Over TLS requires the CN host name to create DNS + * host entry. + */ + private String certificateCNHost; + + /** + * Creates an instance of LdapConfiguration class. + */ + public LdapConfiguration() { + } + + /** + * Get the domain property: Name of the LDAP configuration domain. + * + * @return the domain value. + */ + public String domain() { + return this.domain; + } + + /** + * Set the domain property: Name of the LDAP configuration domain. + * + * @param domain the domain value to set. + * @return the LdapConfiguration object itself. + */ + public LdapConfiguration withDomain(String domain) { + this.domain = domain; + return this; + } + + /** + * Get the ldapServers property: List of LDAP server IP addresses (IPv4 only) for the LDAP domain. + * + * @return the ldapServers value. + */ + public List ldapServers() { + return this.ldapServers; + } + + /** + * Set the ldapServers property: List of LDAP server IP addresses (IPv4 only) for the LDAP domain. + * + * @param ldapServers the ldapServers value to set. + * @return the LdapConfiguration object itself. + */ + public LdapConfiguration withLdapServers(List ldapServers) { + this.ldapServers = ldapServers; + return this; + } + + /** + * Get the ldapOverTLS property: Specifies whether or not the LDAP traffic needs to be secured via TLS. + * + * @return the ldapOverTLS value. + */ + public Boolean ldapOverTLS() { + return this.ldapOverTLS; + } + + /** + * Set the ldapOverTLS property: Specifies whether or not the LDAP traffic needs to be secured via TLS. + * + * @param ldapOverTLS the ldapOverTLS value to set. + * @return the LdapConfiguration object itself. + */ + public LdapConfiguration withLdapOverTLS(Boolean ldapOverTLS) { + this.ldapOverTLS = ldapOverTLS; + return this; + } + + /** + * Get the serverCACertificate property: When LDAP over SSL/TLS is enabled, the LDAP client is required to have + * base64 encoded ldap servers CA certificate. + * + * @return the serverCACertificate value. + */ + public String serverCACertificate() { + return this.serverCACertificate; + } + + /** + * Set the serverCACertificate property: When LDAP over SSL/TLS is enabled, the LDAP client is required to have + * base64 encoded ldap servers CA certificate. + * + * @param serverCACertificate the serverCACertificate value to set. + * @return the LdapConfiguration object itself. + */ + public LdapConfiguration withServerCACertificate(String serverCACertificate) { + this.serverCACertificate = serverCACertificate; + return this; + } + + /** + * Get the certificateCNHost property: The CN host name used while generating the certificate, LDAP Over TLS + * requires the CN host name to create DNS host entry. + * + * @return the certificateCNHost value. + */ + public String certificateCNHost() { + return this.certificateCNHost; + } + + /** + * Set the certificateCNHost property: The CN host name used while generating the certificate, LDAP Over TLS + * requires the CN host name to create DNS host entry. + * + * @param certificateCNHost the certificateCNHost value to set. + * @return the LdapConfiguration object itself. + */ + public LdapConfiguration withCertificateCNHost(String certificateCNHost) { + this.certificateCNHost = certificateCNHost; + return this; + } + + /** + * 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("domain", this.domain); + jsonWriter.writeArrayField("ldapServers", this.ldapServers, (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("ldapOverTLS", this.ldapOverTLS); + jsonWriter.writeStringField("serverCACertificate", this.serverCACertificate); + jsonWriter.writeStringField("certificateCNHost", this.certificateCNHost); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LdapConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LdapConfiguration if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the LdapConfiguration. + */ + public static LdapConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LdapConfiguration deserializedLdapConfiguration = new LdapConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("domain".equals(fieldName)) { + deserializedLdapConfiguration.domain = reader.getString(); + } else if ("ldapServers".equals(fieldName)) { + List ldapServers = reader.readArray(reader1 -> reader1.getString()); + deserializedLdapConfiguration.ldapServers = ldapServers; + } else if ("ldapOverTLS".equals(fieldName)) { + deserializedLdapConfiguration.ldapOverTLS = reader.getNullable(JsonReader::getBoolean); + } else if ("serverCACertificate".equals(fieldName)) { + deserializedLdapConfiguration.serverCACertificate = reader.getString(); + } else if ("certificateCNHost".equals(fieldName)) { + deserializedLdapConfiguration.certificateCNHost = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLdapConfiguration; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapServerType.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapServerType.java new file mode 100644 index 000000000000..02965c0ede7f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapServerType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of the LDAP server. + */ +public final class LdapServerType extends ExpandableStringEnum { + /** + * The volume should use Active Directory for LDAP connections. + */ + public static final LdapServerType ACTIVE_DIRECTORY = fromString("ActiveDirectory"); + + /** + * The volume should use OpenLDAP for LDAP connections. + */ + public static final LdapServerType OPEN_LDAP = fromString("OpenLDAP"); + + /** + * Creates a new instance of LdapServerType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LdapServerType() { + } + + /** + * Creates or finds a LdapServerType from its string representation. + * + * @param name a name to look for. + * @return the corresponding LdapServerType. + */ + public static LdapServerType fromString(String name) { + return fromString(name, LdapServerType.class); + } + + /** + * Gets known LdapServerType values. + * + * @return known LdapServerType values. + */ + public static Collection values() { + return values(LdapServerType.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapState.java new file mode 100644 index 000000000000..18ccb73b6c80 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/LdapState.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; + +/** + * Specifies whether LDAP is enabled or not. + */ +public final class LdapState extends ExpandableStringEnum { + /** + * ldap is disabled. + */ + public static final LdapState DISABLED = fromString("Disabled"); + + /** + * ldap is enabled. + */ + public static final LdapState ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of LdapState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LdapState() { + } + + /** + * Creates or finds a LdapState from its string representation. + * + * @param name a name to look for. + * @return the corresponding LdapState. + */ + public static LdapState fromString(String name) { + return fromString(name, LdapState.class); + } + + /** + * Gets known LdapState values. + * + * @return known LdapState values. + */ + public static Collection values() { + return values(LdapState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ListQuotaReportResponse.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ListQuotaReportResponse.java new file mode 100644 index 000000000000..66bb91c2943b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ListQuotaReportResponse.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.models; + +import com.azure.resourcemanager.netapp.fluent.models.ListQuotaReportResponseInner; +import java.util.List; + +/** + * An immutable client-side representation of ListQuotaReportResponse. + */ +public interface ListQuotaReportResponse { + /** + * Gets the value property: List of quota reports. + * + * @return the value value. + */ + List value(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.ListQuotaReportResponseInner object. + * + * @return the inner object. + */ + ListQuotaReportResponseInner innerModel(); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccount.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NetAppAccount.java index 9f44d1a824dc..82ed36c27afd 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 @@ -118,6 +118,13 @@ public interface NetAppAccount { */ MultiAdStatus multiAdStatus(); + /** + * Gets the ldapConfiguration property: LDAP Configuration for the account. + * + * @return the ldapConfiguration value. + */ + LdapConfiguration ldapConfiguration(); + /** * Gets the region of the resource. * @@ -201,9 +208,9 @@ interface WithResourceGroup { * The stage of the NetAppAccount definition which contains all the minimum required properties for the resource * to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithActiveDirectories, - DefinitionStages.WithEncryption, DefinitionStages.WithNfsV4IdDomain { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithActiveDirectories, DefinitionStages.WithEncryption, DefinitionStages.WithNfsV4IdDomain, + DefinitionStages.WithLdapConfiguration { /** * Executes the create request. * @@ -286,6 +293,19 @@ interface WithNfsV4IdDomain { */ WithCreate withNfsV4IdDomain(String nfsV4IdDomain); } + + /** + * The stage of the NetAppAccount definition allowing to specify ldapConfiguration. + */ + interface WithLdapConfiguration { + /** + * Specifies the ldapConfiguration property: LDAP Configuration for the account.. + * + * @param ldapConfiguration LDAP Configuration for the account. + * @return the next definition stage. + */ + WithCreate withLdapConfiguration(LdapConfiguration ldapConfiguration); + } } /** @@ -299,7 +319,7 @@ interface WithNfsV4IdDomain { * The template for NetAppAccount update. */ interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithActiveDirectories, - UpdateStages.WithEncryption, UpdateStages.WithNfsV4IdDomain { + UpdateStages.WithEncryption, UpdateStages.WithNfsV4IdDomain, UpdateStages.WithLdapConfiguration { /** * Executes the update request. * @@ -386,6 +406,19 @@ interface WithNfsV4IdDomain { */ Update withNfsV4IdDomain(String nfsV4IdDomain); } + + /** + * The stage of the NetAppAccount update allowing to specify ldapConfiguration. + */ + interface WithLdapConfiguration { + /** + * Specifies the ldapConfiguration property: LDAP Configuration for the account.. + * + * @param ldapConfiguration LDAP Configuration for the account. + * @return the next definition stage. + */ + Update withLdapConfiguration(LdapConfiguration 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 4759d24a74b2..10e520743762 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 @@ -255,6 +255,29 @@ public MultiAdStatus multiAdStatus() { return this.innerProperties() == null ? null : this.innerProperties().multiAdStatus(); } + /** + * Get the ldapConfiguration property: LDAP Configuration for the account. + * + * @return the ldapConfiguration value. + */ + public LdapConfiguration ldapConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().ldapConfiguration(); + } + + /** + * Set the ldapConfiguration property: LDAP Configuration for the account. + * + * @param ldapConfiguration the ldapConfiguration value to set. + * @return the NetAppAccountPatch object itself. + */ + public NetAppAccountPatch withLdapConfiguration(LdapConfiguration ldapConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new AccountProperties(); + } + this.innerProperties().withLdapConfiguration(ldapConfiguration); + return this; + } + /** * Validates the instance. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NfsUser.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NfsUser.java new file mode 100644 index 000000000000..4d88f83bcf03 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/NfsUser.java @@ -0,0 +1,121 @@ +// Copyright (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 effective NFS User ID and Group ID when accessing the volume data. + */ +@Fluent +public final class NfsUser implements JsonSerializable { + /* + * The NFS user's UID + */ + private Long userId; + + /* + * The NFS user's GID + */ + private Long groupId; + + /** + * Creates an instance of NfsUser class. + */ + public NfsUser() { + } + + /** + * Get the userId property: The NFS user's UID. + * + * @return the userId value. + */ + public Long userId() { + return this.userId; + } + + /** + * Set the userId property: The NFS user's UID. + * + * @param userId the userId value to set. + * @return the NfsUser object itself. + */ + public NfsUser withUserId(Long userId) { + this.userId = userId; + return this; + } + + /** + * Get the groupId property: The NFS user's GID. + * + * @return the groupId value. + */ + public Long groupId() { + return this.groupId; + } + + /** + * Set the groupId property: The NFS user's GID. + * + * @param groupId the groupId value to set. + * @return the NfsUser object itself. + */ + public NfsUser withGroupId(Long groupId) { + this.groupId = groupId; + 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("userId", this.userId); + jsonWriter.writeNumberField("groupId", this.groupId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NfsUser from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NfsUser 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 NfsUser. + */ + public static NfsUser fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NfsUser deserializedNfsUser = new NfsUser(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("userId".equals(fieldName)) { + deserializedNfsUser.userId = reader.getNullable(JsonReader::getLong); + } else if ("groupId".equals(fieldName)) { + deserializedNfsUser.groupId = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedNfsUser; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OriginClusterInformation.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OriginClusterInformation.java new file mode 100644 index 000000000000..9ccd09d0cc5b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/OriginClusterInformation.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.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; + +/** + * Stores the origin cluster information associated to a cache. + */ +@Fluent +public final class OriginClusterInformation implements JsonSerializable { + /* + * ONTAP cluster name of external cluster hosting the origin volume + */ + private String peerClusterName; + + /* + * ONTAP Intercluster LIF IP addresses. One IP address per cluster node is required + */ + private List peerAddresses; + + /* + * External Vserver (SVM) name name of the SVM hosting the origin volume + */ + private String peerVserverName; + + /* + * External origin volume name associated to this cache + */ + private String peerVolumeName; + + /** + * Creates an instance of OriginClusterInformation class. + */ + public OriginClusterInformation() { + } + + /** + * Get the peerClusterName property: ONTAP cluster name of external cluster hosting the origin volume. + * + * @return the peerClusterName value. + */ + public String peerClusterName() { + return this.peerClusterName; + } + + /** + * Set the peerClusterName property: ONTAP cluster name of external cluster hosting the origin volume. + * + * @param peerClusterName the peerClusterName value to set. + * @return the OriginClusterInformation object itself. + */ + public OriginClusterInformation withPeerClusterName(String peerClusterName) { + this.peerClusterName = peerClusterName; + return this; + } + + /** + * Get the peerAddresses property: ONTAP Intercluster LIF IP addresses. One IP address per cluster node is required. + * + * @return the peerAddresses value. + */ + public List peerAddresses() { + return this.peerAddresses; + } + + /** + * Set the peerAddresses property: ONTAP Intercluster LIF IP addresses. One IP address per cluster node is required. + * + * @param peerAddresses the peerAddresses value to set. + * @return the OriginClusterInformation object itself. + */ + public OriginClusterInformation withPeerAddresses(List peerAddresses) { + this.peerAddresses = peerAddresses; + return this; + } + + /** + * Get the peerVserverName property: External Vserver (SVM) name name of the SVM hosting the origin volume. + * + * @return the peerVserverName value. + */ + public String peerVserverName() { + return this.peerVserverName; + } + + /** + * Set the peerVserverName property: External Vserver (SVM) name name of the SVM hosting the origin volume. + * + * @param peerVserverName the peerVserverName value to set. + * @return the OriginClusterInformation object itself. + */ + public OriginClusterInformation withPeerVserverName(String peerVserverName) { + this.peerVserverName = peerVserverName; + return this; + } + + /** + * Get the peerVolumeName property: External origin volume name associated to this cache. + * + * @return the peerVolumeName value. + */ + public String peerVolumeName() { + return this.peerVolumeName; + } + + /** + * Set the peerVolumeName property: External origin volume name associated to this cache. + * + * @param peerVolumeName the peerVolumeName value to set. + * @return the OriginClusterInformation object itself. + */ + public OriginClusterInformation withPeerVolumeName(String peerVolumeName) { + this.peerVolumeName = peerVolumeName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (peerClusterName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property peerClusterName in model OriginClusterInformation")); + } + if (peerAddresses() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property peerAddresses in model OriginClusterInformation")); + } + if (peerVserverName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property peerVserverName in model OriginClusterInformation")); + } + if (peerVolumeName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property peerVolumeName in model OriginClusterInformation")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OriginClusterInformation.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("peerClusterName", this.peerClusterName); + jsonWriter.writeArrayField("peerAddresses", this.peerAddresses, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("peerVserverName", this.peerVserverName); + jsonWriter.writeStringField("peerVolumeName", this.peerVolumeName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OriginClusterInformation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OriginClusterInformation 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 OriginClusterInformation. + */ + public static OriginClusterInformation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OriginClusterInformation deserializedOriginClusterInformation = new OriginClusterInformation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("peerClusterName".equals(fieldName)) { + deserializedOriginClusterInformation.peerClusterName = reader.getString(); + } else if ("peerAddresses".equals(fieldName)) { + List peerAddresses = reader.readArray(reader1 -> reader1.getString()); + deserializedOriginClusterInformation.peerAddresses = peerAddresses; + } else if ("peerVserverName".equals(fieldName)) { + deserializedOriginClusterInformation.peerVserverName = reader.getString(); + } else if ("peerVolumeName".equals(fieldName)) { + deserializedOriginClusterInformation.peerVolumeName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOriginClusterInformation; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PeeringPassphrases.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PeeringPassphrases.java new file mode 100644 index 000000000000..e3efa93b268b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PeeringPassphrases.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.models; + +import com.azure.resourcemanager.netapp.fluent.models.PeeringPassphrasesInner; + +/** + * An immutable client-side representation of PeeringPassphrases. + */ +public interface PeeringPassphrases { + /** + * Gets the clusterPeeringCommand property: The cluster peering command. + * + * @return the clusterPeeringCommand value. + */ + String clusterPeeringCommand(); + + /** + * Gets the clusterPeeringPassphrase property: The cluster peering passphrase. + * + * @return the clusterPeeringPassphrase value. + */ + String clusterPeeringPassphrase(); + + /** + * Gets the vserverPeeringCommand property: The vserver peering command. + * + * @return the vserverPeeringCommand value. + */ + String vserverPeeringCommand(); + + /** + * Gets the inner com.azure.resourcemanager.netapp.fluent.models.PeeringPassphrasesInner object. + * + * @return the inner object. + */ + PeeringPassphrasesInner innerModel(); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PolicyStatus.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PolicyStatus.java new file mode 100644 index 000000000000..f787817200bd --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/PolicyStatus.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Policy status. + */ +public final class PolicyStatus extends ExpandableStringEnum { + /** + * Value indicating the policy is enabled. + */ + public static final PolicyStatus ENABLED = fromString("Enabled"); + + /** + * Value indicating the policy is disabled. + */ + public static final PolicyStatus DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of PolicyStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PolicyStatus() { + } + + /** + * Creates or finds a PolicyStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding PolicyStatus. + */ + public static PolicyStatus fromString(String name) { + return fromString(name, PolicyStatus.class); + } + + /** + * Gets known PolicyStatus values. + * + * @return known PolicyStatus values. + */ + public static Collection values() { + return values(PolicyStatus.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ProtocolTypes.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ProtocolTypes.java new file mode 100644 index 000000000000..f849640c12ac --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ProtocolTypes.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; + +/** + * Export policy rule. + */ +public final class ProtocolTypes extends ExpandableStringEnum { + /** + * NFSv3 protocol type. + */ + public static final ProtocolTypes NFSV3 = fromString("NFSv3"); + + /** + * NFSv4 protocol type. + */ + public static final ProtocolTypes NFSV4 = fromString("NFSv4"); + + /** + * SMB protocol type. + */ + public static final ProtocolTypes SMB = fromString("SMB"); + + /** + * Creates a new instance of ProtocolTypes value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProtocolTypes() { + } + + /** + * Creates or finds a ProtocolTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProtocolTypes. + */ + public static ProtocolTypes fromString(String name) { + return fromString(name, ProtocolTypes.class); + } + + /** + * Gets known ProtocolTypes values. + * + * @return known ProtocolTypes values. + */ + public static Collection values() { + return values(ProtocolTypes.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QuotaReport.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QuotaReport.java new file mode 100644 index 000000000000..6cd06f5e1153 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/QuotaReport.java @@ -0,0 +1,170 @@ +// Copyright (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; + +/** + * Quota report record properties. + */ +@Immutable +public final class QuotaReport implements JsonSerializable { + /* + * Type of quota + */ + private Type quotaType; + + /* + * UserID/GroupID/SID based on the quota target type. UserID and groupID can be found by running ‘id’ or ‘getent’ + * command for the user or group and SID can be found by running + */ + private String quotaTarget; + + /* + * Specifies the current usage in kibibytes for the user/group quota. + */ + private Long quotaLimitUsedInKiBs; + + /* + * Specifies the total size limit in kibibytes for the user/group quota. + */ + private Long quotaLimitTotalInKiBs; + + /* + * Percentage of used size compared to total size. + */ + private Float percentageUsed; + + /* + * Flag to indicate whether the quota is derived from default quota. + */ + private Boolean isDerivedQuota; + + /** + * Creates an instance of QuotaReport class. + */ + private QuotaReport() { + } + + /** + * Get the quotaType property: Type of quota. + * + * @return the quotaType value. + */ + public Type quotaType() { + return this.quotaType; + } + + /** + * Get the quotaTarget property: UserID/GroupID/SID based on the quota target type. UserID and groupID can be found + * by running ‘id’ or ‘getent’ command for the user or group and SID can be found by running <wmic useraccount + * where name='user-name' get sid>. + * + * @return the quotaTarget value. + */ + public String quotaTarget() { + return this.quotaTarget; + } + + /** + * Get the quotaLimitUsedInKiBs property: Specifies the current usage in kibibytes for the user/group quota. + * + * @return the quotaLimitUsedInKiBs value. + */ + public Long quotaLimitUsedInKiBs() { + return this.quotaLimitUsedInKiBs; + } + + /** + * Get the quotaLimitTotalInKiBs property: Specifies the total size limit in kibibytes for the user/group quota. + * + * @return the quotaLimitTotalInKiBs value. + */ + public Long quotaLimitTotalInKiBs() { + return this.quotaLimitTotalInKiBs; + } + + /** + * Get the percentageUsed property: Percentage of used size compared to total size. + * + * @return the percentageUsed value. + */ + public Float percentageUsed() { + return this.percentageUsed; + } + + /** + * Get the isDerivedQuota property: Flag to indicate whether the quota is derived from default quota. + * + * @return the isDerivedQuota value. + */ + public Boolean isDerivedQuota() { + return this.isDerivedQuota; + } + + /** + * 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("quotaType", this.quotaType == null ? null : this.quotaType.toString()); + jsonWriter.writeStringField("quotaTarget", this.quotaTarget); + jsonWriter.writeNumberField("quotaLimitUsedInKiBs", this.quotaLimitUsedInKiBs); + jsonWriter.writeNumberField("quotaLimitTotalInKiBs", this.quotaLimitTotalInKiBs); + jsonWriter.writeNumberField("percentageUsed", this.percentageUsed); + jsonWriter.writeBooleanField("isDerivedQuota", this.isDerivedQuota); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of QuotaReport from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of QuotaReport 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 QuotaReport. + */ + public static QuotaReport fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + QuotaReport deserializedQuotaReport = new QuotaReport(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("quotaType".equals(fieldName)) { + deserializedQuotaReport.quotaType = Type.fromString(reader.getString()); + } else if ("quotaTarget".equals(fieldName)) { + deserializedQuotaReport.quotaTarget = reader.getString(); + } else if ("quotaLimitUsedInKiBs".equals(fieldName)) { + deserializedQuotaReport.quotaLimitUsedInKiBs = reader.getNullable(JsonReader::getLong); + } else if ("quotaLimitTotalInKiBs".equals(fieldName)) { + deserializedQuotaReport.quotaLimitTotalInKiBs = reader.getNullable(JsonReader::getLong); + } else if ("percentageUsed".equals(fieldName)) { + deserializedQuotaReport.percentageUsed = reader.getNullable(JsonReader::getFloat); + } else if ("isDerivedQuota".equals(fieldName)) { + deserializedQuotaReport.isDerivedQuota = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedQuotaReport; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareProtectionPatchSettings.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareProtectionPatchSettings.java new file mode 100644 index 000000000000..2955b4701108 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareProtectionPatchSettings.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; + +/** + * Advanced Ransomware Protection reports (ARP) updatable settings. + */ +@Fluent +public final class RansomwareProtectionPatchSettings implements JsonSerializable { + /* + * The desired value of the ARP feature state available to the volume + */ + private DesiredRansomwareProtectionState desiredRansomwareProtectionState; + + /** + * Creates an instance of RansomwareProtectionPatchSettings class. + */ + public RansomwareProtectionPatchSettings() { + } + + /** + * Get the desiredRansomwareProtectionState property: The desired value of the ARP feature state available to the + * volume. + * + * @return the desiredRansomwareProtectionState value. + */ + public DesiredRansomwareProtectionState desiredRansomwareProtectionState() { + return this.desiredRansomwareProtectionState; + } + + /** + * Set the desiredRansomwareProtectionState property: The desired value of the ARP feature state available to the + * volume. + * + * @param desiredRansomwareProtectionState the desiredRansomwareProtectionState value to set. + * @return the RansomwareProtectionPatchSettings object itself. + */ + public RansomwareProtectionPatchSettings + withDesiredRansomwareProtectionState(DesiredRansomwareProtectionState desiredRansomwareProtectionState) { + this.desiredRansomwareProtectionState = desiredRansomwareProtectionState; + 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("desiredRansomwareProtectionState", + this.desiredRansomwareProtectionState == null ? null : this.desiredRansomwareProtectionState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RansomwareProtectionPatchSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RansomwareProtectionPatchSettings 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 RansomwareProtectionPatchSettings. + */ + public static RansomwareProtectionPatchSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RansomwareProtectionPatchSettings deserializedRansomwareProtectionPatchSettings + = new RansomwareProtectionPatchSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("desiredRansomwareProtectionState".equals(fieldName)) { + deserializedRansomwareProtectionPatchSettings.desiredRansomwareProtectionState + = DesiredRansomwareProtectionState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedRansomwareProtectionPatchSettings; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareProtectionSettings.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareProtectionSettings.java new file mode 100644 index 000000000000..3c02e9845031 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareProtectionSettings.java @@ -0,0 +1,116 @@ +// Copyright (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; + +/** + * Advanced Ransomware Protection reports (ARP) settings. + */ +@Fluent +public final class RansomwareProtectionSettings implements JsonSerializable { + /* + * The desired value of the Advanced Ransomware Protection feature state available to the volume + */ + private DesiredRansomwareProtectionState desiredRansomwareProtectionState; + + /* + * The actual state of the Advanced Ransomware Protection feature currently active on the volume + */ + private ActualRansomwareProtectionState actualRansomwareProtectionState; + + /** + * Creates an instance of RansomwareProtectionSettings class. + */ + public RansomwareProtectionSettings() { + } + + /** + * Get the desiredRansomwareProtectionState property: The desired value of the Advanced Ransomware Protection + * feature state available to the volume. + * + * @return the desiredRansomwareProtectionState value. + */ + public DesiredRansomwareProtectionState desiredRansomwareProtectionState() { + return this.desiredRansomwareProtectionState; + } + + /** + * Set the desiredRansomwareProtectionState property: The desired value of the Advanced Ransomware Protection + * feature state available to the volume. + * + * @param desiredRansomwareProtectionState the desiredRansomwareProtectionState value to set. + * @return the RansomwareProtectionSettings object itself. + */ + public RansomwareProtectionSettings + withDesiredRansomwareProtectionState(DesiredRansomwareProtectionState desiredRansomwareProtectionState) { + this.desiredRansomwareProtectionState = desiredRansomwareProtectionState; + return this; + } + + /** + * Get the actualRansomwareProtectionState property: The actual state of the Advanced Ransomware Protection feature + * currently active on the volume. + * + * @return the actualRansomwareProtectionState value. + */ + public ActualRansomwareProtectionState actualRansomwareProtectionState() { + return this.actualRansomwareProtectionState; + } + + /** + * 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("desiredRansomwareProtectionState", + this.desiredRansomwareProtectionState == null ? null : this.desiredRansomwareProtectionState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RansomwareProtectionSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RansomwareProtectionSettings 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 RansomwareProtectionSettings. + */ + public static RansomwareProtectionSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RansomwareProtectionSettings deserializedRansomwareProtectionSettings = new RansomwareProtectionSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("desiredRansomwareProtectionState".equals(fieldName)) { + deserializedRansomwareProtectionSettings.desiredRansomwareProtectionState + = DesiredRansomwareProtectionState.fromString(reader.getString()); + } else if ("actualRansomwareProtectionState".equals(fieldName)) { + deserializedRansomwareProtectionSettings.actualRansomwareProtectionState + = ActualRansomwareProtectionState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedRansomwareProtectionSettings; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReport.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReport.java new file mode 100644 index 000000000000..152c077c7585 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReport.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.RansomwareReportInner; + +/** + * An immutable client-side representation of RansomwareReport. + */ +public interface RansomwareReport { + /** + * 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: Advanced Ransomware Protection reports Properties. + * + * @return the properties value. + */ + RansomwareReportProperties 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.RansomwareReportInner object. + * + * @return the inner object. + */ + RansomwareReportInner innerModel(); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportProperties.java new file mode 100644 index 000000000000..4212ddd9545a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportProperties.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.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +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; +import java.util.List; + +/** + * Advanced Ransomware Protection (ARP) report properties. + * + * Evaluate the report to determine whether the activity is acceptable (false positive) or whether an attack seems + * malicious using the ClearSuspects operation. + * + * Advanced Ransomware Protection (ARP) creates snapshots named Anti_ransomware_backup when it detects a potential + * ransomware threat. You can use one of the ARP snapshots or another snapshot of your volume to restore data. + */ +@Immutable +public final class RansomwareReportProperties implements JsonSerializable { + /* + * The creation date and time of the report + */ + private OffsetDateTime eventTime; + + /* + * State of the Advanced Ransomware Protection (ARP) report + */ + private RansomwareReportState state; + + /* + * Severity of the Advanced Ransomware Protection (ARP) report + */ + private RansomwareReportSeverity severity; + + /* + * The number of cleared suspects identified by the ARP report + */ + private Integer clearedCount; + + /* + * The number of suspects identified by the ARP report + */ + private Integer reportedCount; + + /* + * Suspects identified in an ARP report + */ + private List suspects; + + /* + * Azure lifecycle management + */ + private String provisioningState; + + /** + * Creates an instance of RansomwareReportProperties class. + */ + private RansomwareReportProperties() { + } + + /** + * Get the eventTime property: The creation date and time of the report. + * + * @return the eventTime value. + */ + public OffsetDateTime eventTime() { + return this.eventTime; + } + + /** + * Get the state property: State of the Advanced Ransomware Protection (ARP) report. + * + * @return the state value. + */ + public RansomwareReportState state() { + return this.state; + } + + /** + * Get the severity property: Severity of the Advanced Ransomware Protection (ARP) report. + * + * @return the severity value. + */ + public RansomwareReportSeverity severity() { + return this.severity; + } + + /** + * Get the clearedCount property: The number of cleared suspects identified by the ARP report. + * + * @return the clearedCount value. + */ + public Integer clearedCount() { + return this.clearedCount; + } + + /** + * Get the reportedCount property: The number of suspects identified by the ARP report. + * + * @return the reportedCount value. + */ + public Integer reportedCount() { + return this.reportedCount; + } + + /** + * Get the suspects property: Suspects identified in an ARP report. + * + * @return the suspects value. + */ + public List suspects() { + return this.suspects; + } + + /** + * Get the provisioningState property: Azure lifecycle management. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (suspects() != null) { + suspects().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RansomwareReportProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RansomwareReportProperties 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 RansomwareReportProperties. + */ + public static RansomwareReportProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RansomwareReportProperties deserializedRansomwareReportProperties = new RansomwareReportProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("eventTime".equals(fieldName)) { + deserializedRansomwareReportProperties.eventTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("state".equals(fieldName)) { + deserializedRansomwareReportProperties.state = RansomwareReportState.fromString(reader.getString()); + } else if ("severity".equals(fieldName)) { + deserializedRansomwareReportProperties.severity + = RansomwareReportSeverity.fromString(reader.getString()); + } else if ("clearedCount".equals(fieldName)) { + deserializedRansomwareReportProperties.clearedCount = reader.getNullable(JsonReader::getInt); + } else if ("reportedCount".equals(fieldName)) { + deserializedRansomwareReportProperties.reportedCount = reader.getNullable(JsonReader::getInt); + } else if ("suspects".equals(fieldName)) { + List suspects + = reader.readArray(reader1 -> RansomwareSuspects.fromJson(reader1)); + deserializedRansomwareReportProperties.suspects = suspects; + } else if ("provisioningState".equals(fieldName)) { + deserializedRansomwareReportProperties.provisioningState = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRansomwareReportProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportSeverity.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportSeverity.java new file mode 100644 index 000000000000..3f84306c27af --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportSeverity.java @@ -0,0 +1,61 @@ +// Copyright (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; + +/** + * Severity of the Advanced Ransomware Protection (ARP) report. + */ +public final class RansomwareReportSeverity extends ExpandableStringEnum { + /** + * No data is suspected for ransomware activity. + */ + public static final RansomwareReportSeverity NONE = fromString("None"); + + /** + * Low attack probability. + */ + public static final RansomwareReportSeverity LOW = fromString("Low"); + + /** + * Moderate attack probability. + */ + public static final RansomwareReportSeverity MODERATE = fromString("Moderate"); + + /** + * High amount of data is suspected for ransomware activity. + */ + public static final RansomwareReportSeverity HIGH = fromString("High"); + + /** + * Creates a new instance of RansomwareReportSeverity value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RansomwareReportSeverity() { + } + + /** + * Creates or finds a RansomwareReportSeverity from its string representation. + * + * @param name a name to look for. + * @return the corresponding RansomwareReportSeverity. + */ + public static RansomwareReportSeverity fromString(String name) { + return fromString(name, RansomwareReportSeverity.class); + } + + /** + * Gets known RansomwareReportSeverity values. + * + * @return known RansomwareReportSeverity values. + */ + public static Collection values() { + return values(RansomwareReportSeverity.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportState.java new file mode 100644 index 000000000000..76247fec8d62 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportState.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; + +/** + * State of the Advanced Ransomware Protection (ARP) report. + */ +public final class RansomwareReportState extends ExpandableStringEnum { + /** + * The ARP report has been created. Take action by running clearsuspects marking suspects as FalsePositive or + * PotentialThreats. + */ + public static final RansomwareReportState ACTIVE = fromString("Active"); + + /** + * The ARP Report has been resolved. + */ + public static final RansomwareReportState RESOLVED = fromString("Resolved"); + + /** + * Creates a new instance of RansomwareReportState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RansomwareReportState() { + } + + /** + * Creates or finds a RansomwareReportState from its string representation. + * + * @param name a name to look for. + * @return the corresponding RansomwareReportState. + */ + public static RansomwareReportState fromString(String name) { + return fromString(name, RansomwareReportState.class); + } + + /** + * Gets known RansomwareReportState values. + * + * @return known RansomwareReportState values. + */ + public static Collection values() { + return values(RansomwareReportState.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReports.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReports.java new file mode 100644 index 000000000000..45543922d8e4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReports.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.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 RansomwareReports. + */ +public interface RansomwareReports { + /** + * Get details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat along with + * {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String accountName, String poolName, + String volumeName, String ransomwareReportName, Context context); + + /** + * Get details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details of the specified ransomware report (ARP) + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. + */ + RansomwareReport get(String resourceGroupName, String accountName, String poolName, String volumeName, + String ransomwareReportName); + + /** + * List all ransomware reports for the volume + * Returns a list of the Advanced Ransomware Protection (ARP) reports for the volume. + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Advanced Ransomware Protection (ARP) reports as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String accountName, String poolName, + String volumeName); + + /** + * List all ransomware reports for the volume + * Returns a list of the Advanced Ransomware Protection (ARP) reports for the volume. + * ARP reports are created with a list of suspected files when it detects any combination of high data entropy, + * abnormal volume activity with data encryption, and unusual file extensions. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of Advanced Ransomware Protection (ARP) reports as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context); + + /** + * "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should evaluate the report to + * determine whether the activity is acceptable (false positive) or whether an attack seems malicious. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data",. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param body Clear suspects request object supplied in the body of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void clearSuspects(String resourceGroupName, String accountName, String poolName, String volumeName, + String ransomwareReportName, RansomwareSuspectsClearRequest body); + + /** + * "Clear ransomware suspects for the given Advanced Ransomware Protection report. You should evaluate the report to + * determine whether the activity is acceptable (false positive) or whether an attack seems malicious. + * ARP creates snapshots named Anti_ransomware_backup when it detects a potential ransomware threat. You can use one + * of these ARP snapshots or another snapshot of your volume to restore data",. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param ransomwareReportName The name of the ransomware report. + * @param body Clear suspects request object supplied in the body of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void clearSuspects(String resourceGroupName, String accountName, String poolName, String volumeName, + String ransomwareReportName, RansomwareSuspectsClearRequest body, Context context); +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspectResolution.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspectResolution.java new file mode 100644 index 000000000000..a54dd948f7f7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspectResolution.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; + +/** + * ARP report suspect resolution. + */ +public final class RansomwareSuspectResolution extends ExpandableStringEnum { + /** + * The identified file type is unexpected in your workload and should be treated as a potential attack. + */ + public static final RansomwareSuspectResolution POTENTIAL_THREAT = fromString("PotentialThreat"); + + /** + * The identified file type is expected in your workload and can be ignored. + */ + public static final RansomwareSuspectResolution FALSE_POSITIVE = fromString("FalsePositive"); + + /** + * Creates a new instance of RansomwareSuspectResolution value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RansomwareSuspectResolution() { + } + + /** + * Creates or finds a RansomwareSuspectResolution from its string representation. + * + * @param name a name to look for. + * @return the corresponding RansomwareSuspectResolution. + */ + public static RansomwareSuspectResolution fromString(String name) { + return fromString(name, RansomwareSuspectResolution.class); + } + + /** + * Gets known RansomwareSuspectResolution values. + * + * @return known RansomwareSuspectResolution values. + */ + public static Collection values() { + return values(RansomwareSuspectResolution.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspects.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspects.java new file mode 100644 index 000000000000..c073db1a8571 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspects.java @@ -0,0 +1,137 @@ +// Copyright (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; + +/** + * List of suspects identified in an Advanced Ransomware Protection (ARP) report. + */ +@Immutable +public final class RansomwareSuspects implements JsonSerializable { + /* + * Suspect File extension + */ + private String extension; + + /* + * ARP report suspect resolution + */ + private RansomwareSuspectResolution resolution; + + /* + * The number of suspect files at the time of ARP report, this number can change as files get created and report + * status progresses + */ + private Integer fileCount; + + /* + * Suspect files + */ + private List suspectFiles; + + /** + * Creates an instance of RansomwareSuspects class. + */ + private RansomwareSuspects() { + } + + /** + * Get the extension property: Suspect File extension. + * + * @return the extension value. + */ + public String extension() { + return this.extension; + } + + /** + * Get the resolution property: ARP report suspect resolution. + * + * @return the resolution value. + */ + public RansomwareSuspectResolution resolution() { + return this.resolution; + } + + /** + * Get the fileCount property: The number of suspect files at the time of ARP report, this number can change as + * files get created and report status progresses. + * + * @return the fileCount value. + */ + public Integer fileCount() { + return this.fileCount; + } + + /** + * Get the suspectFiles property: Suspect files. + * + * @return the suspectFiles value. + */ + public List suspectFiles() { + return this.suspectFiles; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (suspectFiles() != null) { + suspectFiles().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RansomwareSuspects from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RansomwareSuspects 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 RansomwareSuspects. + */ + public static RansomwareSuspects fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RansomwareSuspects deserializedRansomwareSuspects = new RansomwareSuspects(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("extension".equals(fieldName)) { + deserializedRansomwareSuspects.extension = reader.getString(); + } else if ("resolution".equals(fieldName)) { + deserializedRansomwareSuspects.resolution + = RansomwareSuspectResolution.fromString(reader.getString()); + } else if ("fileCount".equals(fieldName)) { + deserializedRansomwareSuspects.fileCount = reader.getNullable(JsonReader::getInt); + } else if ("suspectFiles".equals(fieldName)) { + List suspectFiles = reader.readArray(reader1 -> SuspectFile.fromJson(reader1)); + deserializedRansomwareSuspects.suspectFiles = suspectFiles; + } else { + reader.skipChildren(); + } + } + + return deserializedRansomwareSuspects; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspectsClearRequest.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspectsClearRequest.java new file mode 100644 index 000000000000..42b448433cde --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspectsClearRequest.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; + +/** + * Clear suspects for Advanced Ransomware Protection (ARP) report. + */ +@Fluent +public final class RansomwareSuspectsClearRequest implements JsonSerializable { + /* + * ARP report suspect resolution + */ + private RansomwareSuspectResolution resolution; + + /* + * List of file extensions resolved (PotentialThreat or FalsePositive) + */ + private List extensions; + + /** + * Creates an instance of RansomwareSuspectsClearRequest class. + */ + public RansomwareSuspectsClearRequest() { + } + + /** + * Get the resolution property: ARP report suspect resolution. + * + * @return the resolution value. + */ + public RansomwareSuspectResolution resolution() { + return this.resolution; + } + + /** + * Set the resolution property: ARP report suspect resolution. + * + * @param resolution the resolution value to set. + * @return the RansomwareSuspectsClearRequest object itself. + */ + public RansomwareSuspectsClearRequest withResolution(RansomwareSuspectResolution resolution) { + this.resolution = resolution; + return this; + } + + /** + * Get the extensions property: List of file extensions resolved (PotentialThreat or FalsePositive). + * + * @return the extensions value. + */ + public List extensions() { + return this.extensions; + } + + /** + * Set the extensions property: List of file extensions resolved (PotentialThreat or FalsePositive). + * + * @param extensions the extensions value to set. + * @return the RansomwareSuspectsClearRequest object itself. + */ + public RansomwareSuspectsClearRequest withExtensions(List extensions) { + this.extensions = extensions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (resolution() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property resolution in model RansomwareSuspectsClearRequest")); + } + if (extensions() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property extensions in model RansomwareSuspectsClearRequest")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RansomwareSuspectsClearRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resolution", this.resolution == null ? null : this.resolution.toString()); + jsonWriter.writeArrayField("extensions", this.extensions, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RansomwareSuspectsClearRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RansomwareSuspectsClearRequest 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 RansomwareSuspectsClearRequest. + */ + public static RansomwareSuspectsClearRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RansomwareSuspectsClearRequest deserializedRansomwareSuspectsClearRequest + = new RansomwareSuspectsClearRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resolution".equals(fieldName)) { + deserializedRansomwareSuspectsClearRequest.resolution + = RansomwareSuspectResolution.fromString(reader.getString()); + } else if ("extensions".equals(fieldName)) { + List extensions = reader.readArray(reader1 -> reader1.getString()); + deserializedRansomwareSuspectsClearRequest.extensions = extensions; + } else { + reader.skipChildren(); + } + } + + return deserializedRansomwareSuspectsClearRequest; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationObject.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationObject.java index 8cc6a9f678da..98886ac62753 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationObject.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/ReplicationObject.java @@ -52,6 +52,29 @@ public final class ReplicationObject implements JsonSerializable destinationReplications; + /* + * Property that only applies to external replications. Provides a machine-readable value for the status of the + * external replication setup. + */ + private ExternalReplicationSetupStatus externalReplicationSetupStatus; + + /* + * Contains human-readable instructions on what the next step is to finish the external replication setup. + */ + private String externalReplicationSetupInfo; + + /* + * The mirror state property describes the current status of data replication for a replication. It provides insight + * into whether the data is actively being mirrored, if the replication process has been paused, or if it has yet to + * be initialized. + */ + private MirrorState mirrorState; + + /* + * The status of the Volume Replication + */ + private VolumeReplicationRelationshipStatus relationshipStatus; + /** * Creates an instance of ReplicationObject class. */ @@ -170,6 +193,46 @@ public List destinationReplications() { return this.destinationReplications; } + /** + * Get the externalReplicationSetupStatus property: Property that only applies to external replications. Provides a + * machine-readable value for the status of the external replication setup. + * + * @return the externalReplicationSetupStatus value. + */ + public ExternalReplicationSetupStatus externalReplicationSetupStatus() { + return this.externalReplicationSetupStatus; + } + + /** + * Get the externalReplicationSetupInfo property: Contains human-readable instructions on what the next step is to + * finish the external replication setup. + * + * @return the externalReplicationSetupInfo value. + */ + public String externalReplicationSetupInfo() { + return this.externalReplicationSetupInfo; + } + + /** + * Get the mirrorState property: The mirror state property describes the current status of data replication for a + * replication. It provides insight into whether the data is actively being mirrored, if the replication process has + * been paused, or if it has yet to be initialized. + * + * @return the mirrorState value. + */ + public MirrorState mirrorState() { + return this.mirrorState; + } + + /** + * Get the relationshipStatus property: The status of the Volume Replication. + * + * @return the relationshipStatus value. + */ + public VolumeReplicationRelationshipStatus relationshipStatus() { + return this.relationshipStatus; + } + /** * Validates the instance. * @@ -230,6 +293,16 @@ public static ReplicationObject fromJson(JsonReader jsonReader) throws IOExcepti List destinationReplications = reader.readArray(reader1 -> DestinationReplication.fromJson(reader1)); deserializedReplicationObject.destinationReplications = destinationReplications; + } else if ("externalReplicationSetupStatus".equals(fieldName)) { + deserializedReplicationObject.externalReplicationSetupStatus + = ExternalReplicationSetupStatus.fromString(reader.getString()); + } else if ("externalReplicationSetupInfo".equals(fieldName)) { + deserializedReplicationObject.externalReplicationSetupInfo = reader.getString(); + } else if ("mirrorState".equals(fieldName)) { + deserializedReplicationObject.mirrorState = MirrorState.fromString(reader.getString()); + } else if ("relationshipStatus".equals(fieldName)) { + deserializedReplicationObject.relationshipStatus + = VolumeReplicationRelationshipStatus.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecretPassword.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecretPassword.java new file mode 100644 index 000000000000..c8074d6214cd --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecretPassword.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Access password from Azure KeyVault Secrets to connect Active Directory. + */ +@Fluent +public final class SecretPassword implements JsonSerializable { + /* + * Properties provided by KeyVault. + */ + private SecretPasswordKeyVaultProperties keyVaultProperties; + + /* + * Identity used to authenticate to KeyVault. Applicable if keySource is 'Microsoft.KeyVault'. + */ + private SecretPasswordIdentity identity; + + /** + * Creates an instance of SecretPassword class. + */ + public SecretPassword() { + } + + /** + * Get the keyVaultProperties property: Properties provided by KeyVault. + * + * @return the keyVaultProperties value. + */ + public SecretPasswordKeyVaultProperties keyVaultProperties() { + return this.keyVaultProperties; + } + + /** + * Set the keyVaultProperties property: Properties provided by KeyVault. + * + * @param keyVaultProperties the keyVaultProperties value to set. + * @return the SecretPassword object itself. + */ + public SecretPassword withKeyVaultProperties(SecretPasswordKeyVaultProperties keyVaultProperties) { + this.keyVaultProperties = keyVaultProperties; + return this; + } + + /** + * Get the identity property: Identity used to authenticate to KeyVault. Applicable if keySource is + * 'Microsoft.KeyVault'. + * + * @return the identity value. + */ + public SecretPasswordIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Identity used to authenticate to KeyVault. Applicable if keySource is + * 'Microsoft.KeyVault'. + * + * @param identity the identity value to set. + * @return the SecretPassword object itself. + */ + public SecretPassword withIdentity(SecretPasswordIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (keyVaultProperties() != null) { + keyVaultProperties().validate(); + } + if (identity() != null) { + identity().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("keyVaultProperties", this.keyVaultProperties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SecretPassword from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SecretPassword if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SecretPassword. + */ + public static SecretPassword fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SecretPassword deserializedSecretPassword = new SecretPassword(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyVaultProperties".equals(fieldName)) { + deserializedSecretPassword.keyVaultProperties = SecretPasswordKeyVaultProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedSecretPassword.identity = SecretPasswordIdentity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSecretPassword; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecretPasswordIdentity.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecretPasswordIdentity.java new file mode 100644 index 000000000000..142d0abf11dd --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecretPasswordIdentity.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Identity used to authenticate with key vault. + */ +@Fluent +public final class SecretPasswordIdentity implements JsonSerializable { + /* + * The principal ID (object ID) of the identity used to authenticate with key vault. Read-only. + */ + private String principalId; + + /* + * The Azure resource identifier of the user assigned identity used to authenticate with key vault. Applicable if + * identity.type has 'UserAssigned'. It should match key of identity.userAssignedIdentities. + */ + private String userAssignedIdentity; + + /** + * Creates an instance of SecretPasswordIdentity class. + */ + public SecretPasswordIdentity() { + } + + /** + * Get the principalId property: The principal ID (object ID) of the identity used to authenticate with key vault. + * Read-only. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the userAssignedIdentity property: The Azure resource identifier of the user assigned identity used to + * authenticate with key vault. Applicable if identity.type has 'UserAssigned'. It should match key of + * identity.userAssignedIdentities. + * + * @return the userAssignedIdentity value. + */ + public String userAssignedIdentity() { + return this.userAssignedIdentity; + } + + /** + * Set the userAssignedIdentity property: The Azure resource identifier of the user assigned identity used to + * authenticate with key vault. Applicable if identity.type has 'UserAssigned'. It should match key of + * identity.userAssignedIdentities. + * + * @param userAssignedIdentity the userAssignedIdentity value to set. + * @return the SecretPasswordIdentity object itself. + */ + public SecretPasswordIdentity withUserAssignedIdentity(String userAssignedIdentity) { + this.userAssignedIdentity = userAssignedIdentity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("userAssignedIdentity", this.userAssignedIdentity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SecretPasswordIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SecretPasswordIdentity if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the SecretPasswordIdentity. + */ + public static SecretPasswordIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SecretPasswordIdentity deserializedSecretPasswordIdentity = new SecretPasswordIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalId".equals(fieldName)) { + deserializedSecretPasswordIdentity.principalId = reader.getString(); + } else if ("userAssignedIdentity".equals(fieldName)) { + deserializedSecretPasswordIdentity.userAssignedIdentity = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSecretPasswordIdentity; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecretPasswordKeyVaultProperties.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecretPasswordKeyVaultProperties.java new file mode 100644 index 000000000000..d61ec62ff020 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SecretPasswordKeyVaultProperties.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Properties of key vault to get the secrets for password. + */ +@Fluent +public final class SecretPasswordKeyVaultProperties implements JsonSerializable { + /* + * The Uri of KeyVault. + */ + private String keyVaultUri; + + /* + * The name of KeyVault password secret. + */ + private String secretName; + + /** + * Creates an instance of SecretPasswordKeyVaultProperties class. + */ + public SecretPasswordKeyVaultProperties() { + } + + /** + * Get the keyVaultUri property: The Uri of KeyVault. + * + * @return the keyVaultUri value. + */ + public String keyVaultUri() { + return this.keyVaultUri; + } + + /** + * Set the keyVaultUri property: The Uri of KeyVault. + * + * @param keyVaultUri the keyVaultUri value to set. + * @return the SecretPasswordKeyVaultProperties object itself. + */ + public SecretPasswordKeyVaultProperties withKeyVaultUri(String keyVaultUri) { + this.keyVaultUri = keyVaultUri; + return this; + } + + /** + * Get the secretName property: The name of KeyVault password secret. + * + * @return the secretName value. + */ + public String secretName() { + return this.secretName; + } + + /** + * Set the secretName property: The name of KeyVault password secret. + * + * @param secretName the secretName value to set. + * @return the SecretPasswordKeyVaultProperties object itself. + */ + public SecretPasswordKeyVaultProperties withSecretName(String secretName) { + this.secretName = secretName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (keyVaultUri() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property keyVaultUri in model SecretPasswordKeyVaultProperties")); + } + if (secretName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property secretName in model SecretPasswordKeyVaultProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SecretPasswordKeyVaultProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("keyVaultUri", this.keyVaultUri); + jsonWriter.writeStringField("secretName", this.secretName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SecretPasswordKeyVaultProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SecretPasswordKeyVaultProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SecretPasswordKeyVaultProperties. + */ + public static SecretPasswordKeyVaultProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SecretPasswordKeyVaultProperties deserializedSecretPasswordKeyVaultProperties + = new SecretPasswordKeyVaultProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyVaultUri".equals(fieldName)) { + deserializedSecretPasswordKeyVaultProperties.keyVaultUri = reader.getString(); + } else if ("secretName".equals(fieldName)) { + deserializedSecretPasswordKeyVaultProperties.secretName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSecretPasswordKeyVaultProperties; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SmbEncryptionState.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SmbEncryptionState.java new file mode 100644 index 000000000000..006f1976e953 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SmbEncryptionState.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; + +/** + * Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol cache. + */ +public final class SmbEncryptionState extends ExpandableStringEnum { + /** + * SMB encryption is disabled. + */ + public static final SmbEncryptionState DISABLED = fromString("Disabled"); + + /** + * SMB encryption is enabled. + */ + public static final SmbEncryptionState ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of SmbEncryptionState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SmbEncryptionState() { + } + + /** + * Creates or finds a SmbEncryptionState from its string representation. + * + * @param name a name to look for. + * @return the corresponding SmbEncryptionState. + */ + public static SmbEncryptionState fromString(String name) { + return fromString(name, SmbEncryptionState.class); + } + + /** + * Gets known SmbEncryptionState values. + * + * @return known SmbEncryptionState values. + */ + public static Collection values() { + return values(SmbEncryptionState.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 new file mode 100644 index 000000000000..092893d18e53 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SmbSettings.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; + +/** + * SMB settings for the cache. + */ +@Fluent +public final class SmbSettings implements JsonSerializable { + /* + * Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol cache. + */ + private SmbEncryptionState smbEncryption; + + /* + * Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume + */ + private SmbAccessBasedEnumeration smbAccessBasedEnumerations; + + /* + * Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume + */ + private SmbNonBrowsable smbNonBrowsable; + + /** + * Creates an instance of SmbSettings class. + */ + public SmbSettings() { + } + + /** + * Get the smbEncryption property: Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol + * cache. + * + * @return the smbEncryption value. + */ + public SmbEncryptionState smbEncryption() { + return this.smbEncryption; + } + + /** + * Set the smbEncryption property: Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol + * cache. + * + * @param smbEncryption the smbEncryption value to set. + * @return the SmbSettings object itself. + */ + public SmbSettings withSmbEncryption(SmbEncryptionState smbEncryption) { + this.smbEncryption = smbEncryption; + return this; + } + + /** + * Get the smbAccessBasedEnumerations property: Enables access-based enumeration share property for SMB Shares. Only + * applicable for SMB/DualProtocol volume. + * + * @return the smbAccessBasedEnumerations value. + */ + public SmbAccessBasedEnumeration smbAccessBasedEnumerations() { + return this.smbAccessBasedEnumerations; + } + + /** + * Set the smbAccessBasedEnumerations property: Enables access-based enumeration share property for SMB Shares. Only + * applicable for SMB/DualProtocol volume. + * + * @param smbAccessBasedEnumerations the smbAccessBasedEnumerations value to set. + * @return the SmbSettings object itself. + */ + public SmbSettings withSmbAccessBasedEnumerations(SmbAccessBasedEnumeration smbAccessBasedEnumerations) { + this.smbAccessBasedEnumerations = smbAccessBasedEnumerations; + return this; + } + + /** + * Get the smbNonBrowsable property: Enables non-browsable property for SMB Shares. Only applicable for + * SMB/DualProtocol volume. + * + * @return the smbNonBrowsable value. + */ + public SmbNonBrowsable smbNonBrowsable() { + return this.smbNonBrowsable; + } + + /** + * Set the smbNonBrowsable property: Enables non-browsable property for SMB Shares. Only applicable for + * SMB/DualProtocol volume. + * + * @param smbNonBrowsable the smbNonBrowsable value to set. + * @return the SmbSettings object itself. + */ + public SmbSettings withSmbNonBrowsable(SmbNonBrowsable smbNonBrowsable) { + this.smbNonBrowsable = smbNonBrowsable; + 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()); + jsonWriter.writeStringField("smbAccessBasedEnumerations", + this.smbAccessBasedEnumerations == null ? null : this.smbAccessBasedEnumerations.toString()); + jsonWriter.writeStringField("smbNonBrowsable", + this.smbNonBrowsable == null ? null : this.smbNonBrowsable.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SmbSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SmbSettings 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 SmbSettings. + */ + public static SmbSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SmbSettings deserializedSmbSettings = new SmbSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("smbEncryption".equals(fieldName)) { + deserializedSmbSettings.smbEncryption = SmbEncryptionState.fromString(reader.getString()); + } else if ("smbAccessBasedEnumerations".equals(fieldName)) { + deserializedSmbSettings.smbAccessBasedEnumerations + = SmbAccessBasedEnumeration.fromString(reader.getString()); + } else if ("smbNonBrowsable".equals(fieldName)) { + deserializedSmbSettings.smbNonBrowsable = SmbNonBrowsable.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSmbSettings; + }); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotDirectoryVisibility.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotDirectoryVisibility.java new file mode 100644 index 000000000000..ea3a485321db --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotDirectoryVisibility.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Controls the visibility of the Elastic Volume's read-only snapshot directory, which provides access to each of the + * volume's snapshots. + */ +public final class SnapshotDirectoryVisibility extends ExpandableStringEnum { + /** + * Value indicating the read-only snapshot directory is not visible. + */ + public static final SnapshotDirectoryVisibility HIDDEN = fromString("Hidden"); + + /** + * Value indicating the read-only snapshot directory is visible. + */ + public static final SnapshotDirectoryVisibility VISIBLE = fromString("Visible"); + + /** + * Creates a new instance of SnapshotDirectoryVisibility value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SnapshotDirectoryVisibility() { + } + + /** + * Creates or finds a SnapshotDirectoryVisibility from its string representation. + * + * @param name a name to look for. + * @return the corresponding SnapshotDirectoryVisibility. + */ + public static SnapshotDirectoryVisibility fromString(String name) { + return fromString(name, SnapshotDirectoryVisibility.class); + } + + /** + * Gets known SnapshotDirectoryVisibility values. + * + * @return known SnapshotDirectoryVisibility values. + */ + public static Collection values() { + return values(SnapshotDirectoryVisibility.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotUsage.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotUsage.java new file mode 100644 index 000000000000..54786c233ec7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotUsage.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Snapshot usage for backup. + */ +public final class SnapshotUsage extends ExpandableStringEnum { + /** + * Value indicating an existing snapshot is used. + */ + public static final SnapshotUsage USE_EXISTING_SNAPSHOT = fromString("UseExistingSnapshot"); + + /** + * Value indicating a new snapshot is created. + */ + public static final SnapshotUsage CREATE_NEW_SNAPSHOT = fromString("CreateNewSnapshot"); + + /** + * Creates a new instance of SnapshotUsage value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SnapshotUsage() { + } + + /** + * Creates or finds a SnapshotUsage from its string representation. + * + * @param name a name to look for. + * @return the corresponding SnapshotUsage. + */ + public static SnapshotUsage fromString(String name) { + return fromString(name, SnapshotUsage.class); + } + + /** + * Gets known SnapshotUsage values. + * + * @return known SnapshotUsage values. + */ + public static Collection values() { + return values(SnapshotUsage.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SuspectFile.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SuspectFile.java new file mode 100644 index 000000000000..6006913e8594 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SuspectFile.java @@ -0,0 +1,100 @@ +// Copyright (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.CoreUtils; +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; + +/** + * Suspect file information. + */ +@Immutable +public final class SuspectFile implements JsonSerializable { + /* + * Suspect filename + */ + private String suspectFileName; + + /* + * The creation date and time of the file + */ + private OffsetDateTime fileTimestamp; + + /** + * Creates an instance of SuspectFile class. + */ + private SuspectFile() { + } + + /** + * Get the suspectFileName property: Suspect filename. + * + * @return the suspectFileName value. + */ + public String suspectFileName() { + return this.suspectFileName; + } + + /** + * Get the fileTimestamp property: The creation date and time of the file. + * + * @return the fileTimestamp value. + */ + public OffsetDateTime fileTimestamp() { + return this.fileTimestamp; + } + + /** + * 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 SuspectFile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SuspectFile 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 SuspectFile. + */ + public static SuspectFile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SuspectFile deserializedSuspectFile = new SuspectFile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("suspectFileName".equals(fieldName)) { + deserializedSuspectFile.suspectFileName = reader.getString(); + } else if ("fileTimestamp".equals(fieldName)) { + deserializedSuspectFile.fileTimestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedSuspectFile; + }); + } +} 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 4355e8df7dd9..4679f96e9a94 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volume.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volume.java @@ -98,9 +98,11 @@ public interface Volume { /** * Gets the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota - * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, - * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values - * expressed in bytes as multiples of 1 GiB. + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB + * to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples + * of 1 GiB. * * @return the usageThreshold value. */ @@ -331,6 +333,13 @@ public interface Volume { */ Boolean ldapEnabled(); + /** + * Gets the ldapServerType property: Specifies the type of LDAP server for a given NFS volume. + * + * @return the ldapServerType value. + */ + LdapServerType ldapServerType(); + /** * Gets the coolAccess property: Specifies whether Cool Access(tiering) is enabled for the volume. * @@ -517,6 +526,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. * @@ -531,6 +551,20 @@ 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. + * + * @return the breakthroughMode value. + */ + BreakthroughMode breakthroughMode(); + /** * Gets the region of the resource. * @@ -635,12 +669,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); @@ -675,14 +713,15 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithZon DefinitionStages.WithSmbAccessBasedEnumeration, DefinitionStages.WithSmbNonBrowsable, DefinitionStages.WithSmbContinuouslyAvailable, DefinitionStages.WithThroughputMibps, DefinitionStages.WithEncryptionKeySource, DefinitionStages.WithKeyVaultPrivateEndpointResourceId, - DefinitionStages.WithLdapEnabled, DefinitionStages.WithCoolAccess, DefinitionStages.WithCoolnessPeriod, - DefinitionStages.WithCoolAccessRetrievalPolicy, DefinitionStages.WithCoolAccessTieringPolicy, - DefinitionStages.WithUnixPermissions, DefinitionStages.WithAvsDataStore, - DefinitionStages.WithIsDefaultQuotaEnabled, DefinitionStages.WithDefaultUserQuotaInKiBs, - DefinitionStages.WithDefaultGroupQuotaInKiBs, DefinitionStages.WithCapacityPoolResourceId, - DefinitionStages.WithProximityPlacementGroup, DefinitionStages.WithVolumeSpecName, - DefinitionStages.WithPlacementRules, DefinitionStages.WithEnableSubvolumes, - DefinitionStages.WithIsLargeVolume { + DefinitionStages.WithLdapEnabled, DefinitionStages.WithLdapServerType, DefinitionStages.WithCoolAccess, + DefinitionStages.WithCoolnessPeriod, DefinitionStages.WithCoolAccessRetrievalPolicy, + DefinitionStages.WithCoolAccessTieringPolicy, DefinitionStages.WithUnixPermissions, + DefinitionStages.WithAvsDataStore, DefinitionStages.WithIsDefaultQuotaEnabled, + DefinitionStages.WithDefaultUserQuotaInKiBs, DefinitionStages.WithDefaultGroupQuotaInKiBs, + DefinitionStages.WithCapacityPoolResourceId, DefinitionStages.WithProximityPlacementGroup, + DefinitionStages.WithVolumeSpecName, DefinitionStages.WithPlacementRules, + DefinitionStages.WithEnableSubvolumes, DefinitionStages.WithIsLargeVolume, + DefinitionStages.WithLargeVolumeType, DefinitionStages.WithLanguage, DefinitionStages.WithBreakthroughMode { /** * Executes the create request. * @@ -1036,6 +1075,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. */ @@ -1272,6 +1324,53 @@ 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. + */ + interface WithBreakthroughMode { + /** + * Specifies the breakthroughMode property: Specifies whether the volume operates in Breakthrough Mode.. + * + * @param breakthroughMode Specifies whether the volume operates in Breakthrough Mode. + * @return the next definition stage. + */ + WithCreate withBreakthroughMode(BreakthroughMode breakthroughMode); + } } /** @@ -1346,12 +1445,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); @@ -2034,4 +2137,24 @@ GetGroupIdListForLdapUserResponse listGetGroupIdListForLdapUser(GetGroupIdListFo * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void revertRelocation(Context context); + + /** + * A long-running resource action. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ListQuotaReportResponse listQuotaReport(); + + /** + * A long-running resource action. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ListQuotaReportResponse listQuotaReport(Context context); } 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 f78f779f1c15..d8076515c82c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupVolumeProperties.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupVolumeProperties.java @@ -200,9 +200,11 @@ public VolumeGroupVolumeProperties withServiceLevel(ServiceLevel serviceLevel) { /** * Get the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota - * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, - * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values - * expressed in bytes as multiples of 1 GiB. + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB + * to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples + * of 1 GiB. * * @return the usageThreshold value. */ @@ -212,9 +214,11 @@ public long usageThreshold() { /** * Set the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota - * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, - * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values - * expressed in bytes as multiples of 1 GiB. + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB + * to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples + * of 1 GiB. * * @param usageThreshold the usageThreshold value to set. * @return the VolumeGroupVolumeProperties object itself. @@ -829,6 +833,29 @@ public VolumeGroupVolumeProperties withLdapEnabled(Boolean ldapEnabled) { return this; } + /** + * Get the ldapServerType property: Specifies the type of LDAP server for a given NFS volume. + * + * @return the ldapServerType value. + */ + public LdapServerType ldapServerType() { + return this.innerProperties() == null ? null : this.innerProperties().ldapServerType(); + } + + /** + * Set the ldapServerType property: Specifies the type of LDAP server for a given NFS volume. + * + * @param ldapServerType the ldapServerType value to set. + * @return the VolumeGroupVolumeProperties object itself. + */ + public VolumeGroupVolumeProperties withLdapServerType(LdapServerType ldapServerType) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeProperties(); + } + this.innerProperties().withLdapServerType(ldapServerType); + return this; + } + /** * Get the coolAccess property: Specifies whether Cool Access(tiering) is enabled for the volume. * @@ -1289,6 +1316,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. * @@ -1307,6 +1365,52 @@ 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. + * + * @return the breakthroughMode value. + */ + public BreakthroughMode breakthroughMode() { + return this.innerProperties() == null ? null : this.innerProperties().breakthroughMode(); + } + + /** + * Set the breakthroughMode property: Specifies whether the volume operates in Breakthrough Mode. + * + * @param breakthroughMode the breakthroughMode value to set. + * @return the VolumeGroupVolumeProperties object itself. + */ + public VolumeGroupVolumeProperties withBreakthroughMode(BreakthroughMode breakthroughMode) { + if (this.innerProperties() == null) { + this.innerProperties = new VolumeProperties(); + } + this.innerProperties().withBreakthroughMode(breakthroughMode); + return this; + } + /** * Validates the instance. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeLanguage.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeLanguage.java new file mode 100644 index 000000000000..77295242a6f1 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeLanguage.java @@ -0,0 +1,386 @@ +// Copyright (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; + +/** + * Language supported for volume. + */ +public final class VolumeLanguage extends ExpandableStringEnum { + /** + * Posix with UTF-8. + */ + public static final VolumeLanguage C_UTF_8 = fromString("c.utf-8"); + + /** + * UTF-8 with 4 byte character support. + */ + public static final VolumeLanguage UTF8MB4 = fromString("utf8mb4"); + + /** + * Arabic - Deprecated. + */ + public static final VolumeLanguage AR = fromString("ar"); + + /** + * Arabic with UTF-8. + */ + public static final VolumeLanguage AR_UTF_8 = fromString("ar.utf-8"); + + /** + * Croatian - Deprecated. + */ + public static final VolumeLanguage HR = fromString("hr"); + + /** + * Croatian with UTF-8. + */ + public static final VolumeLanguage HR_UTF_8 = fromString("hr.utf-8"); + + /** + * Czech - Deprecated. + */ + public static final VolumeLanguage CS = fromString("cs"); + + /** + * Czech with UTF-8. + */ + public static final VolumeLanguage CS_UTF_8 = fromString("cs.utf-8"); + + /** + * Danish - Deprecated. + */ + public static final VolumeLanguage DA = fromString("da"); + + /** + * Danish with UTF-8. + */ + public static final VolumeLanguage DA_UTF_8 = fromString("da.utf-8"); + + /** + * Dutch - Deprecated. + */ + public static final VolumeLanguage NL = fromString("nl"); + + /** + * Dutch with UTF-8. + */ + public static final VolumeLanguage NL_UTF_8 = fromString("nl.utf-8"); + + /** + * English - Deprecated. + */ + public static final VolumeLanguage EN = fromString("en"); + + /** + * English with UTF-8. + */ + public static final VolumeLanguage EN_UTF_8 = fromString("en.utf-8"); + + /** + * Finnish - Deprecated. + */ + public static final VolumeLanguage FI = fromString("fi"); + + /** + * Finnish with UTF-8. + */ + public static final VolumeLanguage FI_UTF_8 = fromString("fi.utf-8"); + + /** + * French - Deprecated. + */ + public static final VolumeLanguage FR = fromString("fr"); + + /** + * French with UTF-8. + */ + public static final VolumeLanguage FR_UTF_8 = fromString("fr.utf-8"); + + /** + * German - Deprecated. + */ + public static final VolumeLanguage DE = fromString("de"); + + /** + * German with UTF-8. + */ + public static final VolumeLanguage DE_UTF_8 = fromString("de.utf-8"); + + /** + * Hebrew - Deprecated. + */ + public static final VolumeLanguage HE = fromString("he"); + + /** + * Hebrew with UTF-8. + */ + public static final VolumeLanguage HE_UTF_8 = fromString("he.utf-8"); + + /** + * Hungarian - Deprecated. + */ + public static final VolumeLanguage HU = fromString("hu"); + + /** + * Hungarian with UTF-8. + */ + public static final VolumeLanguage HU_UTF_8 = fromString("hu.utf-8"); + + /** + * Italian - Deprecated. + */ + public static final VolumeLanguage IT = fromString("it"); + + /** + * Italian with UTF-8. + */ + public static final VolumeLanguage IT_UTF_8 = fromString("it.utf-8"); + + /** + * Japanese euc-j - Deprecated. + */ + public static final VolumeLanguage JA = fromString("ja"); + + /** + * Japanese euc-j with UTF-8. + */ + public static final VolumeLanguage JA_UTF_8 = fromString("ja.utf-8"); + + /** + * Japanese euc-j - Deprecated. + */ + public static final VolumeLanguage JA_V1 = fromString("ja-v1"); + + /** + * Japanese euc-j with UTF-8. + */ + public static final VolumeLanguage JA_V1_UTF_8 = fromString("ja-v1.utf-8"); + + /** + * Japanese pck. + */ + public static final VolumeLanguage JA_JP_PCK = fromString("ja-jp.pck"); + + /** + * Japanese pck with UTF-8 - Deprecated. + */ + public static final VolumeLanguage JA_JP_PCK_UTF_8 = fromString("ja-jp.pck.utf-8"); + + /** + * Japanese cp932. + */ + public static final VolumeLanguage JA_JP_932 = fromString("ja-jp.932"); + + /** + * Japanese cp932 with UTF-8 - Deprecated. + */ + public static final VolumeLanguage JA_JP_932_UTF_8 = fromString("ja-jp.932.utf-8"); + + /** + * Japanese pck - sjis. + */ + public static final VolumeLanguage JA_JP_PCK_V2 = fromString("ja-jp.pck-v2"); + + /** + * Japanese pck - sjis with UTF-8 - Deprecated. + */ + public static final VolumeLanguage JA_JP_PCK_V2_UTF_8 = fromString("ja-jp.pck-v2.utf-8"); + + /** + * Korean - Deprecated. + */ + public static final VolumeLanguage KO = fromString("ko"); + + /** + * Korean with UTF-8. + */ + public static final VolumeLanguage KO_UTF_8 = fromString("ko.utf-8"); + + /** + * Norwegian - Deprecated. + */ + public static final VolumeLanguage NO = fromString("no"); + + /** + * Norwegian with UTF-8. + */ + public static final VolumeLanguage NO_UTF_8 = fromString("no.utf-8"); + + /** + * Polish - Deprecated. + */ + public static final VolumeLanguage PL = fromString("pl"); + + /** + * Polish with UTF-8. + */ + public static final VolumeLanguage PL_UTF_8 = fromString("pl.utf-8"); + + /** + * Portuguese - Deprecated. + */ + public static final VolumeLanguage PT = fromString("pt"); + + /** + * Portuguese with UTF-8. + */ + public static final VolumeLanguage PT_UTF_8 = fromString("pt.utf-8"); + + /** + * Posix - Deprecated. + */ + public static final VolumeLanguage C = fromString("c"); + + /** + * Romanian - Deprecated. + */ + public static final VolumeLanguage RO = fromString("ro"); + + /** + * Romanian with UTF-8. + */ + public static final VolumeLanguage RO_UTF_8 = fromString("ro.utf-8"); + + /** + * Russian - Deprecated. + */ + public static final VolumeLanguage RU = fromString("ru"); + + /** + * Russian with UTF-8. + */ + public static final VolumeLanguage RU_UTF_8 = fromString("ru.utf-8"); + + /** + * Simplified Chinese - Deprecated. + */ + public static final VolumeLanguage ZH = fromString("zh"); + + /** + * Simplified Chinese with UTF-8. + */ + public static final VolumeLanguage ZH_UTF_8 = fromString("zh.utf-8"); + + /** + * Simplified gbk Chinese. + */ + public static final VolumeLanguage ZH_GBK = fromString("zh.gbk"); + + /** + * Simplified gbk Chinese with UTF-8 - Deprecated. + */ + public static final VolumeLanguage ZH_GBK_UTF_8 = fromString("zh.gbk.utf-8"); + + /** + * Traditional Chinese BIG 5. + */ + public static final VolumeLanguage ZH_TW_BIG5 = fromString("zh-tw.big5"); + + /** + * Traditional Chinese BIG 5 with UTF-8 - Deprecated. + */ + public static final VolumeLanguage ZH_TW_BIG5_UTF_8 = fromString("zh-tw.big5.utf-8"); + + /** + * Traditional Chinese EUC-TW. + */ + public static final VolumeLanguage ZH_TW = fromString("zh-tw"); + + /** + * Traditional Chinese EUC-TW with UTF-8 - Deprecated. + */ + public static final VolumeLanguage ZH_TW_UTF_8 = fromString("zh-tw.utf-8"); + + /** + * Slovak - Deprecated. + */ + public static final VolumeLanguage SK = fromString("sk"); + + /** + * Slovak with UTF-8. + */ + public static final VolumeLanguage SK_UTF_8 = fromString("sk.utf-8"); + + /** + * Slovenian - Deprecated. + */ + public static final VolumeLanguage SL = fromString("sl"); + + /** + * Slovenian with UTF-8. + */ + public static final VolumeLanguage SL_UTF_8 = fromString("sl.utf-8"); + + /** + * Spanish - Deprecated. + */ + public static final VolumeLanguage ES = fromString("es"); + + /** + * Spanish with UTF-8. + */ + public static final VolumeLanguage ES_UTF_8 = fromString("es.utf-8"); + + /** + * Swedish - Deprecated. + */ + public static final VolumeLanguage SV = fromString("sv"); + + /** + * Swedish with UTF-8. + */ + public static final VolumeLanguage SV_UTF_8 = fromString("sv.utf-8"); + + /** + * Turkish - Deprecated. + */ + public static final VolumeLanguage TR = fromString("tr"); + + /** + * Turkish with UTF-8. + */ + public static final VolumeLanguage TR_UTF_8 = fromString("tr.utf-8"); + + /** + * US English - Deprecated. + */ + public static final VolumeLanguage EN_US = fromString("en-us"); + + /** + * US English with UTF-8. + */ + public static final VolumeLanguage EN_US_UTF_8 = fromString("en-us.utf-8"); + + /** + * Creates a new instance of VolumeLanguage value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public VolumeLanguage() { + } + + /** + * Creates or finds a VolumeLanguage from its string representation. + * + * @param name a name to look for. + * @return the corresponding VolumeLanguage. + */ + public static VolumeLanguage fromString(String name) { + return fromString(name, VolumeLanguage.class); + } + + /** + * Gets known VolumeLanguage values. + * + * @return known VolumeLanguage values. + */ + public static Collection values() { + return values(VolumeLanguage.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java index d9b8f7747497..1550c3dc8ec5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java @@ -156,9 +156,11 @@ public VolumePatch withServiceLevel(ServiceLevel serviceLevel) { /** * Get the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota - * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, - * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values - * expressed in bytes as multiples of 1 GiB. + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB + * to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples + * of 1 GiB. * * @return the usageThreshold value. */ @@ -168,9 +170,11 @@ public Long usageThreshold() { /** * Set the usageThreshold property: Maximum storage quota allowed for a file system in bytes. This is a soft quota - * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. For large volumes, - * valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB to 2400TiB. Values - * expressed in bytes as multiples of 1 GiB. + * used for alerting only. For regular volumes, valid values are in the range 50GiB to 100TiB. + * For large volumes, valid values are in the range 100TiB to 500TiB, and on an exceptional basis, from to 2400GiB + * to 2400TiB. + * For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples + * of 1 GiB. * * @param usageThreshold the usageThreshold value to set. * @return the VolumePatch object itself. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesDataProtection.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesDataProtection.java index b2900cb2db3c..41f394d9bb25 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesDataProtection.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesDataProtection.java @@ -27,6 +27,11 @@ public final class VolumePatchPropertiesDataProtection */ private VolumeSnapshotProperties snapshot; + /* + * Advanced Ransomware Protection updatable settings + */ + private RansomwareProtectionPatchSettings ransomwareProtection; + /** * Creates an instance of VolumePatchPropertiesDataProtection class. */ @@ -73,6 +78,27 @@ public VolumePatchPropertiesDataProtection withSnapshot(VolumeSnapshotProperties return this; } + /** + * Get the ransomwareProtection property: Advanced Ransomware Protection updatable settings. + * + * @return the ransomwareProtection value. + */ + public RansomwareProtectionPatchSettings ransomwareProtection() { + return this.ransomwareProtection; + } + + /** + * Set the ransomwareProtection property: Advanced Ransomware Protection updatable settings. + * + * @param ransomwareProtection the ransomwareProtection value to set. + * @return the VolumePatchPropertiesDataProtection object itself. + */ + public VolumePatchPropertiesDataProtection + withRansomwareProtection(RansomwareProtectionPatchSettings ransomwareProtection) { + this.ransomwareProtection = ransomwareProtection; + return this; + } + /** * Validates the instance. * @@ -85,6 +111,9 @@ public void validate() { if (snapshot() != null) { snapshot().validate(); } + if (ransomwareProtection() != null) { + ransomwareProtection().validate(); + } } /** @@ -95,6 +124,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("backup", this.backup); jsonWriter.writeJsonField("snapshot", this.snapshot); + jsonWriter.writeJsonField("ransomwareProtection", this.ransomwareProtection); return jsonWriter.writeEndObject(); } @@ -119,6 +149,9 @@ public static VolumePatchPropertiesDataProtection fromJson(JsonReader jsonReader } else if ("snapshot".equals(fieldName)) { deserializedVolumePatchPropertiesDataProtection.snapshot = VolumeSnapshotProperties.fromJson(reader); + } else if ("ransomwareProtection".equals(fieldName)) { + deserializedVolumePatchPropertiesDataProtection.ransomwareProtection + = RansomwareProtectionPatchSettings.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesDataProtection.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesDataProtection.java index 6371c236005b..8567cbf98f32 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesDataProtection.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesDataProtection.java @@ -36,6 +36,11 @@ public final class VolumePropertiesDataProtection implements JsonSerializable { + /** + * 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/java/com/azure/resourcemanager/netapp/models/Volumes.java b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volumes.java index 23ebc1c5ae84..ac96789039a7 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volumes.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volumes.java @@ -761,6 +761,37 @@ void finalizeRelocation(String resourceGroupName, String accountName, String poo void revertRelocation(String resourceGroupName, String accountName, String poolName, String volumeName, Context context); + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ListQuotaReportResponse listQuotaReport(String resourceGroupName, String accountName, String poolName, + String volumeName); + + /** + * A long-running resource action. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName The name of the NetApp account. + * @param poolName The name of the capacity pool. + * @param volumeName The name of the volume. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ListQuotaReportResponse listQuotaReport(String resourceGroupName, String accountName, String poolName, + String volumeName, Context context); + /** * Get the details of the specified volume. * diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/azure-resourcemanager-netapp_apiview_properties.json b/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/azure-resourcemanager-netapp_apiview_properties.json index 27343d5ef010..0fd5f1d7a5e1 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/azure-resourcemanager-netapp_apiview_properties.json +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/azure-resourcemanager-netapp_apiview_properties.json @@ -20,6 +20,17 @@ "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", @@ -63,6 +74,118 @@ "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.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.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.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.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.listByCapacityPools": "Microsoft.NetApp.Caches.listByCapacityPools", + "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.update": "Microsoft.NetApp.Caches.update", + "com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient": "Microsoft.NetApp.ElasticAccounts", + "com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.beginCreateOrUpdate": "Microsoft.NetApp.ElasticAccounts.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.beginDelete": "Microsoft.NetApp.ElasticAccounts.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.beginUpdate": "Microsoft.NetApp.ElasticAccounts.update", + "com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.createOrUpdate": "Microsoft.NetApp.ElasticAccounts.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.delete": "Microsoft.NetApp.ElasticAccounts.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.getByResourceGroup": "Microsoft.NetApp.ElasticAccounts.get", + "com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.getByResourceGroupWithResponse": "Microsoft.NetApp.ElasticAccounts.get", + "com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.list": "Microsoft.NetApp.ElasticAccounts.listBySubscription", + "com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.listByResourceGroup": "Microsoft.NetApp.ElasticAccounts.listByResourceGroup", + "com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.update": "Microsoft.NetApp.ElasticAccounts.update", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient": "Microsoft.NetApp.ElasticBackupPolicies", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.beginCreateOrUpdate": "Microsoft.NetApp.ElasticBackupPolicies.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.beginDelete": "Microsoft.NetApp.ElasticBackupPolicies.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.beginUpdate": "Microsoft.NetApp.ElasticBackupPolicies.update", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.createOrUpdate": "Microsoft.NetApp.ElasticBackupPolicies.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.delete": "Microsoft.NetApp.ElasticBackupPolicies.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.get": "Microsoft.NetApp.ElasticBackupPolicies.get", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.getWithResponse": "Microsoft.NetApp.ElasticBackupPolicies.get", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.listByElasticAccount": "Microsoft.NetApp.ElasticBackupPolicies.listByElasticAccount", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.update": "Microsoft.NetApp.ElasticBackupPolicies.update", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient": "Microsoft.NetApp.ElasticBackupVaults", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.beginCreateOrUpdate": "Microsoft.NetApp.ElasticBackupVaults.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.beginDelete": "Microsoft.NetApp.ElasticBackupVaults.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.beginUpdate": "Microsoft.NetApp.ElasticBackupVaults.update", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.createOrUpdate": "Microsoft.NetApp.ElasticBackupVaults.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.delete": "Microsoft.NetApp.ElasticBackupVaults.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.get": "Microsoft.NetApp.ElasticBackupVaults.get", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.getWithResponse": "Microsoft.NetApp.ElasticBackupVaults.get", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.listByElasticAccount": "Microsoft.NetApp.ElasticBackupVaults.listByElasticAccount", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.update": "Microsoft.NetApp.ElasticBackupVaults.update", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient": "Microsoft.NetApp.ElasticBackups", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.beginCreateOrUpdate": "Microsoft.NetApp.ElasticBackups.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.beginDelete": "Microsoft.NetApp.ElasticBackups.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.beginUpdate": "Microsoft.NetApp.ElasticBackups.update", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.createOrUpdate": "Microsoft.NetApp.ElasticBackups.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.delete": "Microsoft.NetApp.ElasticBackups.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.get": "Microsoft.NetApp.ElasticBackups.get", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.getWithResponse": "Microsoft.NetApp.ElasticBackups.get", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.listByVault": "Microsoft.NetApp.ElasticBackups.listByVault", + "com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.update": "Microsoft.NetApp.ElasticBackups.update", + "com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient": "Microsoft.NetApp.ElasticCapacityPools", + "com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.beginChangeZone": "Microsoft.NetApp.ElasticCapacityPools.changeZone", + "com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.beginCreateOrUpdate": "Microsoft.NetApp.ElasticCapacityPools.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.beginDelete": "Microsoft.NetApp.ElasticCapacityPools.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.beginUpdate": "Microsoft.NetApp.ElasticCapacityPools.update", + "com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.changeZone": "Microsoft.NetApp.ElasticCapacityPools.changeZone", + "com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.checkVolumeFilePathAvailability": "Microsoft.NetApp.ElasticCapacityPools.checkVolumeFilePathAvailability", + "com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.checkVolumeFilePathAvailabilityWithResponse": "Microsoft.NetApp.ElasticCapacityPools.checkVolumeFilePathAvailability", + "com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.createOrUpdate": "Microsoft.NetApp.ElasticCapacityPools.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.delete": "Microsoft.NetApp.ElasticCapacityPools.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.get": "Microsoft.NetApp.ElasticCapacityPools.get", + "com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.getWithResponse": "Microsoft.NetApp.ElasticCapacityPools.get", + "com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.listByElasticAccount": "Microsoft.NetApp.ElasticCapacityPools.listByElasticAccount", + "com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.update": "Microsoft.NetApp.ElasticCapacityPools.update", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient": "Microsoft.NetApp.ElasticSnapshotPolicies", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.beginCreateOrUpdate": "Microsoft.NetApp.ElasticSnapshotPolicies.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.beginDelete": "Microsoft.NetApp.ElasticSnapshotPolicies.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.beginUpdate": "Microsoft.NetApp.ElasticSnapshotPolicies.update", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.createOrUpdate": "Microsoft.NetApp.ElasticSnapshotPolicies.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.delete": "Microsoft.NetApp.ElasticSnapshotPolicies.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.get": "Microsoft.NetApp.ElasticSnapshotPolicies.get", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.getWithResponse": "Microsoft.NetApp.ElasticSnapshotPolicies.get", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.listByElasticAccount": "Microsoft.NetApp.ElasticSnapshotPolicies.listByElasticAccount", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.listElasticVolumes": "Microsoft.NetApp.ElasticSnapshotPolicies.listElasticVolumes", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.update": "Microsoft.NetApp.ElasticSnapshotPolicies.update", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient": "Microsoft.NetApp.ElasticSnapshots", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.beginCreateOrUpdate": "Microsoft.NetApp.ElasticSnapshots.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.beginDelete": "Microsoft.NetApp.ElasticSnapshots.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.createOrUpdate": "Microsoft.NetApp.ElasticSnapshots.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.delete": "Microsoft.NetApp.ElasticSnapshots.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.get": "Microsoft.NetApp.ElasticSnapshots.get", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.getWithResponse": "Microsoft.NetApp.ElasticSnapshots.get", + "com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.listByElasticVolume": "Microsoft.NetApp.ElasticSnapshots.listByElasticVolume", + "com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient": "Microsoft.NetApp.ElasticVolumes", + "com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.beginCreateOrUpdate": "Microsoft.NetApp.ElasticVolumes.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.beginDelete": "Microsoft.NetApp.ElasticVolumes.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.beginRevert": "Microsoft.NetApp.ElasticVolumes.revert", + "com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.beginUpdate": "Microsoft.NetApp.ElasticVolumes.update", + "com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.createOrUpdate": "Microsoft.NetApp.ElasticVolumes.createOrUpdate", + "com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.delete": "Microsoft.NetApp.ElasticVolumes.delete", + "com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.get": "Microsoft.NetApp.ElasticVolumes.get", + "com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.getWithResponse": "Microsoft.NetApp.ElasticVolumes.get", + "com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.listByElasticPool": "Microsoft.NetApp.ElasticVolumes.listByElasticPool", + "com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.revert": "Microsoft.NetApp.ElasticVolumes.revert", + "com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.update": "Microsoft.NetApp.ElasticVolumes.update", "com.azure.resourcemanager.netapp.fluent.NetAppManagementClient": "Microsoft.NetApp", "com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient": "Microsoft.NetApp.NetAppResourceQuotaLimitsAccount", "com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient.get": "Microsoft.NetApp.NetAppResourceQuotaLimitsAccount.get", @@ -105,6 +228,12 @@ "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", @@ -170,6 +299,7 @@ "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", @@ -194,6 +324,7 @@ "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", @@ -211,6 +342,7 @@ "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.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", @@ -219,19 +351,36 @@ "com.azure.resourcemanager.netapp.fluent.models.BackupStatusInner": "Microsoft.NetApp.BackupStatus", "com.azure.resourcemanager.netapp.fluent.models.BackupVaultInner": "Microsoft.NetApp.BackupVault", "com.azure.resourcemanager.netapp.fluent.models.BackupVaultProperties": "Microsoft.NetApp.BackupVaultProperties", + "com.azure.resourcemanager.netapp.fluent.models.BucketGenerateCredentialsInner": "Microsoft.NetApp.BucketGenerateCredentials", + "com.azure.resourcemanager.netapp.fluent.models.BucketInner": "Microsoft.NetApp.Bucket", + "com.azure.resourcemanager.netapp.fluent.models.BucketPatchProperties": "Microsoft.NetApp.BucketPatchProperties", + "com.azure.resourcemanager.netapp.fluent.models.BucketProperties": "Microsoft.NetApp.BucketProperties", + "com.azure.resourcemanager.netapp.fluent.models.CacheInner": "Microsoft.NetApp.Cache", "com.azure.resourcemanager.netapp.fluent.models.CapacityPoolInner": "Microsoft.NetApp.CapacityPool", "com.azure.resourcemanager.netapp.fluent.models.CheckAvailabilityResponseInner": "Microsoft.NetApp.CheckAvailabilityResponse", + "com.azure.resourcemanager.netapp.fluent.models.CheckElasticResourceAvailabilityResponseInner": "Microsoft.NetApp.CheckElasticResourceAvailabilityResponse", "com.azure.resourcemanager.netapp.fluent.models.ClusterPeerCommandResponseInner": "Microsoft.NetApp.ClusterPeerCommandResponse", + "com.azure.resourcemanager.netapp.fluent.models.ElasticAccountInner": "Microsoft.NetApp.ElasticAccount", + "com.azure.resourcemanager.netapp.fluent.models.ElasticBackupInner": "Microsoft.NetApp.ElasticBackup", + "com.azure.resourcemanager.netapp.fluent.models.ElasticBackupPolicyInner": "Microsoft.NetApp.ElasticBackupPolicy", + "com.azure.resourcemanager.netapp.fluent.models.ElasticBackupVaultInner": "Microsoft.NetApp.ElasticBackupVault", + "com.azure.resourcemanager.netapp.fluent.models.ElasticCapacityPoolInner": "Microsoft.NetApp.ElasticCapacityPool", + "com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotInner": "Microsoft.NetApp.ElasticSnapshot", + "com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotPolicyInner": "Microsoft.NetApp.ElasticSnapshotPolicy", + "com.azure.resourcemanager.netapp.fluent.models.ElasticVolumeInner": "Microsoft.NetApp.ElasticVolume", "com.azure.resourcemanager.netapp.fluent.models.GetGroupIdListForLdapUserResponseInner": "Microsoft.NetApp.GetGroupIdListForLdapUserResponse", "com.azure.resourcemanager.netapp.fluent.models.GetKeyVaultStatusResponseInner": "Microsoft.NetApp.GetKeyVaultStatusResponse", "com.azure.resourcemanager.netapp.fluent.models.GetKeyVaultStatusResponseProperties": "Microsoft.NetApp.GetKeyVaultStatusResponseProperties", + "com.azure.resourcemanager.netapp.fluent.models.ListQuotaReportResponseInner": "Microsoft.NetApp.ListQuotaReportResponse", "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", @@ -261,14 +410,27 @@ "com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRuleInner": "Microsoft.NetApp.VolumeQuotaRule", "com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRulesProperties": "Microsoft.NetApp.VolumeQuotaRulesProperties", "com.azure.resourcemanager.netapp.implementation.NetAppManagementClientBuilder": "Microsoft.NetApp", + "com.azure.resourcemanager.netapp.implementation.models.ActiveDirectoryConfigListResult": "Azure.ResourceManager.ResourceListResult", "com.azure.resourcemanager.netapp.implementation.models.BackupPoliciesList": "Microsoft.NetApp.BackupPoliciesList", "com.azure.resourcemanager.netapp.implementation.models.BackupVaultsList": "Microsoft.NetApp.BackupVaultsList", "com.azure.resourcemanager.netapp.implementation.models.BackupsList": "Microsoft.NetApp.BackupsList", + "com.azure.resourcemanager.netapp.implementation.models.BucketList": "Microsoft.NetApp.BucketList", + "com.azure.resourcemanager.netapp.implementation.models.CacheList": "Microsoft.NetApp.CacheList", "com.azure.resourcemanager.netapp.implementation.models.CapacityPoolList": "Microsoft.NetApp.CapacityPoolList", + "com.azure.resourcemanager.netapp.implementation.models.ElasticAccountListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.netapp.implementation.models.ElasticBackupListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.netapp.implementation.models.ElasticBackupPolicyListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.netapp.implementation.models.ElasticBackupVaultListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.netapp.implementation.models.ElasticCapacityPoolListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotPolicyListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotPolicyVolumeList": "Microsoft.NetApp.ElasticSnapshotPolicyVolumeList", + "com.azure.resourcemanager.netapp.implementation.models.ElasticVolumeListResult": "Azure.ResourceManager.ResourceListResult", "com.azure.resourcemanager.netapp.implementation.models.ListReplications": "Microsoft.NetApp.ListReplications", "com.azure.resourcemanager.netapp.implementation.models.NetAppAccountList": "Microsoft.NetApp.NetAppAccountList", "com.azure.resourcemanager.netapp.implementation.models.OperationListResult": "Microsoft.NetApp.OperationListResult", "com.azure.resourcemanager.netapp.implementation.models.QuotaItemList": "Microsoft.NetApp.QuotaItemList", + "com.azure.resourcemanager.netapp.implementation.models.RansomwareReportsList": "Microsoft.NetApp.RansomwareReportsList", "com.azure.resourcemanager.netapp.implementation.models.RegionInfosList": "Microsoft.NetApp.RegionInfosList", "com.azure.resourcemanager.netapp.implementation.models.SnapshotPoliciesList": "Microsoft.NetApp.SnapshotPoliciesList", "com.azure.resourcemanager.netapp.implementation.models.SnapshotsList": "Microsoft.NetApp.SnapshotsList", @@ -280,7 +442,11 @@ "com.azure.resourcemanager.netapp.models.AcceptGrowCapacityPoolForShortTermCloneSplit": "Microsoft.NetApp.AcceptGrowCapacityPoolForShortTermCloneSplit", "com.azure.resourcemanager.netapp.models.AccountEncryption": "Microsoft.NetApp.AccountEncryption", "com.azure.resourcemanager.netapp.models.ActiveDirectory": "Microsoft.NetApp.ActiveDirectory", + "com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigProperties": "Microsoft.NetApp.ActiveDirectoryConfigProperties", + "com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", "com.azure.resourcemanager.netapp.models.ActiveDirectoryStatus": "Microsoft.NetApp.ActiveDirectoryStatus", + "com.azure.resourcemanager.netapp.models.ActualRansomwareProtectionState": "Microsoft.NetApp.ActualRansomwareProtectionState", "com.azure.resourcemanager.netapp.models.ApplicationType": "Microsoft.NetApp.ApplicationType", "com.azure.resourcemanager.netapp.models.AuthorizeRequest": "Microsoft.NetApp.AuthorizeRequest", "com.azure.resourcemanager.netapp.models.AvsDataStore": "Microsoft.NetApp.AvsDataStore", @@ -292,34 +458,112 @@ "com.azure.resourcemanager.netapp.models.BackupsMigrationRequest": "Microsoft.NetApp.BackupsMigrationRequest", "com.azure.resourcemanager.netapp.models.BreakFileLocksRequest": "Microsoft.NetApp.BreakFileLocksRequest", "com.azure.resourcemanager.netapp.models.BreakReplicationRequest": "Microsoft.NetApp.BreakReplicationRequest", + "com.azure.resourcemanager.netapp.models.BreakthroughMode": "Microsoft.NetApp.BreakthroughMode", + "com.azure.resourcemanager.netapp.models.BucketCredentialsExpiry": "Microsoft.NetApp.BucketCredentialsExpiry", + "com.azure.resourcemanager.netapp.models.BucketPatch": "Microsoft.NetApp.BucketPatch", + "com.azure.resourcemanager.netapp.models.BucketPatchPermissions": "Microsoft.NetApp.BucketPatchPermissions", + "com.azure.resourcemanager.netapp.models.BucketPermissions": "Microsoft.NetApp.BucketPermissions", + "com.azure.resourcemanager.netapp.models.BucketServerPatchProperties": "Microsoft.NetApp.BucketServerPatchProperties", + "com.azure.resourcemanager.netapp.models.BucketServerProperties": "Microsoft.NetApp.BucketServerProperties", + "com.azure.resourcemanager.netapp.models.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.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.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.CoolAccessRetrievalPolicy": "Microsoft.NetApp.CoolAccessRetrievalPolicy", "com.azure.resourcemanager.netapp.models.CoolAccessTieringPolicy": "Microsoft.NetApp.CoolAccessTieringPolicy", + "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.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.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.ElasticSnapshotPolicyWeeklySchedule": "Microsoft.NetApp.ElasticSnapshotPolicyWeeklySchedule", + "com.azure.resourcemanager.netapp.models.ElasticSnapshotProperties": "Microsoft.NetApp.ElasticSnapshotProperties", + "com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule": "Microsoft.NetApp.ElasticUnixAccessRule", + "com.azure.resourcemanager.netapp.models.ElasticVolumeBackupProperties": "Microsoft.NetApp.ElasticVolumeBackupProperties", + "com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionPatchProperties": "Microsoft.NetApp.ElasticVolumeDataProtectionPatchProperties", + "com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionProperties": "Microsoft.NetApp.ElasticVolumeDataProtectionProperties", + "com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement": "Microsoft.NetApp.ElasticVolumePolicyEnforcement", + "com.azure.resourcemanager.netapp.models.ElasticVolumeProperties": "Microsoft.NetApp.ElasticVolumeProperties", + "com.azure.resourcemanager.netapp.models.ElasticVolumeRestorationState": "Microsoft.NetApp.ElasticVolumeRestorationState", + "com.azure.resourcemanager.netapp.models.ElasticVolumeRevert": "Microsoft.NetApp.ElasticVolumeRevert", + "com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties": "Microsoft.NetApp.ElasticVolumeSnapshotProperties", + "com.azure.resourcemanager.netapp.models.ElasticVolumeUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "com.azure.resourcemanager.netapp.models.ElasticVolumeUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", "com.azure.resourcemanager.netapp.models.EnableSubvolumes": "Microsoft.NetApp.EnableSubvolumes", + "com.azure.resourcemanager.netapp.models.EnableWriteBackState": "Microsoft.NetApp.EnableWriteBackState", "com.azure.resourcemanager.netapp.models.EncryptionIdentity": "Microsoft.NetApp.EncryptionIdentity", "com.azure.resourcemanager.netapp.models.EncryptionKeySource": "Microsoft.NetApp.EncryptionKeySource", + "com.azure.resourcemanager.netapp.models.EncryptionState": "Microsoft.NetApp.EncryptionState", "com.azure.resourcemanager.netapp.models.EncryptionTransitionRequest": "Microsoft.NetApp.EncryptionTransitionRequest", "com.azure.resourcemanager.netapp.models.EncryptionType": "Microsoft.NetApp.EncryptionType", "com.azure.resourcemanager.netapp.models.EndpointType": "Microsoft.NetApp.EndpointType", "com.azure.resourcemanager.netapp.models.Exclude": "Microsoft.NetApp.Exclude", "com.azure.resourcemanager.netapp.models.ExportPolicyRule": "Microsoft.NetApp.ExportPolicyRule", + "com.azure.resourcemanager.netapp.models.ExternalReplicationSetupStatus": "Microsoft.NetApp.ExternalReplicationSetupStatus", "com.azure.resourcemanager.netapp.models.FileAccessLogs": "Microsoft.NetApp.FileAccessLogs", "com.azure.resourcemanager.netapp.models.FilePathAvailabilityRequest": "Microsoft.NetApp.FilePathAvailabilityRequest", + "com.azure.resourcemanager.netapp.models.FileSystemUser": "Microsoft.NetApp.FileSystemUser", "com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserRequest": "Microsoft.NetApp.GetGroupIdListForLdapUserRequest", + "com.azure.resourcemanager.netapp.models.GlobalFileLockingState": "Microsoft.NetApp.GlobalFileLockingState", "com.azure.resourcemanager.netapp.models.HourlySchedule": "Microsoft.NetApp.HourlySchedule", "com.azure.resourcemanager.netapp.models.InAvailabilityReasonType": "Microsoft.NetApp.InAvailabilityReasonType", + "com.azure.resourcemanager.netapp.models.KerberosState": "Microsoft.NetApp.KerberosState", "com.azure.resourcemanager.netapp.models.KeySource": "Microsoft.NetApp.KeySource", "com.azure.resourcemanager.netapp.models.KeyVaultPrivateEndpoint": "Microsoft.NetApp.KeyVaultPrivateEndpoint", "com.azure.resourcemanager.netapp.models.KeyVaultProperties": "Microsoft.NetApp.KeyVaultProperties", "com.azure.resourcemanager.netapp.models.KeyVaultStatus": "Microsoft.NetApp.KeyVaultStatus", + "com.azure.resourcemanager.netapp.models.LargeVolumeType": "Microsoft.NetApp.LargeVolumeType", + "com.azure.resourcemanager.netapp.models.LdapConfiguration": "Microsoft.NetApp.LdapConfiguration", "com.azure.resourcemanager.netapp.models.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.ListReplicationsRequest": "Microsoft.NetApp.ListReplicationsRequest", "com.azure.resourcemanager.netapp.models.LogSpecification": "Microsoft.NetApp.LogSpecification", "com.azure.resourcemanager.netapp.models.ManagedServiceIdentity": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity", @@ -333,15 +577,28 @@ "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.OperationDisplay": "Microsoft.NetApp.OperationDisplay", + "com.azure.resourcemanager.netapp.models.OriginClusterInformation": "Microsoft.NetApp.OriginClusterInformation", "com.azure.resourcemanager.netapp.models.PeerClusterForVolumeMigrationRequest": "Microsoft.NetApp.PeerClusterForVolumeMigrationRequest", "com.azure.resourcemanager.netapp.models.PlacementKeyValuePairs": "Microsoft.NetApp.PlacementKeyValuePairs", + "com.azure.resourcemanager.netapp.models.PolicyStatus": "Microsoft.NetApp.PolicyStatus", "com.azure.resourcemanager.netapp.models.PoolChangeRequest": "Microsoft.NetApp.PoolChangeRequest", + "com.azure.resourcemanager.netapp.models.ProtocolTypes": "Microsoft.NetApp.ProtocolTypes", "com.azure.resourcemanager.netapp.models.ProvisioningState": "Microsoft.NetApp.NetAppProvisioningState", "com.azure.resourcemanager.netapp.models.QosType": "Microsoft.NetApp.QosType", "com.azure.resourcemanager.netapp.models.QueryNetworkSiblingSetRequest": "Microsoft.NetApp.QueryNetworkSiblingSetRequest", "com.azure.resourcemanager.netapp.models.QuotaAvailabilityRequest": "Microsoft.NetApp.QuotaAvailabilityRequest", + "com.azure.resourcemanager.netapp.models.QuotaReport": "Microsoft.NetApp.QuotaReport", + "com.azure.resourcemanager.netapp.models.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", @@ -352,14 +609,22 @@ "com.azure.resourcemanager.netapp.models.ReplicationSchedule": "Microsoft.NetApp.ReplicationSchedule", "com.azure.resourcemanager.netapp.models.ReplicationType": "Microsoft.NetApp.ReplicationType", "com.azure.resourcemanager.netapp.models.ResourceNameAvailabilityRequest": "Microsoft.NetApp.ResourceNameAvailabilityRequest", + "com.azure.resourcemanager.netapp.models.SecretPassword": "Microsoft.NetApp.SecretPassword", + "com.azure.resourcemanager.netapp.models.SecretPasswordIdentity": "Microsoft.NetApp.SecretPasswordIdentity", + "com.azure.resourcemanager.netapp.models.SecretPasswordKeyVaultProperties": "Microsoft.NetApp.SecretPasswordKeyVaultProperties", "com.azure.resourcemanager.netapp.models.SecurityStyle": "Microsoft.NetApp.SecurityStyle", "com.azure.resourcemanager.netapp.models.ServiceLevel": "Microsoft.NetApp.ServiceLevel", "com.azure.resourcemanager.netapp.models.ServiceSpecification": "Microsoft.NetApp.ServiceSpecification", "com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration": "Microsoft.NetApp.SmbAccessBasedEnumeration", + "com.azure.resourcemanager.netapp.models.SmbEncryptionState": "Microsoft.NetApp.SmbEncryptionState", "com.azure.resourcemanager.netapp.models.SmbNonBrowsable": "Microsoft.NetApp.SmbNonBrowsable", + "com.azure.resourcemanager.netapp.models.SmbSettings": "Microsoft.NetApp.SmbSettings", + "com.azure.resourcemanager.netapp.models.SnapshotDirectoryVisibility": "Microsoft.NetApp.SnapshotDirectoryVisibility", "com.azure.resourcemanager.netapp.models.SnapshotPolicyPatch": "Microsoft.NetApp.SnapshotPolicyPatch", "com.azure.resourcemanager.netapp.models.SnapshotRestoreFiles": "Microsoft.NetApp.SnapshotRestoreFiles", + "com.azure.resourcemanager.netapp.models.SnapshotUsage": "Microsoft.NetApp.SnapshotUsage", "com.azure.resourcemanager.netapp.models.SubvolumePatchRequest": "Microsoft.NetApp.SubvolumePatchRequest", + "com.azure.resourcemanager.netapp.models.SuspectFile": "Microsoft.NetApp.SuspectFile", "com.azure.resourcemanager.netapp.models.Type": "Microsoft.NetApp.Type", "com.azure.resourcemanager.netapp.models.UpdateNetworkSiblingSetRequest": "Microsoft.NetApp.UpdateNetworkSiblingSetRequest", "com.azure.resourcemanager.netapp.models.UsageName": "Microsoft.NetApp.UsageName", @@ -369,6 +634,7 @@ "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", @@ -379,6 +645,7 @@ "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" 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 de5761365dfb..b8e2960cc242 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","apiVersion":"2025-09-01","crossLanguageDefinitions":{"com.azure.resourcemanager.netapp.fluent.AccountsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginChangeKeyVault":"Microsoft.NetApp.NetAppAccounts.changeKeyVault","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginCreateOrUpdate":"Microsoft.NetApp.NetAppAccounts.createOrUpdate","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginDelete":"Microsoft.NetApp.NetAppAccounts.delete","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginGetChangeKeyVaultInformation":"Microsoft.NetApp.NetAppAccounts.getChangeKeyVaultInformation","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginRenewCredentials":"Microsoft.NetApp.NetAppAccounts.renewCredentials","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginTransitionToCmk":"Microsoft.NetApp.NetAppAccounts.transitionToCmk","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginUpdate":"Microsoft.NetApp.NetAppAccounts.update","com.azure.resourcemanager.netapp.fluent.AccountsClient.changeKeyVault":"Microsoft.NetApp.NetAppAccounts.changeKeyVault","com.azure.resourcemanager.netapp.fluent.AccountsClient.createOrUpdate":"Microsoft.NetApp.NetAppAccounts.createOrUpdate","com.azure.resourcemanager.netapp.fluent.AccountsClient.delete":"Microsoft.NetApp.NetAppAccounts.delete","com.azure.resourcemanager.netapp.fluent.AccountsClient.getByResourceGroup":"Microsoft.NetApp.NetAppAccounts.get","com.azure.resourcemanager.netapp.fluent.AccountsClient.getByResourceGroupWithResponse":"Microsoft.NetApp.NetAppAccounts.get","com.azure.resourcemanager.netapp.fluent.AccountsClient.getChangeKeyVaultInformation":"Microsoft.NetApp.NetAppAccounts.getChangeKeyVaultInformation","com.azure.resourcemanager.netapp.fluent.AccountsClient.list":"Microsoft.NetApp.NetAppAccounts.listBySubscription","com.azure.resourcemanager.netapp.fluent.AccountsClient.listByResourceGroup":"Microsoft.NetApp.NetAppAccounts.list","com.azure.resourcemanager.netapp.fluent.AccountsClient.renewCredentials":"Microsoft.NetApp.NetAppAccounts.renewCredentials","com.azure.resourcemanager.netapp.fluent.AccountsClient.transitionToCmk":"Microsoft.NetApp.NetAppAccounts.transitionToCmk","com.azure.resourcemanager.netapp.fluent.AccountsClient.update":"Microsoft.NetApp.NetAppAccounts.update","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient":"Microsoft.NetApp.BackupPolicies","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.beginCreate":"Microsoft.NetApp.BackupPolicies.create","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.beginDelete":"Microsoft.NetApp.BackupPolicies.delete","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.beginUpdate":"Microsoft.NetApp.BackupPolicies.update","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.create":"Microsoft.NetApp.BackupPolicies.create","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.delete":"Microsoft.NetApp.BackupPolicies.delete","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.get":"Microsoft.NetApp.BackupPolicies.get","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.getWithResponse":"Microsoft.NetApp.BackupPolicies.get","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.list":"Microsoft.NetApp.BackupPolicies.list","com.azure.resourcemanager.netapp.fluent.BackupPoliciesClient.update":"Microsoft.NetApp.BackupPolicies.update","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient":"Microsoft.NetApp.BackupVaults","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.beginCreateOrUpdate":"Microsoft.NetApp.BackupVaults.createOrUpdate","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.beginDelete":"Microsoft.NetApp.BackupVaults.delete","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.beginUpdate":"Microsoft.NetApp.BackupVaults.update","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.createOrUpdate":"Microsoft.NetApp.BackupVaults.createOrUpdate","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.delete":"Microsoft.NetApp.BackupVaults.delete","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.get":"Microsoft.NetApp.BackupVaults.get","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.getWithResponse":"Microsoft.NetApp.BackupVaults.get","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.listByNetAppAccount":"Microsoft.NetApp.BackupVaults.listByNetAppAccount","com.azure.resourcemanager.netapp.fluent.BackupVaultsClient.update":"Microsoft.NetApp.BackupVaults.update","com.azure.resourcemanager.netapp.fluent.BackupsClient":"Microsoft.NetApp.Backups","com.azure.resourcemanager.netapp.fluent.BackupsClient.beginCreate":"Microsoft.NetApp.Backups.create","com.azure.resourcemanager.netapp.fluent.BackupsClient.beginDelete":"Microsoft.NetApp.Backups.delete","com.azure.resourcemanager.netapp.fluent.BackupsClient.beginUpdate":"Microsoft.NetApp.Backups.update","com.azure.resourcemanager.netapp.fluent.BackupsClient.create":"Microsoft.NetApp.Backups.create","com.azure.resourcemanager.netapp.fluent.BackupsClient.delete":"Microsoft.NetApp.Backups.delete","com.azure.resourcemanager.netapp.fluent.BackupsClient.get":"Microsoft.NetApp.Backups.get","com.azure.resourcemanager.netapp.fluent.BackupsClient.getLatestStatus":"Microsoft.NetApp.Volumes.getLatestStatus","com.azure.resourcemanager.netapp.fluent.BackupsClient.getLatestStatusWithResponse":"Microsoft.NetApp.Volumes.getLatestStatus","com.azure.resourcemanager.netapp.fluent.BackupsClient.getVolumeLatestRestoreStatus":"Microsoft.NetApp.Volumes.getVolumeLatestRestoreStatus","com.azure.resourcemanager.netapp.fluent.BackupsClient.getVolumeLatestRestoreStatusWithResponse":"Microsoft.NetApp.Volumes.getVolumeLatestRestoreStatus","com.azure.resourcemanager.netapp.fluent.BackupsClient.getWithResponse":"Microsoft.NetApp.Backups.get","com.azure.resourcemanager.netapp.fluent.BackupsClient.listByVault":"Microsoft.NetApp.Backups.listByVault","com.azure.resourcemanager.netapp.fluent.BackupsClient.update":"Microsoft.NetApp.Backups.update","com.azure.resourcemanager.netapp.fluent.BackupsUnderAccountsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.BackupsUnderAccountsClient.beginMigrateBackups":"Microsoft.NetApp.NetAppAccounts.migrateBackups","com.azure.resourcemanager.netapp.fluent.BackupsUnderAccountsClient.migrateBackups":"Microsoft.NetApp.NetAppAccounts.migrateBackups","com.azure.resourcemanager.netapp.fluent.BackupsUnderBackupVaultsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.BackupsUnderBackupVaultsClient.beginRestoreFiles":"Microsoft.NetApp.Backups.restoreFiles","com.azure.resourcemanager.netapp.fluent.BackupsUnderBackupVaultsClient.restoreFiles":"Microsoft.NetApp.Backups.restoreFiles","com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient.beginMigrateBackups":"Microsoft.NetApp.Volumes.migrateBackups","com.azure.resourcemanager.netapp.fluent.BackupsUnderVolumesClient.migrateBackups":"Microsoft.NetApp.Volumes.migrateBackups","com.azure.resourcemanager.netapp.fluent.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.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.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.listReplications":"Microsoft.NetApp.Volumes.listReplications","com.azure.resourcemanager.netapp.fluent.VolumesClient.peerExternalCluster":"Microsoft.NetApp.Volumes.peerExternalCluster","com.azure.resourcemanager.netapp.fluent.VolumesClient.performReplicationTransfer":"Microsoft.NetApp.Volumes.performReplicationTransfer","com.azure.resourcemanager.netapp.fluent.VolumesClient.poolChange":"Microsoft.NetApp.Volumes.poolChange","com.azure.resourcemanager.netapp.fluent.VolumesClient.populateAvailabilityZone":"Microsoft.NetApp.Volumes.populateAvailabilityZone","com.azure.resourcemanager.netapp.fluent.VolumesClient.reInitializeReplication":"Microsoft.NetApp.Volumes.reInitializeReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.reestablishReplication":"Microsoft.NetApp.Volumes.reestablishReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.relocate":"Microsoft.NetApp.Volumes.relocate","com.azure.resourcemanager.netapp.fluent.VolumesClient.replicationStatus":"Microsoft.NetApp.Volumes.replicationStatus","com.azure.resourcemanager.netapp.fluent.VolumesClient.replicationStatusWithResponse":"Microsoft.NetApp.Volumes.replicationStatus","com.azure.resourcemanager.netapp.fluent.VolumesClient.resetCifsPassword":"Microsoft.NetApp.Volumes.resetCifsPassword","com.azure.resourcemanager.netapp.fluent.VolumesClient.resyncReplication":"Microsoft.NetApp.Volumes.resyncReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.revert":"Microsoft.NetApp.Volumes.revert","com.azure.resourcemanager.netapp.fluent.VolumesClient.revertRelocation":"Microsoft.NetApp.Volumes.revertRelocation","com.azure.resourcemanager.netapp.fluent.VolumesClient.splitCloneFromParent":"Microsoft.NetApp.Volumes.splitCloneFromParent","com.azure.resourcemanager.netapp.fluent.VolumesClient.update":"Microsoft.NetApp.Volumes.update","com.azure.resourcemanager.netapp.fluent.models.AccountProperties":"Microsoft.NetApp.AccountProperties","com.azure.resourcemanager.netapp.fluent.models.BackupInner":"Microsoft.NetApp.Backup","com.azure.resourcemanager.netapp.fluent.models.BackupPatchProperties":"Microsoft.NetApp.BackupPatchProperties","com.azure.resourcemanager.netapp.fluent.models.BackupPolicyInner":"Microsoft.NetApp.BackupPolicy","com.azure.resourcemanager.netapp.fluent.models.BackupPolicyProperties":"Microsoft.NetApp.BackupPolicyProperties","com.azure.resourcemanager.netapp.fluent.models.BackupProperties":"Microsoft.NetApp.BackupProperties","com.azure.resourcemanager.netapp.fluent.models.BackupStatusInner":"Microsoft.NetApp.BackupStatus","com.azure.resourcemanager.netapp.fluent.models.BackupVaultInner":"Microsoft.NetApp.BackupVault","com.azure.resourcemanager.netapp.fluent.models.BackupVaultProperties":"Microsoft.NetApp.BackupVaultProperties","com.azure.resourcemanager.netapp.fluent.models.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.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.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.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.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.RegionInfosList":"Microsoft.NetApp.RegionInfosList","com.azure.resourcemanager.netapp.implementation.models.SnapshotPoliciesList":"Microsoft.NetApp.SnapshotPoliciesList","com.azure.resourcemanager.netapp.implementation.models.SnapshotsList":"Microsoft.NetApp.SnapshotsList","com.azure.resourcemanager.netapp.implementation.models.SubvolumesList":"Microsoft.NetApp.SubvolumesList","com.azure.resourcemanager.netapp.implementation.models.UsagesListResult":"Microsoft.NetApp.UsagesListResult","com.azure.resourcemanager.netapp.implementation.models.VolumeGroupList":"Microsoft.NetApp.VolumeGroupList","com.azure.resourcemanager.netapp.implementation.models.VolumeList":"Microsoft.NetApp.VolumeList","com.azure.resourcemanager.netapp.implementation.models.VolumeQuotaRulesList":"Microsoft.NetApp.VolumeQuotaRulesList","com.azure.resourcemanager.netapp.models.AcceptGrowCapacityPoolForShortTermCloneSplit":"Microsoft.NetApp.AcceptGrowCapacityPoolForShortTermCloneSplit","com.azure.resourcemanager.netapp.models.AccountEncryption":"Microsoft.NetApp.AccountEncryption","com.azure.resourcemanager.netapp.models.ActiveDirectory":"Microsoft.NetApp.ActiveDirectory","com.azure.resourcemanager.netapp.models.ActiveDirectoryStatus":"Microsoft.NetApp.ActiveDirectoryStatus","com.azure.resourcemanager.netapp.models.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.BackupPatch":"Microsoft.NetApp.BackupPatch","com.azure.resourcemanager.netapp.models.BackupPolicyPatch":"Microsoft.NetApp.BackupPolicyPatch","com.azure.resourcemanager.netapp.models.BackupRestoreFiles":"Microsoft.NetApp.BackupRestoreFiles","com.azure.resourcemanager.netapp.models.BackupType":"Microsoft.NetApp.BackupType","com.azure.resourcemanager.netapp.models.BackupVaultPatch":"Microsoft.NetApp.BackupVaultPatch","com.azure.resourcemanager.netapp.models.BackupsMigrationRequest":"Microsoft.NetApp.BackupsMigrationRequest","com.azure.resourcemanager.netapp.models.BreakFileLocksRequest":"Microsoft.NetApp.BreakFileLocksRequest","com.azure.resourcemanager.netapp.models.BreakReplicationRequest":"Microsoft.NetApp.BreakReplicationRequest","com.azure.resourcemanager.netapp.models.CapacityPoolPatch":"Microsoft.NetApp.CapacityPoolPatch","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.CoolAccessRetrievalPolicy":"Microsoft.NetApp.CoolAccessRetrievalPolicy","com.azure.resourcemanager.netapp.models.CoolAccessTieringPolicy":"Microsoft.NetApp.CoolAccessTieringPolicy","com.azure.resourcemanager.netapp.models.DailySchedule":"Microsoft.NetApp.DailySchedule","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.EncryptionIdentity":"Microsoft.NetApp.EncryptionIdentity","com.azure.resourcemanager.netapp.models.EncryptionKeySource":"Microsoft.NetApp.EncryptionKeySource","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.FileAccessLogs":"Microsoft.NetApp.FileAccessLogs","com.azure.resourcemanager.netapp.models.FilePathAvailabilityRequest":"Microsoft.NetApp.FilePathAvailabilityRequest","com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserRequest":"Microsoft.NetApp.GetGroupIdListForLdapUserRequest","com.azure.resourcemanager.netapp.models.HourlySchedule":"Microsoft.NetApp.HourlySchedule","com.azure.resourcemanager.netapp.models.InAvailabilityReasonType":"Microsoft.NetApp.InAvailabilityReasonType","com.azure.resourcemanager.netapp.models.KeySource":"Microsoft.NetApp.KeySource","com.azure.resourcemanager.netapp.models.KeyVaultPrivateEndpoint":"Microsoft.NetApp.KeyVaultPrivateEndpoint","com.azure.resourcemanager.netapp.models.KeyVaultProperties":"Microsoft.NetApp.KeyVaultProperties","com.azure.resourcemanager.netapp.models.KeyVaultStatus":"Microsoft.NetApp.KeyVaultStatus","com.azure.resourcemanager.netapp.models.LdapSearchScopeOpt":"Microsoft.NetApp.LdapSearchScopeOpt","com.azure.resourcemanager.netapp.models.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.NicInfo":"Microsoft.NetApp.NicInfo","com.azure.resourcemanager.netapp.models.OperationDisplay":"Microsoft.NetApp.OperationDisplay","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.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.ReestablishReplicationRequest":"Microsoft.NetApp.ReestablishReplicationRequest","com.azure.resourcemanager.netapp.models.RegionInfoAvailabilityZoneMappingsItem":"Microsoft.NetApp.RegionInfoAvailabilityZoneMappingsItem","com.azure.resourcemanager.netapp.models.RegionStorageToNetworkProximity":"Microsoft.NetApp.RegionStorageToNetworkProximity","com.azure.resourcemanager.netapp.models.RelocateVolumeRequest":"Microsoft.NetApp.RelocateVolumeRequest","com.azure.resourcemanager.netapp.models.RemotePath":"Microsoft.NetApp.RemotePath","com.azure.resourcemanager.netapp.models.ReplicationMirrorState":"Microsoft.NetApp.ReplicationMirrorState","com.azure.resourcemanager.netapp.models.ReplicationObject":"Microsoft.NetApp.ReplicationObject","com.azure.resourcemanager.netapp.models.ReplicationSchedule":"Microsoft.NetApp.ReplicationSchedule","com.azure.resourcemanager.netapp.models.ReplicationType":"Microsoft.NetApp.ReplicationType","com.azure.resourcemanager.netapp.models.ResourceNameAvailabilityRequest":"Microsoft.NetApp.ResourceNameAvailabilityRequest","com.azure.resourcemanager.netapp.models.SecurityStyle":"Microsoft.NetApp.SecurityStyle","com.azure.resourcemanager.netapp.models.ServiceLevel":"Microsoft.NetApp.ServiceLevel","com.azure.resourcemanager.netapp.models.ServiceSpecification":"Microsoft.NetApp.ServiceSpecification","com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration":"Microsoft.NetApp.SmbAccessBasedEnumeration","com.azure.resourcemanager.netapp.models.SmbNonBrowsable":"Microsoft.NetApp.SmbNonBrowsable","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.Type":"Microsoft.NetApp.Type","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.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/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/SnapshotPoliciesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/SnapshotsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/SubvolumesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/VolumeGroupsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/VolumeQuotaRulesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/VolumesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupStatusInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/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/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/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/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/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/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/PoolsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsImpl.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/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/RegionInfosList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/SnapshotPoliciesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/SnapshotsList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/SubvolumesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/UsagesListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/VolumeGroupList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/VolumeList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/VolumeQuotaRulesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/package-info.java","src/main/java/com/azure/resourcemanager/netapp/models/AcceptGrowCapacityPoolForShortTermCloneSplit.java","src/main/java/com/azure/resourcemanager/netapp/models/AccountEncryption.java","src/main/java/com/azure/resourcemanager/netapp/models/Accounts.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectory.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/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/Backup.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicies.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicyPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupRestoreFiles.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupType.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupVault.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupVaultPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupVaults.java","src/main/java/com/azure/resourcemanager/netapp/models/Backups.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsMigrationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderAccounts.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderBackupVaults.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderVolumes.java","src/main/java/com/azure/resourcemanager/netapp/models/BreakFileLocksRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/BreakReplicationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/CapacityPool.java","src/main/java/com/azure/resourcemanager/netapp/models/CapacityPoolPatch.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/ClusterPeerCommandResponse.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/DailySchedule.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/EncryptionIdentity.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionKeySource.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/FileAccessLogs.java","src/main/java/com/azure/resourcemanager/netapp/models/FilePathAvailabilityRequest.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/HourlySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/InAvailabilityReasonType.java","src/main/java/com/azure/resourcemanager/netapp/models/KeySource.java","src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultPrivateEndpoint.java","src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/LdapSearchScopeOpt.java","src/main/java/com/azure/resourcemanager/netapp/models/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/NicInfo.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/PeerClusterForVolumeMigrationRequest.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/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/ReestablishReplicationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionInfo.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoAvailabilityZoneMappingsItem.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoResource.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionStorageToNetworkProximity.java","src/main/java/com/azure/resourcemanager/netapp/models/RelocateVolumeRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/RemotePath.java","src/main/java/com/azure/resourcemanager/netapp/models/Replication.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationMirrorState.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationObject.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationSchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationType.java","src/main/java/com/azure/resourcemanager/netapp/models/ResourceNameAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/RestoreStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/SecurityStyle.java","src/main/java/com/azure/resourcemanager/netapp/models/ServiceLevel.java","src/main/java/com/azure/resourcemanager/netapp/models/ServiceSpecification.java","src/main/java/com/azure/resourcemanager/netapp/models/SmbAccessBasedEnumeration.java","src/main/java/com/azure/resourcemanager/netapp/models/SmbNonBrowsable.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/SvmPeerCommandResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/Type.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/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","apiVersion":"2025-09-01-preview","crossLanguageDefinitions":{"com.azure.resourcemanager.netapp.fluent.AccountsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginChangeKeyVault":"Microsoft.NetApp.NetAppAccounts.changeKeyVault","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginCreateOrUpdate":"Microsoft.NetApp.NetAppAccounts.createOrUpdate","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginDelete":"Microsoft.NetApp.NetAppAccounts.delete","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginGetChangeKeyVaultInformation":"Microsoft.NetApp.NetAppAccounts.getChangeKeyVaultInformation","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginRenewCredentials":"Microsoft.NetApp.NetAppAccounts.renewCredentials","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginTransitionToCmk":"Microsoft.NetApp.NetAppAccounts.transitionToCmk","com.azure.resourcemanager.netapp.fluent.AccountsClient.beginUpdate":"Microsoft.NetApp.NetAppAccounts.update","com.azure.resourcemanager.netapp.fluent.AccountsClient.changeKeyVault":"Microsoft.NetApp.NetAppAccounts.changeKeyVault","com.azure.resourcemanager.netapp.fluent.AccountsClient.createOrUpdate":"Microsoft.NetApp.NetAppAccounts.createOrUpdate","com.azure.resourcemanager.netapp.fluent.AccountsClient.delete":"Microsoft.NetApp.NetAppAccounts.delete","com.azure.resourcemanager.netapp.fluent.AccountsClient.getByResourceGroup":"Microsoft.NetApp.NetAppAccounts.get","com.azure.resourcemanager.netapp.fluent.AccountsClient.getByResourceGroupWithResponse":"Microsoft.NetApp.NetAppAccounts.get","com.azure.resourcemanager.netapp.fluent.AccountsClient.getChangeKeyVaultInformation":"Microsoft.NetApp.NetAppAccounts.getChangeKeyVaultInformation","com.azure.resourcemanager.netapp.fluent.AccountsClient.list":"Microsoft.NetApp.NetAppAccounts.listBySubscription","com.azure.resourcemanager.netapp.fluent.AccountsClient.listByResourceGroup":"Microsoft.NetApp.NetAppAccounts.list","com.azure.resourcemanager.netapp.fluent.AccountsClient.renewCredentials":"Microsoft.NetApp.NetAppAccounts.renewCredentials","com.azure.resourcemanager.netapp.fluent.AccountsClient.transitionToCmk":"Microsoft.NetApp.NetAppAccounts.transitionToCmk","com.azure.resourcemanager.netapp.fluent.AccountsClient.update":"Microsoft.NetApp.NetAppAccounts.update","com.azure.resourcemanager.netapp.fluent.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.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.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.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.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.listByCapacityPools":"Microsoft.NetApp.Caches.listByCapacityPools","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.update":"Microsoft.NetApp.Caches.update","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient":"Microsoft.NetApp.ElasticAccounts","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticAccounts.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.beginDelete":"Microsoft.NetApp.ElasticAccounts.delete","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.beginUpdate":"Microsoft.NetApp.ElasticAccounts.update","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.createOrUpdate":"Microsoft.NetApp.ElasticAccounts.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.delete":"Microsoft.NetApp.ElasticAccounts.delete","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.getByResourceGroup":"Microsoft.NetApp.ElasticAccounts.get","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.getByResourceGroupWithResponse":"Microsoft.NetApp.ElasticAccounts.get","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.list":"Microsoft.NetApp.ElasticAccounts.listBySubscription","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.listByResourceGroup":"Microsoft.NetApp.ElasticAccounts.listByResourceGroup","com.azure.resourcemanager.netapp.fluent.ElasticAccountsClient.update":"Microsoft.NetApp.ElasticAccounts.update","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient":"Microsoft.NetApp.ElasticBackupPolicies","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticBackupPolicies.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.beginDelete":"Microsoft.NetApp.ElasticBackupPolicies.delete","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.beginUpdate":"Microsoft.NetApp.ElasticBackupPolicies.update","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.createOrUpdate":"Microsoft.NetApp.ElasticBackupPolicies.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.delete":"Microsoft.NetApp.ElasticBackupPolicies.delete","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.get":"Microsoft.NetApp.ElasticBackupPolicies.get","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.getWithResponse":"Microsoft.NetApp.ElasticBackupPolicies.get","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.listByElasticAccount":"Microsoft.NetApp.ElasticBackupPolicies.listByElasticAccount","com.azure.resourcemanager.netapp.fluent.ElasticBackupPoliciesClient.update":"Microsoft.NetApp.ElasticBackupPolicies.update","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient":"Microsoft.NetApp.ElasticBackupVaults","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticBackupVaults.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.beginDelete":"Microsoft.NetApp.ElasticBackupVaults.delete","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.beginUpdate":"Microsoft.NetApp.ElasticBackupVaults.update","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.createOrUpdate":"Microsoft.NetApp.ElasticBackupVaults.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.delete":"Microsoft.NetApp.ElasticBackupVaults.delete","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.get":"Microsoft.NetApp.ElasticBackupVaults.get","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.getWithResponse":"Microsoft.NetApp.ElasticBackupVaults.get","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.listByElasticAccount":"Microsoft.NetApp.ElasticBackupVaults.listByElasticAccount","com.azure.resourcemanager.netapp.fluent.ElasticBackupVaultsClient.update":"Microsoft.NetApp.ElasticBackupVaults.update","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient":"Microsoft.NetApp.ElasticBackups","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticBackups.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.beginDelete":"Microsoft.NetApp.ElasticBackups.delete","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.beginUpdate":"Microsoft.NetApp.ElasticBackups.update","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.createOrUpdate":"Microsoft.NetApp.ElasticBackups.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.delete":"Microsoft.NetApp.ElasticBackups.delete","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.get":"Microsoft.NetApp.ElasticBackups.get","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.getWithResponse":"Microsoft.NetApp.ElasticBackups.get","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.listByVault":"Microsoft.NetApp.ElasticBackups.listByVault","com.azure.resourcemanager.netapp.fluent.ElasticBackupsClient.update":"Microsoft.NetApp.ElasticBackups.update","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient":"Microsoft.NetApp.ElasticCapacityPools","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.beginChangeZone":"Microsoft.NetApp.ElasticCapacityPools.changeZone","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticCapacityPools.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.beginDelete":"Microsoft.NetApp.ElasticCapacityPools.delete","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.beginUpdate":"Microsoft.NetApp.ElasticCapacityPools.update","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.changeZone":"Microsoft.NetApp.ElasticCapacityPools.changeZone","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.checkVolumeFilePathAvailability":"Microsoft.NetApp.ElasticCapacityPools.checkVolumeFilePathAvailability","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.checkVolumeFilePathAvailabilityWithResponse":"Microsoft.NetApp.ElasticCapacityPools.checkVolumeFilePathAvailability","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.createOrUpdate":"Microsoft.NetApp.ElasticCapacityPools.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.delete":"Microsoft.NetApp.ElasticCapacityPools.delete","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.get":"Microsoft.NetApp.ElasticCapacityPools.get","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.getWithResponse":"Microsoft.NetApp.ElasticCapacityPools.get","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.listByElasticAccount":"Microsoft.NetApp.ElasticCapacityPools.listByElasticAccount","com.azure.resourcemanager.netapp.fluent.ElasticCapacityPoolsClient.update":"Microsoft.NetApp.ElasticCapacityPools.update","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient":"Microsoft.NetApp.ElasticSnapshotPolicies","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticSnapshotPolicies.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.beginDelete":"Microsoft.NetApp.ElasticSnapshotPolicies.delete","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.beginUpdate":"Microsoft.NetApp.ElasticSnapshotPolicies.update","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.createOrUpdate":"Microsoft.NetApp.ElasticSnapshotPolicies.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.delete":"Microsoft.NetApp.ElasticSnapshotPolicies.delete","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.get":"Microsoft.NetApp.ElasticSnapshotPolicies.get","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.getWithResponse":"Microsoft.NetApp.ElasticSnapshotPolicies.get","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.listByElasticAccount":"Microsoft.NetApp.ElasticSnapshotPolicies.listByElasticAccount","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.listElasticVolumes":"Microsoft.NetApp.ElasticSnapshotPolicies.listElasticVolumes","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotPoliciesClient.update":"Microsoft.NetApp.ElasticSnapshotPolicies.update","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient":"Microsoft.NetApp.ElasticSnapshots","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticSnapshots.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.beginDelete":"Microsoft.NetApp.ElasticSnapshots.delete","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.createOrUpdate":"Microsoft.NetApp.ElasticSnapshots.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.delete":"Microsoft.NetApp.ElasticSnapshots.delete","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.get":"Microsoft.NetApp.ElasticSnapshots.get","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.getWithResponse":"Microsoft.NetApp.ElasticSnapshots.get","com.azure.resourcemanager.netapp.fluent.ElasticSnapshotsClient.listByElasticVolume":"Microsoft.NetApp.ElasticSnapshots.listByElasticVolume","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient":"Microsoft.NetApp.ElasticVolumes","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.beginCreateOrUpdate":"Microsoft.NetApp.ElasticVolumes.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.beginDelete":"Microsoft.NetApp.ElasticVolumes.delete","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.beginRevert":"Microsoft.NetApp.ElasticVolumes.revert","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.beginUpdate":"Microsoft.NetApp.ElasticVolumes.update","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.createOrUpdate":"Microsoft.NetApp.ElasticVolumes.createOrUpdate","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.delete":"Microsoft.NetApp.ElasticVolumes.delete","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.get":"Microsoft.NetApp.ElasticVolumes.get","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.getWithResponse":"Microsoft.NetApp.ElasticVolumes.get","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.listByElasticPool":"Microsoft.NetApp.ElasticVolumes.listByElasticPool","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.revert":"Microsoft.NetApp.ElasticVolumes.revert","com.azure.resourcemanager.netapp.fluent.ElasticVolumesClient.update":"Microsoft.NetApp.ElasticVolumes.update","com.azure.resourcemanager.netapp.fluent.NetAppManagementClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient":"Microsoft.NetApp.NetAppResourceQuotaLimitsAccount","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient.get":"Microsoft.NetApp.NetAppResourceQuotaLimitsAccount.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient.getWithResponse":"Microsoft.NetApp.NetAppResourceQuotaLimitsAccount.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsAccountsClient.list":"Microsoft.NetApp.NetAppResourceQuotaLimitsAccount.list","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient.get":"Microsoft.NetApp.SubscriptionQuotaItems.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient.getWithResponse":"Microsoft.NetApp.SubscriptionQuotaItems.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceQuotaLimitsClient.list":"Microsoft.NetApp.SubscriptionQuotaItems.list","com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient.get":"Microsoft.NetApp.RegionInfoResources.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient.getWithResponse":"Microsoft.NetApp.RegionInfoResources.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceRegionInfosClient.list":"Microsoft.NetApp.RegionInfoResources.list","com.azure.resourcemanager.netapp.fluent.NetAppResourceUsagesClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourceUsagesClient.get":"Microsoft.NetApp.NetAppResourceUsagesOperationGroup.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceUsagesClient.getWithResponse":"Microsoft.NetApp.NetAppResourceUsagesOperationGroup.get","com.azure.resourcemanager.netapp.fluent.NetAppResourceUsagesClient.list":"Microsoft.NetApp.NetAppResourceUsagesOperationGroup.list","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.beginUpdateNetworkSiblingSet":"Microsoft.NetApp.NetAppResourceOperationGroup.updateNetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkFilePathAvailability":"Microsoft.NetApp.NetAppResourceOperationGroup.checkFilePathAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkFilePathAvailabilityWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.checkFilePathAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkNameAvailability":"Microsoft.NetApp.NetAppResourceOperationGroup.checkNameAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkNameAvailabilityWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.checkNameAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkQuotaAvailability":"Microsoft.NetApp.NetAppResourceOperationGroup.checkQuotaAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.checkQuotaAvailabilityWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.checkQuotaAvailability","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.queryNetworkSiblingSet":"Microsoft.NetApp.NetAppResourceOperationGroup.queryNetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.queryNetworkSiblingSetWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.queryNetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.queryRegionInfo":"Microsoft.NetApp.NetAppResourceOperationGroup.queryRegionInfo","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.queryRegionInfoWithResponse":"Microsoft.NetApp.NetAppResourceOperationGroup.queryRegionInfo","com.azure.resourcemanager.netapp.fluent.NetAppResourcesClient.updateNetworkSiblingSet":"Microsoft.NetApp.NetAppResourceOperationGroup.updateNetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.OperationsClient":"Microsoft.NetApp.Operations","com.azure.resourcemanager.netapp.fluent.OperationsClient.list":"Azure.ResourceManager.Legacy.Operations.list","com.azure.resourcemanager.netapp.fluent.PoolsClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.PoolsClient.beginCreateOrUpdate":"Microsoft.NetApp.CapacityPools.createOrUpdate","com.azure.resourcemanager.netapp.fluent.PoolsClient.beginDelete":"Microsoft.NetApp.CapacityPools.delete","com.azure.resourcemanager.netapp.fluent.PoolsClient.beginUpdate":"Microsoft.NetApp.CapacityPools.update","com.azure.resourcemanager.netapp.fluent.PoolsClient.createOrUpdate":"Microsoft.NetApp.CapacityPools.createOrUpdate","com.azure.resourcemanager.netapp.fluent.PoolsClient.delete":"Microsoft.NetApp.CapacityPools.delete","com.azure.resourcemanager.netapp.fluent.PoolsClient.get":"Microsoft.NetApp.CapacityPools.get","com.azure.resourcemanager.netapp.fluent.PoolsClient.getWithResponse":"Microsoft.NetApp.CapacityPools.get","com.azure.resourcemanager.netapp.fluent.PoolsClient.list":"Microsoft.NetApp.CapacityPools.list","com.azure.resourcemanager.netapp.fluent.PoolsClient.update":"Microsoft.NetApp.CapacityPools.update","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient":"Microsoft.NetApp.RansomwareReports","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.beginClearSuspects":"Microsoft.NetApp.RansomwareReports.clearSuspects","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.clearSuspects":"Microsoft.NetApp.RansomwareReports.clearSuspects","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.get":"Microsoft.NetApp.RansomwareReports.get","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.getWithResponse":"Microsoft.NetApp.RansomwareReports.get","com.azure.resourcemanager.netapp.fluent.RansomwareReportsClient.list":"Microsoft.NetApp.RansomwareReports.list","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient":"Microsoft.NetApp.SnapshotPolicies","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.beginDelete":"Microsoft.NetApp.SnapshotPolicies.delete","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.beginUpdate":"Microsoft.NetApp.SnapshotPolicies.update","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.create":"Microsoft.NetApp.SnapshotPolicies.create","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.createWithResponse":"Microsoft.NetApp.SnapshotPolicies.create","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.delete":"Microsoft.NetApp.SnapshotPolicies.delete","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.get":"Microsoft.NetApp.SnapshotPolicies.get","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.getWithResponse":"Microsoft.NetApp.SnapshotPolicies.get","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.list":"Microsoft.NetApp.SnapshotPolicies.list","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.listVolumes":"Microsoft.NetApp.SnapshotPolicies.listVolumes","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.listVolumesWithResponse":"Microsoft.NetApp.SnapshotPolicies.listVolumes","com.azure.resourcemanager.netapp.fluent.SnapshotPoliciesClient.update":"Microsoft.NetApp.SnapshotPolicies.update","com.azure.resourcemanager.netapp.fluent.SnapshotsClient":"Microsoft.NetApp.Snapshots","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.beginCreate":"Microsoft.NetApp.Snapshots.create","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.beginDelete":"Microsoft.NetApp.Snapshots.delete","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.beginRestoreFiles":"Microsoft.NetApp.Snapshots.restoreFiles","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.create":"Microsoft.NetApp.Snapshots.create","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.delete":"Microsoft.NetApp.Snapshots.delete","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.get":"Microsoft.NetApp.Snapshots.get","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.getWithResponse":"Microsoft.NetApp.Snapshots.get","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.list":"Microsoft.NetApp.Snapshots.list","com.azure.resourcemanager.netapp.fluent.SnapshotsClient.restoreFiles":"Microsoft.NetApp.Snapshots.restoreFiles","com.azure.resourcemanager.netapp.fluent.SubvolumesClient":"Microsoft.NetApp","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.beginCreate":"Microsoft.NetApp.SubvolumeInfos.create","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.beginDelete":"Microsoft.NetApp.SubvolumeInfos.delete","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.beginGetMetadata":"Microsoft.NetApp.SubvolumeInfos.getMetadata","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.beginUpdate":"Microsoft.NetApp.SubvolumeInfos.update","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.create":"Microsoft.NetApp.SubvolumeInfos.create","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.delete":"Microsoft.NetApp.SubvolumeInfos.delete","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.get":"Microsoft.NetApp.SubvolumeInfos.get","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.getMetadata":"Microsoft.NetApp.SubvolumeInfos.getMetadata","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.getWithResponse":"Microsoft.NetApp.SubvolumeInfos.get","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.listByVolume":"Microsoft.NetApp.SubvolumeInfos.listByVolume","com.azure.resourcemanager.netapp.fluent.SubvolumesClient.update":"Microsoft.NetApp.SubvolumeInfos.update","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient":"Microsoft.NetApp.VolumeGroups","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.beginCreate":"Microsoft.NetApp.VolumeGroups.create","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.beginDelete":"Microsoft.NetApp.VolumeGroups.delete","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.create":"Microsoft.NetApp.VolumeGroups.create","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.delete":"Microsoft.NetApp.VolumeGroups.delete","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.get":"Microsoft.NetApp.VolumeGroups.get","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.getWithResponse":"Microsoft.NetApp.VolumeGroups.get","com.azure.resourcemanager.netapp.fluent.VolumeGroupsClient.listByNetAppAccount":"Microsoft.NetApp.NetAppAccounts.listByNetAppAccount","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient":"Microsoft.NetApp.VolumeQuotaRules","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.beginCreate":"Microsoft.NetApp.VolumeQuotaRules.create","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.beginDelete":"Microsoft.NetApp.VolumeQuotaRules.delete","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.beginUpdate":"Microsoft.NetApp.VolumeQuotaRules.update","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.create":"Microsoft.NetApp.VolumeQuotaRules.create","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.delete":"Microsoft.NetApp.VolumeQuotaRules.delete","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.get":"Microsoft.NetApp.VolumeQuotaRules.get","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.getWithResponse":"Microsoft.NetApp.VolumeQuotaRules.get","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.listByVolume":"Microsoft.NetApp.VolumeQuotaRules.listByVolume","com.azure.resourcemanager.netapp.fluent.VolumeQuotaRulesClient.update":"Microsoft.NetApp.VolumeQuotaRules.update","com.azure.resourcemanager.netapp.fluent.VolumesClient":"Microsoft.NetApp.Volumes","com.azure.resourcemanager.netapp.fluent.VolumesClient.authorizeExternalReplication":"Microsoft.NetApp.Volumes.authorizeExternalReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.authorizeReplication":"Microsoft.NetApp.Volumes.authorizeReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginAuthorizeExternalReplication":"Microsoft.NetApp.Volumes.authorizeExternalReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginAuthorizeReplication":"Microsoft.NetApp.Volumes.authorizeReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginBreakFileLocks":"Microsoft.NetApp.Volumes.breakFileLocks","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginBreakReplication":"Microsoft.NetApp.Volumes.breakReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginCreateOrUpdate":"Microsoft.NetApp.Volumes.createOrUpdate","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginDelete":"Microsoft.NetApp.Volumes.delete","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginDeleteReplication":"Microsoft.NetApp.Volumes.deleteReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginFinalizeExternalReplication":"Microsoft.NetApp.Volumes.finalizeExternalReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginFinalizeRelocation":"Microsoft.NetApp.Volumes.finalizeRelocation","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginListGetGroupIdListForLdapUser":"Microsoft.NetApp.Volumes.listGetGroupIdListForLdapUser","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginListQuotaReport":"Microsoft.NetApp.Volumes.listQuotaReport","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPeerExternalCluster":"Microsoft.NetApp.Volumes.peerExternalCluster","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPerformReplicationTransfer":"Microsoft.NetApp.Volumes.performReplicationTransfer","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPoolChange":"Microsoft.NetApp.Volumes.poolChange","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginPopulateAvailabilityZone":"Microsoft.NetApp.Volumes.populateAvailabilityZone","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginReInitializeReplication":"Microsoft.NetApp.Volumes.reInitializeReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginReestablishReplication":"Microsoft.NetApp.Volumes.reestablishReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginRelocate":"Microsoft.NetApp.Volumes.relocate","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginResetCifsPassword":"Microsoft.NetApp.Volumes.resetCifsPassword","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginResyncReplication":"Microsoft.NetApp.Volumes.resyncReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginRevert":"Microsoft.NetApp.Volumes.revert","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginRevertRelocation":"Microsoft.NetApp.Volumes.revertRelocation","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginSplitCloneFromParent":"Microsoft.NetApp.Volumes.splitCloneFromParent","com.azure.resourcemanager.netapp.fluent.VolumesClient.beginUpdate":"Microsoft.NetApp.Volumes.update","com.azure.resourcemanager.netapp.fluent.VolumesClient.breakFileLocks":"Microsoft.NetApp.Volumes.breakFileLocks","com.azure.resourcemanager.netapp.fluent.VolumesClient.breakReplication":"Microsoft.NetApp.Volumes.breakReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.createOrUpdate":"Microsoft.NetApp.Volumes.createOrUpdate","com.azure.resourcemanager.netapp.fluent.VolumesClient.delete":"Microsoft.NetApp.Volumes.delete","com.azure.resourcemanager.netapp.fluent.VolumesClient.deleteReplication":"Microsoft.NetApp.Volumes.deleteReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.finalizeExternalReplication":"Microsoft.NetApp.Volumes.finalizeExternalReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.finalizeRelocation":"Microsoft.NetApp.Volumes.finalizeRelocation","com.azure.resourcemanager.netapp.fluent.VolumesClient.get":"Microsoft.NetApp.Volumes.get","com.azure.resourcemanager.netapp.fluent.VolumesClient.getWithResponse":"Microsoft.NetApp.Volumes.get","com.azure.resourcemanager.netapp.fluent.VolumesClient.list":"Microsoft.NetApp.Volumes.list","com.azure.resourcemanager.netapp.fluent.VolumesClient.listGetGroupIdListForLdapUser":"Microsoft.NetApp.Volumes.listGetGroupIdListForLdapUser","com.azure.resourcemanager.netapp.fluent.VolumesClient.listQuotaReport":"Microsoft.NetApp.Volumes.listQuotaReport","com.azure.resourcemanager.netapp.fluent.VolumesClient.listReplications":"Microsoft.NetApp.Volumes.listReplications","com.azure.resourcemanager.netapp.fluent.VolumesClient.peerExternalCluster":"Microsoft.NetApp.Volumes.peerExternalCluster","com.azure.resourcemanager.netapp.fluent.VolumesClient.performReplicationTransfer":"Microsoft.NetApp.Volumes.performReplicationTransfer","com.azure.resourcemanager.netapp.fluent.VolumesClient.poolChange":"Microsoft.NetApp.Volumes.poolChange","com.azure.resourcemanager.netapp.fluent.VolumesClient.populateAvailabilityZone":"Microsoft.NetApp.Volumes.populateAvailabilityZone","com.azure.resourcemanager.netapp.fluent.VolumesClient.reInitializeReplication":"Microsoft.NetApp.Volumes.reInitializeReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.reestablishReplication":"Microsoft.NetApp.Volumes.reestablishReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.relocate":"Microsoft.NetApp.Volumes.relocate","com.azure.resourcemanager.netapp.fluent.VolumesClient.replicationStatus":"Microsoft.NetApp.Volumes.replicationStatus","com.azure.resourcemanager.netapp.fluent.VolumesClient.replicationStatusWithResponse":"Microsoft.NetApp.Volumes.replicationStatus","com.azure.resourcemanager.netapp.fluent.VolumesClient.resetCifsPassword":"Microsoft.NetApp.Volumes.resetCifsPassword","com.azure.resourcemanager.netapp.fluent.VolumesClient.resyncReplication":"Microsoft.NetApp.Volumes.resyncReplication","com.azure.resourcemanager.netapp.fluent.VolumesClient.revert":"Microsoft.NetApp.Volumes.revert","com.azure.resourcemanager.netapp.fluent.VolumesClient.revertRelocation":"Microsoft.NetApp.Volumes.revertRelocation","com.azure.resourcemanager.netapp.fluent.VolumesClient.splitCloneFromParent":"Microsoft.NetApp.Volumes.splitCloneFromParent","com.azure.resourcemanager.netapp.fluent.VolumesClient.update":"Microsoft.NetApp.Volumes.update","com.azure.resourcemanager.netapp.fluent.models.AccountProperties":"Microsoft.NetApp.AccountProperties","com.azure.resourcemanager.netapp.fluent.models.ActiveDirectoryConfigInner":"Microsoft.NetApp.ActiveDirectoryConfig","com.azure.resourcemanager.netapp.fluent.models.BackupInner":"Microsoft.NetApp.Backup","com.azure.resourcemanager.netapp.fluent.models.BackupPatchProperties":"Microsoft.NetApp.BackupPatchProperties","com.azure.resourcemanager.netapp.fluent.models.BackupPolicyInner":"Microsoft.NetApp.BackupPolicy","com.azure.resourcemanager.netapp.fluent.models.BackupPolicyProperties":"Microsoft.NetApp.BackupPolicyProperties","com.azure.resourcemanager.netapp.fluent.models.BackupProperties":"Microsoft.NetApp.BackupProperties","com.azure.resourcemanager.netapp.fluent.models.BackupStatusInner":"Microsoft.NetApp.BackupStatus","com.azure.resourcemanager.netapp.fluent.models.BackupVaultInner":"Microsoft.NetApp.BackupVault","com.azure.resourcemanager.netapp.fluent.models.BackupVaultProperties":"Microsoft.NetApp.BackupVaultProperties","com.azure.resourcemanager.netapp.fluent.models.BucketGenerateCredentialsInner":"Microsoft.NetApp.BucketGenerateCredentials","com.azure.resourcemanager.netapp.fluent.models.BucketInner":"Microsoft.NetApp.Bucket","com.azure.resourcemanager.netapp.fluent.models.BucketPatchProperties":"Microsoft.NetApp.BucketPatchProperties","com.azure.resourcemanager.netapp.fluent.models.BucketProperties":"Microsoft.NetApp.BucketProperties","com.azure.resourcemanager.netapp.fluent.models.CacheInner":"Microsoft.NetApp.Cache","com.azure.resourcemanager.netapp.fluent.models.CapacityPoolInner":"Microsoft.NetApp.CapacityPool","com.azure.resourcemanager.netapp.fluent.models.CheckAvailabilityResponseInner":"Microsoft.NetApp.CheckAvailabilityResponse","com.azure.resourcemanager.netapp.fluent.models.CheckElasticResourceAvailabilityResponseInner":"Microsoft.NetApp.CheckElasticResourceAvailabilityResponse","com.azure.resourcemanager.netapp.fluent.models.ClusterPeerCommandResponseInner":"Microsoft.NetApp.ClusterPeerCommandResponse","com.azure.resourcemanager.netapp.fluent.models.ElasticAccountInner":"Microsoft.NetApp.ElasticAccount","com.azure.resourcemanager.netapp.fluent.models.ElasticBackupInner":"Microsoft.NetApp.ElasticBackup","com.azure.resourcemanager.netapp.fluent.models.ElasticBackupPolicyInner":"Microsoft.NetApp.ElasticBackupPolicy","com.azure.resourcemanager.netapp.fluent.models.ElasticBackupVaultInner":"Microsoft.NetApp.ElasticBackupVault","com.azure.resourcemanager.netapp.fluent.models.ElasticCapacityPoolInner":"Microsoft.NetApp.ElasticCapacityPool","com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotInner":"Microsoft.NetApp.ElasticSnapshot","com.azure.resourcemanager.netapp.fluent.models.ElasticSnapshotPolicyInner":"Microsoft.NetApp.ElasticSnapshotPolicy","com.azure.resourcemanager.netapp.fluent.models.ElasticVolumeInner":"Microsoft.NetApp.ElasticVolume","com.azure.resourcemanager.netapp.fluent.models.GetGroupIdListForLdapUserResponseInner":"Microsoft.NetApp.GetGroupIdListForLdapUserResponse","com.azure.resourcemanager.netapp.fluent.models.GetKeyVaultStatusResponseInner":"Microsoft.NetApp.GetKeyVaultStatusResponse","com.azure.resourcemanager.netapp.fluent.models.GetKeyVaultStatusResponseProperties":"Microsoft.NetApp.GetKeyVaultStatusResponseProperties","com.azure.resourcemanager.netapp.fluent.models.ListQuotaReportResponseInner":"Microsoft.NetApp.ListQuotaReportResponse","com.azure.resourcemanager.netapp.fluent.models.NetAppAccountInner":"Microsoft.NetApp.NetAppAccount","com.azure.resourcemanager.netapp.fluent.models.NetworkSiblingSetInner":"Microsoft.NetApp.NetworkSiblingSet","com.azure.resourcemanager.netapp.fluent.models.OperationInner":"Microsoft.NetApp.Operation","com.azure.resourcemanager.netapp.fluent.models.OperationProperties":"Microsoft.NetApp.OperationProperties","com.azure.resourcemanager.netapp.fluent.models.PeeringPassphrasesInner":"Microsoft.NetApp.PeeringPassphrases","com.azure.resourcemanager.netapp.fluent.models.PoolPatchProperties":"Microsoft.NetApp.PoolPatchProperties","com.azure.resourcemanager.netapp.fluent.models.PoolProperties":"Microsoft.NetApp.PoolProperties","com.azure.resourcemanager.netapp.fluent.models.QuotaItemProperties":"Microsoft.NetApp.QuotaItemProperties","com.azure.resourcemanager.netapp.fluent.models.RansomwareReportInner":"Microsoft.NetApp.RansomwareReport","com.azure.resourcemanager.netapp.fluent.models.RegionInfoInner":"Microsoft.NetApp.RegionInfo","com.azure.resourcemanager.netapp.fluent.models.RegionInfoResourceInner":"Microsoft.NetApp.RegionInfoResource","com.azure.resourcemanager.netapp.fluent.models.ReplicationInner":"Microsoft.NetApp.Replication","com.azure.resourcemanager.netapp.fluent.models.ReplicationStatusInner":"Microsoft.NetApp.ReplicationStatus","com.azure.resourcemanager.netapp.fluent.models.RestoreStatusInner":"Microsoft.NetApp.RestoreStatus","com.azure.resourcemanager.netapp.fluent.models.SnapshotInner":"Microsoft.NetApp.Snapshot","com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyInner":"Microsoft.NetApp.SnapshotPolicy","com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyProperties":"Microsoft.NetApp.SnapshotPolicyProperties","com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyVolumeListInner":"Microsoft.NetApp.SnapshotPolicyVolumeList","com.azure.resourcemanager.netapp.fluent.models.SnapshotProperties":"Microsoft.NetApp.SnapshotProperties","com.azure.resourcemanager.netapp.fluent.models.SubscriptionQuotaItemInner":"Microsoft.NetApp.QuotaItem","com.azure.resourcemanager.netapp.fluent.models.SubvolumeInfoInner":"Microsoft.NetApp.SubvolumeInfo","com.azure.resourcemanager.netapp.fluent.models.SubvolumeModelInner":"Microsoft.NetApp.SubvolumeModel","com.azure.resourcemanager.netapp.fluent.models.SubvolumeModelProperties":"Microsoft.NetApp.SubvolumeModelProperties","com.azure.resourcemanager.netapp.fluent.models.SubvolumePatchParams":"Microsoft.NetApp.SubvolumePatchParams","com.azure.resourcemanager.netapp.fluent.models.SubvolumeProperties":"Microsoft.NetApp.SubvolumeProperties","com.azure.resourcemanager.netapp.fluent.models.SvmPeerCommandResponseInner":"Microsoft.NetApp.SvmPeerCommandResponse","com.azure.resourcemanager.netapp.fluent.models.UsageProperties":"Microsoft.NetApp.UsageProperties","com.azure.resourcemanager.netapp.fluent.models.UsageResultInner":"Microsoft.NetApp.UsageResult","com.azure.resourcemanager.netapp.fluent.models.VolumeGroupDetailsInner":"Microsoft.NetApp.VolumeGroupDetails","com.azure.resourcemanager.netapp.fluent.models.VolumeGroupInner":"Microsoft.NetApp.VolumeGroup","com.azure.resourcemanager.netapp.fluent.models.VolumeGroupListProperties":"Microsoft.NetApp.VolumeGroupListProperties","com.azure.resourcemanager.netapp.fluent.models.VolumeGroupProperties":"Microsoft.NetApp.VolumeGroupProperties","com.azure.resourcemanager.netapp.fluent.models.VolumeInner":"Microsoft.NetApp.Volume","com.azure.resourcemanager.netapp.fluent.models.VolumePatchProperties":"Microsoft.NetApp.VolumePatchProperties","com.azure.resourcemanager.netapp.fluent.models.VolumeProperties":"Microsoft.NetApp.VolumeProperties","com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRuleInner":"Microsoft.NetApp.VolumeQuotaRule","com.azure.resourcemanager.netapp.fluent.models.VolumeQuotaRulesProperties":"Microsoft.NetApp.VolumeQuotaRulesProperties","com.azure.resourcemanager.netapp.implementation.NetAppManagementClientBuilder":"Microsoft.NetApp","com.azure.resourcemanager.netapp.implementation.models.ActiveDirectoryConfigListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.BackupPoliciesList":"Microsoft.NetApp.BackupPoliciesList","com.azure.resourcemanager.netapp.implementation.models.BackupVaultsList":"Microsoft.NetApp.BackupVaultsList","com.azure.resourcemanager.netapp.implementation.models.BackupsList":"Microsoft.NetApp.BackupsList","com.azure.resourcemanager.netapp.implementation.models.BucketList":"Microsoft.NetApp.BucketList","com.azure.resourcemanager.netapp.implementation.models.CacheList":"Microsoft.NetApp.CacheList","com.azure.resourcemanager.netapp.implementation.models.CapacityPoolList":"Microsoft.NetApp.CapacityPoolList","com.azure.resourcemanager.netapp.implementation.models.ElasticAccountListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticBackupListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticBackupPolicyListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticBackupVaultListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticCapacityPoolListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotPolicyListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ElasticSnapshotPolicyVolumeList":"Microsoft.NetApp.ElasticSnapshotPolicyVolumeList","com.azure.resourcemanager.netapp.implementation.models.ElasticVolumeListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.netapp.implementation.models.ListReplications":"Microsoft.NetApp.ListReplications","com.azure.resourcemanager.netapp.implementation.models.NetAppAccountList":"Microsoft.NetApp.NetAppAccountList","com.azure.resourcemanager.netapp.implementation.models.OperationListResult":"Microsoft.NetApp.OperationListResult","com.azure.resourcemanager.netapp.implementation.models.QuotaItemList":"Microsoft.NetApp.QuotaItemList","com.azure.resourcemanager.netapp.implementation.models.RansomwareReportsList":"Microsoft.NetApp.RansomwareReportsList","com.azure.resourcemanager.netapp.implementation.models.RegionInfosList":"Microsoft.NetApp.RegionInfosList","com.azure.resourcemanager.netapp.implementation.models.SnapshotPoliciesList":"Microsoft.NetApp.SnapshotPoliciesList","com.azure.resourcemanager.netapp.implementation.models.SnapshotsList":"Microsoft.NetApp.SnapshotsList","com.azure.resourcemanager.netapp.implementation.models.SubvolumesList":"Microsoft.NetApp.SubvolumesList","com.azure.resourcemanager.netapp.implementation.models.UsagesListResult":"Microsoft.NetApp.UsagesListResult","com.azure.resourcemanager.netapp.implementation.models.VolumeGroupList":"Microsoft.NetApp.VolumeGroupList","com.azure.resourcemanager.netapp.implementation.models.VolumeList":"Microsoft.NetApp.VolumeList","com.azure.resourcemanager.netapp.implementation.models.VolumeQuotaRulesList":"Microsoft.NetApp.VolumeQuotaRulesList","com.azure.resourcemanager.netapp.models.AcceptGrowCapacityPoolForShortTermCloneSplit":"Microsoft.NetApp.AcceptGrowCapacityPoolForShortTermCloneSplit","com.azure.resourcemanager.netapp.models.AccountEncryption":"Microsoft.NetApp.AccountEncryption","com.azure.resourcemanager.netapp.models.ActiveDirectory":"Microsoft.NetApp.ActiveDirectory","com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigProperties":"Microsoft.NetApp.ActiveDirectoryConfigProperties","com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ActiveDirectoryConfigUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.ActiveDirectoryStatus":"Microsoft.NetApp.ActiveDirectoryStatus","com.azure.resourcemanager.netapp.models.ActualRansomwareProtectionState":"Microsoft.NetApp.ActualRansomwareProtectionState","com.azure.resourcemanager.netapp.models.ApplicationType":"Microsoft.NetApp.ApplicationType","com.azure.resourcemanager.netapp.models.AuthorizeRequest":"Microsoft.NetApp.AuthorizeRequest","com.azure.resourcemanager.netapp.models.AvsDataStore":"Microsoft.NetApp.AvsDataStore","com.azure.resourcemanager.netapp.models.BackupPatch":"Microsoft.NetApp.BackupPatch","com.azure.resourcemanager.netapp.models.BackupPolicyPatch":"Microsoft.NetApp.BackupPolicyPatch","com.azure.resourcemanager.netapp.models.BackupRestoreFiles":"Microsoft.NetApp.BackupRestoreFiles","com.azure.resourcemanager.netapp.models.BackupType":"Microsoft.NetApp.BackupType","com.azure.resourcemanager.netapp.models.BackupVaultPatch":"Microsoft.NetApp.BackupVaultPatch","com.azure.resourcemanager.netapp.models.BackupsMigrationRequest":"Microsoft.NetApp.BackupsMigrationRequest","com.azure.resourcemanager.netapp.models.BreakFileLocksRequest":"Microsoft.NetApp.BreakFileLocksRequest","com.azure.resourcemanager.netapp.models.BreakReplicationRequest":"Microsoft.NetApp.BreakReplicationRequest","com.azure.resourcemanager.netapp.models.BreakthroughMode":"Microsoft.NetApp.BreakthroughMode","com.azure.resourcemanager.netapp.models.BucketCredentialsExpiry":"Microsoft.NetApp.BucketCredentialsExpiry","com.azure.resourcemanager.netapp.models.BucketPatch":"Microsoft.NetApp.BucketPatch","com.azure.resourcemanager.netapp.models.BucketPatchPermissions":"Microsoft.NetApp.BucketPatchPermissions","com.azure.resourcemanager.netapp.models.BucketPermissions":"Microsoft.NetApp.BucketPermissions","com.azure.resourcemanager.netapp.models.BucketServerPatchProperties":"Microsoft.NetApp.BucketServerPatchProperties","com.azure.resourcemanager.netapp.models.BucketServerProperties":"Microsoft.NetApp.BucketServerProperties","com.azure.resourcemanager.netapp.models.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.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.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.CoolAccessRetrievalPolicy":"Microsoft.NetApp.CoolAccessRetrievalPolicy","com.azure.resourcemanager.netapp.models.CoolAccessTieringPolicy":"Microsoft.NetApp.CoolAccessTieringPolicy","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.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.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.ElasticSnapshotPolicyWeeklySchedule":"Microsoft.NetApp.ElasticSnapshotPolicyWeeklySchedule","com.azure.resourcemanager.netapp.models.ElasticSnapshotProperties":"Microsoft.NetApp.ElasticSnapshotProperties","com.azure.resourcemanager.netapp.models.ElasticUnixAccessRule":"Microsoft.NetApp.ElasticUnixAccessRule","com.azure.resourcemanager.netapp.models.ElasticVolumeBackupProperties":"Microsoft.NetApp.ElasticVolumeBackupProperties","com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionPatchProperties":"Microsoft.NetApp.ElasticVolumeDataProtectionPatchProperties","com.azure.resourcemanager.netapp.models.ElasticVolumeDataProtectionProperties":"Microsoft.NetApp.ElasticVolumeDataProtectionProperties","com.azure.resourcemanager.netapp.models.ElasticVolumePolicyEnforcement":"Microsoft.NetApp.ElasticVolumePolicyEnforcement","com.azure.resourcemanager.netapp.models.ElasticVolumeProperties":"Microsoft.NetApp.ElasticVolumeProperties","com.azure.resourcemanager.netapp.models.ElasticVolumeRestorationState":"Microsoft.NetApp.ElasticVolumeRestorationState","com.azure.resourcemanager.netapp.models.ElasticVolumeRevert":"Microsoft.NetApp.ElasticVolumeRevert","com.azure.resourcemanager.netapp.models.ElasticVolumeSnapshotProperties":"Microsoft.NetApp.ElasticVolumeSnapshotProperties","com.azure.resourcemanager.netapp.models.ElasticVolumeUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.netapp.models.ElasticVolumeUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.netapp.models.EnableSubvolumes":"Microsoft.NetApp.EnableSubvolumes","com.azure.resourcemanager.netapp.models.EnableWriteBackState":"Microsoft.NetApp.EnableWriteBackState","com.azure.resourcemanager.netapp.models.EncryptionIdentity":"Microsoft.NetApp.EncryptionIdentity","com.azure.resourcemanager.netapp.models.EncryptionKeySource":"Microsoft.NetApp.EncryptionKeySource","com.azure.resourcemanager.netapp.models.EncryptionState":"Microsoft.NetApp.EncryptionState","com.azure.resourcemanager.netapp.models.EncryptionTransitionRequest":"Microsoft.NetApp.EncryptionTransitionRequest","com.azure.resourcemanager.netapp.models.EncryptionType":"Microsoft.NetApp.EncryptionType","com.azure.resourcemanager.netapp.models.EndpointType":"Microsoft.NetApp.EndpointType","com.azure.resourcemanager.netapp.models.Exclude":"Microsoft.NetApp.Exclude","com.azure.resourcemanager.netapp.models.ExportPolicyRule":"Microsoft.NetApp.ExportPolicyRule","com.azure.resourcemanager.netapp.models.ExternalReplicationSetupStatus":"Microsoft.NetApp.ExternalReplicationSetupStatus","com.azure.resourcemanager.netapp.models.FileAccessLogs":"Microsoft.NetApp.FileAccessLogs","com.azure.resourcemanager.netapp.models.FilePathAvailabilityRequest":"Microsoft.NetApp.FilePathAvailabilityRequest","com.azure.resourcemanager.netapp.models.FileSystemUser":"Microsoft.NetApp.FileSystemUser","com.azure.resourcemanager.netapp.models.GetGroupIdListForLdapUserRequest":"Microsoft.NetApp.GetGroupIdListForLdapUserRequest","com.azure.resourcemanager.netapp.models.GlobalFileLockingState":"Microsoft.NetApp.GlobalFileLockingState","com.azure.resourcemanager.netapp.models.HourlySchedule":"Microsoft.NetApp.HourlySchedule","com.azure.resourcemanager.netapp.models.InAvailabilityReasonType":"Microsoft.NetApp.InAvailabilityReasonType","com.azure.resourcemanager.netapp.models.KerberosState":"Microsoft.NetApp.KerberosState","com.azure.resourcemanager.netapp.models.KeySource":"Microsoft.NetApp.KeySource","com.azure.resourcemanager.netapp.models.KeyVaultPrivateEndpoint":"Microsoft.NetApp.KeyVaultPrivateEndpoint","com.azure.resourcemanager.netapp.models.KeyVaultProperties":"Microsoft.NetApp.KeyVaultProperties","com.azure.resourcemanager.netapp.models.KeyVaultStatus":"Microsoft.NetApp.KeyVaultStatus","com.azure.resourcemanager.netapp.models.LargeVolumeType":"Microsoft.NetApp.LargeVolumeType","com.azure.resourcemanager.netapp.models.LdapConfiguration":"Microsoft.NetApp.LdapConfiguration","com.azure.resourcemanager.netapp.models.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.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.OperationDisplay":"Microsoft.NetApp.OperationDisplay","com.azure.resourcemanager.netapp.models.OriginClusterInformation":"Microsoft.NetApp.OriginClusterInformation","com.azure.resourcemanager.netapp.models.PeerClusterForVolumeMigrationRequest":"Microsoft.NetApp.PeerClusterForVolumeMigrationRequest","com.azure.resourcemanager.netapp.models.PlacementKeyValuePairs":"Microsoft.NetApp.PlacementKeyValuePairs","com.azure.resourcemanager.netapp.models.PolicyStatus":"Microsoft.NetApp.PolicyStatus","com.azure.resourcemanager.netapp.models.PoolChangeRequest":"Microsoft.NetApp.PoolChangeRequest","com.azure.resourcemanager.netapp.models.ProtocolTypes":"Microsoft.NetApp.ProtocolTypes","com.azure.resourcemanager.netapp.models.ProvisioningState":"Microsoft.NetApp.NetAppProvisioningState","com.azure.resourcemanager.netapp.models.QosType":"Microsoft.NetApp.QosType","com.azure.resourcemanager.netapp.models.QueryNetworkSiblingSetRequest":"Microsoft.NetApp.QueryNetworkSiblingSetRequest","com.azure.resourcemanager.netapp.models.QuotaAvailabilityRequest":"Microsoft.NetApp.QuotaAvailabilityRequest","com.azure.resourcemanager.netapp.models.QuotaReport":"Microsoft.NetApp.QuotaReport","com.azure.resourcemanager.netapp.models.RansomwareProtectionPatchSettings":"Microsoft.NetApp.RansomwareProtectionPatchSettings","com.azure.resourcemanager.netapp.models.RansomwareProtectionSettings":"Microsoft.NetApp.RansomwareProtectionSettings","com.azure.resourcemanager.netapp.models.RansomwareReportProperties":"Microsoft.NetApp.RansomwareReportProperties","com.azure.resourcemanager.netapp.models.RansomwareReportSeverity":"Microsoft.NetApp.RansomwareReportSeverity","com.azure.resourcemanager.netapp.models.RansomwareReportState":"Microsoft.NetApp.RansomwareReportState","com.azure.resourcemanager.netapp.models.RansomwareSuspectResolution":"Microsoft.NetApp.RansomwareSuspectResolution","com.azure.resourcemanager.netapp.models.RansomwareSuspects":"Microsoft.NetApp.RansomwareSuspects","com.azure.resourcemanager.netapp.models.RansomwareSuspectsClearRequest":"Microsoft.NetApp.RansomwareSuspectsClearRequest","com.azure.resourcemanager.netapp.models.ReestablishReplicationRequest":"Microsoft.NetApp.ReestablishReplicationRequest","com.azure.resourcemanager.netapp.models.RegionInfoAvailabilityZoneMappingsItem":"Microsoft.NetApp.RegionInfoAvailabilityZoneMappingsItem","com.azure.resourcemanager.netapp.models.RegionStorageToNetworkProximity":"Microsoft.NetApp.RegionStorageToNetworkProximity","com.azure.resourcemanager.netapp.models.RelocateVolumeRequest":"Microsoft.NetApp.RelocateVolumeRequest","com.azure.resourcemanager.netapp.models.RemotePath":"Microsoft.NetApp.RemotePath","com.azure.resourcemanager.netapp.models.ReplicationMirrorState":"Microsoft.NetApp.ReplicationMirrorState","com.azure.resourcemanager.netapp.models.ReplicationObject":"Microsoft.NetApp.ReplicationObject","com.azure.resourcemanager.netapp.models.ReplicationSchedule":"Microsoft.NetApp.ReplicationSchedule","com.azure.resourcemanager.netapp.models.ReplicationType":"Microsoft.NetApp.ReplicationType","com.azure.resourcemanager.netapp.models.ResourceNameAvailabilityRequest":"Microsoft.NetApp.ResourceNameAvailabilityRequest","com.azure.resourcemanager.netapp.models.SecretPassword":"Microsoft.NetApp.SecretPassword","com.azure.resourcemanager.netapp.models.SecretPasswordIdentity":"Microsoft.NetApp.SecretPasswordIdentity","com.azure.resourcemanager.netapp.models.SecretPasswordKeyVaultProperties":"Microsoft.NetApp.SecretPasswordKeyVaultProperties","com.azure.resourcemanager.netapp.models.SecurityStyle":"Microsoft.NetApp.SecurityStyle","com.azure.resourcemanager.netapp.models.ServiceLevel":"Microsoft.NetApp.ServiceLevel","com.azure.resourcemanager.netapp.models.ServiceSpecification":"Microsoft.NetApp.ServiceSpecification","com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration":"Microsoft.NetApp.SmbAccessBasedEnumeration","com.azure.resourcemanager.netapp.models.SmbEncryptionState":"Microsoft.NetApp.SmbEncryptionState","com.azure.resourcemanager.netapp.models.SmbNonBrowsable":"Microsoft.NetApp.SmbNonBrowsable","com.azure.resourcemanager.netapp.models.SmbSettings":"Microsoft.NetApp.SmbSettings","com.azure.resourcemanager.netapp.models.SnapshotDirectoryVisibility":"Microsoft.NetApp.SnapshotDirectoryVisibility","com.azure.resourcemanager.netapp.models.SnapshotPolicyPatch":"Microsoft.NetApp.SnapshotPolicyPatch","com.azure.resourcemanager.netapp.models.SnapshotRestoreFiles":"Microsoft.NetApp.SnapshotRestoreFiles","com.azure.resourcemanager.netapp.models.SnapshotUsage":"Microsoft.NetApp.SnapshotUsage","com.azure.resourcemanager.netapp.models.SubvolumePatchRequest":"Microsoft.NetApp.SubvolumePatchRequest","com.azure.resourcemanager.netapp.models.SuspectFile":"Microsoft.NetApp.SuspectFile","com.azure.resourcemanager.netapp.models.Type":"Microsoft.NetApp.Type","com.azure.resourcemanager.netapp.models.UpdateNetworkSiblingSetRequest":"Microsoft.NetApp.UpdateNetworkSiblingSetRequest","com.azure.resourcemanager.netapp.models.UsageName":"Microsoft.NetApp.UsageName","com.azure.resourcemanager.netapp.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity","com.azure.resourcemanager.netapp.models.VolumeBackupProperties":"Microsoft.NetApp.VolumeBackupProperties","com.azure.resourcemanager.netapp.models.VolumeBackupRelationshipStatus":"Microsoft.NetApp.VolumeBackupRelationshipStatus","com.azure.resourcemanager.netapp.models.VolumeBackups":"Microsoft.NetApp.VolumeBackups","com.azure.resourcemanager.netapp.models.VolumeGroupMetadata":"Microsoft.NetApp.VolumeGroupMetaData","com.azure.resourcemanager.netapp.models.VolumeGroupVolumeProperties":"Microsoft.NetApp.VolumeGroupVolumeProperties","com.azure.resourcemanager.netapp.models.VolumeLanguage":"Microsoft.NetApp.VolumeLanguage","com.azure.resourcemanager.netapp.models.VolumePatch":"Microsoft.NetApp.VolumePatch","com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection":"Microsoft.NetApp.VolumePatchPropertiesDataProtection","com.azure.resourcemanager.netapp.models.VolumePatchPropertiesExportPolicy":"Microsoft.NetApp.VolumePatchPropertiesExportPolicy","com.azure.resourcemanager.netapp.models.VolumePropertiesDataProtection":"Microsoft.NetApp.VolumePropertiesDataProtection","com.azure.resourcemanager.netapp.models.VolumePropertiesExportPolicy":"Microsoft.NetApp.VolumePropertiesExportPolicy","com.azure.resourcemanager.netapp.models.VolumeQuotaRulePatch":"Microsoft.NetApp.VolumeQuotaRulePatch","com.azure.resourcemanager.netapp.models.VolumeRelocationProperties":"Microsoft.NetApp.VolumeRelocationProperties","com.azure.resourcemanager.netapp.models.VolumeReplicationRelationshipStatus":"Microsoft.NetApp.VolumeReplicationRelationshipStatus","com.azure.resourcemanager.netapp.models.VolumeRestoreRelationshipStatus":"Microsoft.NetApp.VolumeRestoreRelationshipStatus","com.azure.resourcemanager.netapp.models.VolumeRevert":"Microsoft.NetApp.VolumeRevert","com.azure.resourcemanager.netapp.models.VolumeSize":"Microsoft.NetApp.VolumeSize","com.azure.resourcemanager.netapp.models.VolumeSnapshotProperties":"Microsoft.NetApp.VolumeSnapshotProperties","com.azure.resourcemanager.netapp.models.VolumeStorageToNetworkProximity":"Microsoft.NetApp.VolumeStorageToNetworkProximity","com.azure.resourcemanager.netapp.models.WeeklySchedule":"Microsoft.NetApp.WeeklySchedule"},"generatedFiles":["src/main/java/com/azure/resourcemanager/netapp/NetAppFilesManager.java","src/main/java/com/azure/resourcemanager/netapp/fluent/AccountsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ActiveDirectoryConfigsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupPoliciesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupVaultsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderAccountsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderBackupVaultsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BackupsUnderVolumesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/BucketsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/CachesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticAccountsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupPoliciesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupVaultsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticBackupsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticCapacityPoolsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticSnapshotPoliciesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticSnapshotsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/ElasticVolumesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppManagementClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceQuotaLimitsAccountsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceQuotaLimitsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceRegionInfosClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourceUsagesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/NetAppResourcesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/PoolsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/RansomwareReportsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/SnapshotPoliciesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/SnapshotsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/SubvolumesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/VolumeGroupsClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/VolumeQuotaRulesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/VolumesClient.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/AccountProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ActiveDirectoryConfigInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupPolicyProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupStatusInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BackupVaultProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketGenerateCredentialsInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/BucketProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/CacheInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/CapacityPoolInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckAvailabilityResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/CheckElasticResourceAvailabilityResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ClusterPeerCommandResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticAccountInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupPolicyInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticBackupVaultInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticCapacityPoolInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticSnapshotInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticSnapshotPolicyInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ElasticVolumeInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/GetGroupIdListForLdapUserResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/GetKeyVaultStatusResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/GetKeyVaultStatusResponseProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ListQuotaReportResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetAppAccountInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/NetworkSiblingSetInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/OperationProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/PeeringPassphrasesInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/PoolProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/QuotaItemProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/RansomwareReportInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/RegionInfoInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/RegionInfoResourceInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/ReplicationStatusInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/RestoreStatusInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotPolicyVolumeListInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SnapshotProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubscriptionQuotaItemInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeInfoInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeModelProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumePatchParams.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SubvolumeProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/SvmPeerCommandResponseInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/UsageProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/UsageResultInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupDetailsInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupListProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeGroupProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumePatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeQuotaRuleInner.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/VolumeQuotaRulesProperties.java","src/main/java/com/azure/resourcemanager/netapp/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/netapp/fluent/package-info.java","src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ActiveDirectoryConfigsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPoliciesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupPolicyImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupStatusImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupVaultsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderAccountsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderAccountsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderBackupVaultsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderBackupVaultsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderVolumesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BackupsUnderVolumesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BucketGenerateCredentialsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BucketImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BucketsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/BucketsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CacheImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CachesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CachesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CapacityPoolImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CheckAvailabilityResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/CheckElasticResourceAvailabilityResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ClusterPeerCommandResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticAccountsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPoliciesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupPolicyImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupVaultsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticBackupsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticCapacityPoolsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPoliciesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotPolicyImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticSnapshotsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumeImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ElasticVolumesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/GetGroupIdListForLdapUserResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/GetKeyVaultStatusResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ListQuotaReportResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppAccountImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppManagementClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsAccountsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsAccountsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceQuotaLimitsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceRegionInfosImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceUsagesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourceUsagesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetAppResourcesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/NetworkSiblingSetImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/PeeringPassphrasesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/PoolsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RansomwareReportsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RegionInfoImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RegionInfoResourceImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ReplicationImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ReplicationStatusImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/netapp/implementation/RestoreStatusImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPoliciesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPolicyImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotPolicyVolumeListImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SnapshotsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubscriptionQuotaItemImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumeInfoImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumeModelImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SubvolumesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/SvmPeerCommandResponseImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/UsageResultImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupDetailsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeGroupsImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRuleImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRulesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumeQuotaRulesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesClientImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/VolumesImpl.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ActiveDirectoryConfigListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/BackupPoliciesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/BackupVaultsList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/BackupsList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/BucketList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/CacheList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/CapacityPoolList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticAccountListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupPolicyListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticBackupVaultListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticCapacityPoolListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotPolicyListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticSnapshotPolicyVolumeList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ElasticVolumeListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/ListReplications.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/NetAppAccountList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/QuotaItemList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/RansomwareReportsList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/RegionInfosList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/SnapshotPoliciesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/SnapshotsList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/SubvolumesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/UsagesListResult.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/VolumeGroupList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/VolumeList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/models/VolumeQuotaRulesList.java","src/main/java/com/azure/resourcemanager/netapp/implementation/package-info.java","src/main/java/com/azure/resourcemanager/netapp/models/AcceptGrowCapacityPoolForShortTermCloneSplit.java","src/main/java/com/azure/resourcemanager/netapp/models/AccountEncryption.java","src/main/java/com/azure/resourcemanager/netapp/models/Accounts.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectory.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfig.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryConfigs.java","src/main/java/com/azure/resourcemanager/netapp/models/ActiveDirectoryStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/ActualRansomwareProtectionState.java","src/main/java/com/azure/resourcemanager/netapp/models/ApplicationType.java","src/main/java/com/azure/resourcemanager/netapp/models/AuthorizeRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/AvsDataStore.java","src/main/java/com/azure/resourcemanager/netapp/models/Backup.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicies.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupPolicyPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupRestoreFiles.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupType.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupVault.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupVaultPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupVaults.java","src/main/java/com/azure/resourcemanager/netapp/models/Backups.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsMigrationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderAccounts.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderBackupVaults.java","src/main/java/com/azure/resourcemanager/netapp/models/BackupsUnderVolumes.java","src/main/java/com/azure/resourcemanager/netapp/models/BreakFileLocksRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/BreakReplicationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/BreakthroughMode.java","src/main/java/com/azure/resourcemanager/netapp/models/Bucket.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketCredentialsExpiry.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketGenerateCredentials.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketPatchPermissions.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketPermissions.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketServerPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/BucketServerProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/Buckets.java","src/main/java/com/azure/resourcemanager/netapp/models/Cache.java","src/main/java/com/azure/resourcemanager/netapp/models/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/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/ChangeKeyVault.java","src/main/java/com/azure/resourcemanager/netapp/models/ChangeZoneRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckAvailabilityResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityReason.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticResourceAvailabilityStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckElasticVolumeFilePathAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckNameResourceTypes.java","src/main/java/com/azure/resourcemanager/netapp/models/CheckQuotaNameResourceTypes.java","src/main/java/com/azure/resourcemanager/netapp/models/ChownMode.java","src/main/java/com/azure/resourcemanager/netapp/models/CifsChangeNotifyState.java","src/main/java/com/azure/resourcemanager/netapp/models/CifsUser.java","src/main/java/com/azure/resourcemanager/netapp/models/ClusterPeerCommandResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/CoolAccessRetrievalPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/CoolAccessTieringPolicy.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/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/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/ElasticSnapshotPolicyWeeklySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshotProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticSnapshots.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticUnixAccessRule.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolume.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeBackupProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeDataProtectionPatchProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeDataProtectionProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumePolicyEnforcement.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeRestorationState.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeRevert.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeSnapshotProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeUpdate.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumeUpdateProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/ElasticVolumes.java","src/main/java/com/azure/resourcemanager/netapp/models/EnableSubvolumes.java","src/main/java/com/azure/resourcemanager/netapp/models/EnableWriteBackState.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionIdentity.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionKeySource.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionState.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionTransitionRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/EncryptionType.java","src/main/java/com/azure/resourcemanager/netapp/models/EndpointType.java","src/main/java/com/azure/resourcemanager/netapp/models/Exclude.java","src/main/java/com/azure/resourcemanager/netapp/models/ExportPolicyRule.java","src/main/java/com/azure/resourcemanager/netapp/models/ExternalReplicationSetupStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/FileAccessLogs.java","src/main/java/com/azure/resourcemanager/netapp/models/FilePathAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/FileSystemUser.java","src/main/java/com/azure/resourcemanager/netapp/models/GetGroupIdListForLdapUserRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/GetGroupIdListForLdapUserResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/GetKeyVaultStatusResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/GlobalFileLockingState.java","src/main/java/com/azure/resourcemanager/netapp/models/HourlySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/InAvailabilityReasonType.java","src/main/java/com/azure/resourcemanager/netapp/models/KerberosState.java","src/main/java/com/azure/resourcemanager/netapp/models/KeySource.java","src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultPrivateEndpoint.java","src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/KeyVaultStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/LargeVolumeType.java","src/main/java/com/azure/resourcemanager/netapp/models/LdapConfiguration.java","src/main/java/com/azure/resourcemanager/netapp/models/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/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/Operation.java","src/main/java/com/azure/resourcemanager/netapp/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/netapp/models/Operations.java","src/main/java/com/azure/resourcemanager/netapp/models/OriginClusterInformation.java","src/main/java/com/azure/resourcemanager/netapp/models/PeerClusterForVolumeMigrationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/PeeringPassphrases.java","src/main/java/com/azure/resourcemanager/netapp/models/PlacementKeyValuePairs.java","src/main/java/com/azure/resourcemanager/netapp/models/PolicyStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/PoolChangeRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/Pools.java","src/main/java/com/azure/resourcemanager/netapp/models/ProtocolTypes.java","src/main/java/com/azure/resourcemanager/netapp/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/netapp/models/QosType.java","src/main/java/com/azure/resourcemanager/netapp/models/QueryNetworkSiblingSetRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/QuotaAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/QuotaReport.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareProtectionPatchSettings.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareProtectionSettings.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReport.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportSeverity.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReportState.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareReports.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspectResolution.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspects.java","src/main/java/com/azure/resourcemanager/netapp/models/RansomwareSuspectsClearRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/ReestablishReplicationRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionInfo.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoAvailabilityZoneMappingsItem.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionInfoResource.java","src/main/java/com/azure/resourcemanager/netapp/models/RegionStorageToNetworkProximity.java","src/main/java/com/azure/resourcemanager/netapp/models/RelocateVolumeRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/RemotePath.java","src/main/java/com/azure/resourcemanager/netapp/models/Replication.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationMirrorState.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationObject.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationSchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/ReplicationType.java","src/main/java/com/azure/resourcemanager/netapp/models/ResourceNameAvailabilityRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/RestoreStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/SecretPassword.java","src/main/java/com/azure/resourcemanager/netapp/models/SecretPasswordIdentity.java","src/main/java/com/azure/resourcemanager/netapp/models/SecretPasswordKeyVaultProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/SecurityStyle.java","src/main/java/com/azure/resourcemanager/netapp/models/ServiceLevel.java","src/main/java/com/azure/resourcemanager/netapp/models/ServiceSpecification.java","src/main/java/com/azure/resourcemanager/netapp/models/SmbAccessBasedEnumeration.java","src/main/java/com/azure/resourcemanager/netapp/models/SmbEncryptionState.java","src/main/java/com/azure/resourcemanager/netapp/models/SmbNonBrowsable.java","src/main/java/com/azure/resourcemanager/netapp/models/SmbSettings.java","src/main/java/com/azure/resourcemanager/netapp/models/Snapshot.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotDirectoryVisibility.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicies.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicyPatch.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicyVolumeList.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotRestoreFiles.java","src/main/java/com/azure/resourcemanager/netapp/models/SnapshotUsage.java","src/main/java/com/azure/resourcemanager/netapp/models/Snapshots.java","src/main/java/com/azure/resourcemanager/netapp/models/SubscriptionQuotaItem.java","src/main/java/com/azure/resourcemanager/netapp/models/SubvolumeInfo.java","src/main/java/com/azure/resourcemanager/netapp/models/SubvolumeModel.java","src/main/java/com/azure/resourcemanager/netapp/models/SubvolumePatchRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/Subvolumes.java","src/main/java/com/azure/resourcemanager/netapp/models/SuspectFile.java","src/main/java/com/azure/resourcemanager/netapp/models/SvmPeerCommandResponse.java","src/main/java/com/azure/resourcemanager/netapp/models/Type.java","src/main/java/com/azure/resourcemanager/netapp/models/UpdateNetworkSiblingSetRequest.java","src/main/java/com/azure/resourcemanager/netapp/models/UsageName.java","src/main/java/com/azure/resourcemanager/netapp/models/UsageResult.java","src/main/java/com/azure/resourcemanager/netapp/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/netapp/models/Volume.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackupProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackupRelationshipStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeBackups.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroup.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupDetails.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupMetadata.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupVolumeProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroups.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeLanguage.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePatch.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesDataProtection.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePatchPropertiesExportPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesDataProtection.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumePropertiesExportPolicy.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRule.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRulePatch.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeQuotaRules.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeRelocationProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeReplicationRelationshipStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeRestoreRelationshipStatus.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeRevert.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeSize.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeSnapshotProperties.java","src/main/java/com/azure/resourcemanager/netapp/models/VolumeStorageToNetworkProximity.java","src/main/java/com/azure/resourcemanager/netapp/models/Volumes.java","src/main/java/com/azure/resourcemanager/netapp/models/WeeklySchedule.java","src/main/java/com/azure/resourcemanager/netapp/models/package-info.java","src/main/java/com/azure/resourcemanager/netapp/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/proxy-config.json b/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/proxy-config.json index b1464c1aa1c3..fdbabe6bdace 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/proxy-config.json +++ b/sdk/netapp/azure-resourcemanager-netapp/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-netapp/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.netapp.implementation.AccountsClientImpl$AccountsService"],["com.azure.resourcemanager.netapp.implementation.BackupPoliciesClientImpl$BackupPoliciesService"],["com.azure.resourcemanager.netapp.implementation.BackupVaultsClientImpl$BackupVaultsService"],["com.azure.resourcemanager.netapp.implementation.BackupsClientImpl$BackupsService"],["com.azure.resourcemanager.netapp.implementation.BackupsUnderAccountsClientImpl$BackupsUnderAccountsService"],["com.azure.resourcemanager.netapp.implementation.BackupsUnderBackupVaultsClientImpl$BackupsUnderBackupVaultsService"],["com.azure.resourcemanager.netapp.implementation.BackupsUnderVolumesClientImpl$BackupsUnderVolumesService"],["com.azure.resourcemanager.netapp.implementation.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.SnapshotPoliciesClientImpl$SnapshotPoliciesService"],["com.azure.resourcemanager.netapp.implementation.SnapshotsClientImpl$SnapshotsService"],["com.azure.resourcemanager.netapp.implementation.SubvolumesClientImpl$SubvolumesService"],["com.azure.resourcemanager.netapp.implementation.VolumeGroupsClientImpl$VolumeGroupsService"],["com.azure.resourcemanager.netapp.implementation.VolumeQuotaRulesClientImpl$VolumeQuotaRulesService"],["com.azure.resourcemanager.netapp.implementation.VolumesClientImpl$VolumesService"]] \ No newline at end of file +[["com.azure.resourcemanager.netapp.implementation.AccountsClientImpl$AccountsService"],["com.azure.resourcemanager.netapp.implementation.ActiveDirectoryConfigsClientImpl$ActiveDirectoryConfigsService"],["com.azure.resourcemanager.netapp.implementation.BackupPoliciesClientImpl$BackupPoliciesService"],["com.azure.resourcemanager.netapp.implementation.BackupVaultsClientImpl$BackupVaultsService"],["com.azure.resourcemanager.netapp.implementation.BackupsClientImpl$BackupsService"],["com.azure.resourcemanager.netapp.implementation.BackupsUnderAccountsClientImpl$BackupsUnderAccountsService"],["com.azure.resourcemanager.netapp.implementation.BackupsUnderBackupVaultsClientImpl$BackupsUnderBackupVaultsService"],["com.azure.resourcemanager.netapp.implementation.BackupsUnderVolumesClientImpl$BackupsUnderVolumesService"],["com.azure.resourcemanager.netapp.implementation.BucketsClientImpl$BucketsService"],["com.azure.resourcemanager.netapp.implementation.CachesClientImpl$CachesService"],["com.azure.resourcemanager.netapp.implementation.ElasticAccountsClientImpl$ElasticAccountsService"],["com.azure.resourcemanager.netapp.implementation.ElasticBackupPoliciesClientImpl$ElasticBackupPoliciesService"],["com.azure.resourcemanager.netapp.implementation.ElasticBackupVaultsClientImpl$ElasticBackupVaultsService"],["com.azure.resourcemanager.netapp.implementation.ElasticBackupsClientImpl$ElasticBackupsService"],["com.azure.resourcemanager.netapp.implementation.ElasticCapacityPoolsClientImpl$ElasticCapacityPoolsService"],["com.azure.resourcemanager.netapp.implementation.ElasticSnapshotPoliciesClientImpl$ElasticSnapshotPoliciesService"],["com.azure.resourcemanager.netapp.implementation.ElasticSnapshotsClientImpl$ElasticSnapshotsService"],["com.azure.resourcemanager.netapp.implementation.ElasticVolumesClientImpl$ElasticVolumesService"],["com.azure.resourcemanager.netapp.implementation.NetAppResourceQuotaLimitsAccountsClientImpl$NetAppResourceQuotaLimitsAccountsService"],["com.azure.resourcemanager.netapp.implementation.NetAppResourceQuotaLimitsClientImpl$NetAppResourceQuotaLimitsService"],["com.azure.resourcemanager.netapp.implementation.NetAppResourceRegionInfosClientImpl$NetAppResourceRegionInfosService"],["com.azure.resourcemanager.netapp.implementation.NetAppResourceUsagesClientImpl$NetAppResourceUsagesService"],["com.azure.resourcemanager.netapp.implementation.NetAppResourcesClientImpl$NetAppResourcesService"],["com.azure.resourcemanager.netapp.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.netapp.implementation.PoolsClientImpl$PoolsService"],["com.azure.resourcemanager.netapp.implementation.RansomwareReportsClientImpl$RansomwareReportsService"],["com.azure.resourcemanager.netapp.implementation.SnapshotPoliciesClientImpl$SnapshotPoliciesService"],["com.azure.resourcemanager.netapp.implementation.SnapshotsClientImpl$SnapshotsService"],["com.azure.resourcemanager.netapp.implementation.SubvolumesClientImpl$SubvolumesService"],["com.azure.resourcemanager.netapp.implementation.VolumeGroupsClientImpl$VolumeGroupsService"],["com.azure.resourcemanager.netapp.implementation.VolumeQuotaRulesClientImpl$VolumeQuotaRulesService"],["com.azure.resourcemanager.netapp.implementation.VolumesClientImpl$VolumesService"]] \ No newline at end of file diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsChangeKeyVaultSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsChangeKeyVaultSamples.java index c5709805f96d..2c29b56fb306 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: 2025-09-01/Accounts_ChangeKeyVault.json + * x-ms-original-file: 2025-09-01-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 7ca3ef06ba80..2dd1f163aa47 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsCreateOrUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ */ public final class AccountsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-01/Accounts_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01-preview/Accounts_CreateOrUpdate.json */ /** * Sample code: Accounts_CreateOrUpdate. @@ -24,7 +24,7 @@ public static void accountsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAp } /* - * x-ms-original-file: 2025-09-01/Accounts_CreateOrUpdateAD.json + * x-ms-original-file: 2025-09-01-preview/Accounts_CreateOrUpdateAD.json */ /** * Sample code: Accounts_CreateOrUpdateWithActiveDirectory. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/AccountsDeleteSamples.java index 1250ff85ab2e..fd09276f602d 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: 2025-09-01/Accounts_Delete.json + * x-ms-original-file: 2025-09-01-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 65a8baee210a..00820cd7cdd0 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: 2025-09-01/Accounts_Get.json + * x-ms-original-file: 2025-09-01-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 9a1625598ff9..31ba51b56688 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: 2025-09-01/Accounts_GetChangeKeyVaultInformation.json + * x-ms-original-file: 2025-09-01-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 393d02fd7a26..896f744c994c 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: 2025-09-01/Accounts_List.json + * x-ms-original-file: 2025-09-01-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 f17fcecd0cbb..ab08e5991c4a 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: 2025-09-01/Accounts_ListBySubscription.json + * x-ms-original-file: 2025-09-01-preview/Accounts_ListBySubscription.json */ /** * Sample code: Accounts_ListBySubscription. 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 45ab43ecc529..6ef437eed546 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: 2025-09-01/Accounts_RenewCredentials.json + * x-ms-original-file: 2025-09-01-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 0050845090f7..0d6d7e011dab 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: 2025-09-01/Accounts_TransitionEncryptionKey.json + * x-ms-original-file: 2025-09-01-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 9aef1cdece02..a5da83b19c2e 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: 2025-09-01/Accounts_Update.json + * x-ms-original-file: 2025-09-01-preview/Accounts_Update.json */ /** * Sample code: Accounts_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..18cdb5588920 --- /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: 2025-09-01-preview/ActiveDirectoryConfigs_CreateOrUpdate.json + */ + /** + * Sample code: ActiveDirectoryConfigs_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + activeDirectoryConfigsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.activeDirectoryConfigs() + .define("adconfig1") + .withRegion("eastus") + .withExistingResourceGroup("myRG") + .withTags(mapOf("ac-tag1", "activeDirectoryConfig1")) + .withProperties(new ActiveDirectoryConfigProperties().withUserName("admin1") + .withDns(Arrays.asList("10.10.10.4", "10.10.10.5")) + .withSmbServerName("smbServer") + .withOrganizationalUnit("OU=Computers,DC=corp,DC=contoso,DC=com") + .withSite("Default-First-Site-Name") + .withBackupOperators(Arrays.asList("backupOp1")) + .withAdministrators(Arrays.asList("admin1")) + .withSecurityOperators(Arrays.asList("secOp1")) + .withDomain("example.net") + .withSecretPassword(new SecretPassword() + .withKeyVaultProperties( + new SecretPasswordKeyVaultProperties().withKeyVaultUri("fakeTokenPlaceholder") + .withSecretName("fakeTokenPlaceholder")) + .withIdentity(new SecretPasswordIdentity().withUserAssignedIdentity( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userAssignedIdentity1")))) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userAssignedIdentity1", + new UserAssignedIdentity()))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsDeleteSamples.java new file mode 100644 index 000000000000..20c50a91aa55 --- /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: 2025-09-01-preview/ActiveDirectoryConfigs_Delete.json + */ + /** + * Sample code: ActiveDirectoryConfigs_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void activeDirectoryConfigsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.activeDirectoryConfigs().delete("myRG", "adconfig1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsGetByResourceGroupSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsGetByResourceGroupSamples.java new file mode 100644 index 000000000000..79ea4acca526 --- /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: 2025-09-01-preview/ActiveDirectoryConfigs_Get.json + */ + /** + * Sample code: ActiveDirectoryConfigs_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void activeDirectoryConfigsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.activeDirectoryConfigs() + .getByResourceGroupWithResponse("myRG", "adconfig1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsListByResourceGroupSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsListByResourceGroupSamples.java new file mode 100644 index 000000000000..39634eafa017 --- /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: 2025-09-01-preview/ActiveDirectoryConfigs_ListByResourceGroup.json + */ + /** + * Sample code: ActiveDirectoryConfigs_ListByResourceGroup. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + activeDirectoryConfigsListByResourceGroup(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.activeDirectoryConfigs().listByResourceGroup("myRG", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsListSamples.java new file mode 100644 index 000000000000..fbc57db5c68a --- /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: 2025-09-01-preview/ActiveDirectoryConfigs_ListBySubscription.json + */ + /** + * Sample code: ActiveDirectoryConfigs_ListBySubscription. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + activeDirectoryConfigsListBySubscription(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.activeDirectoryConfigs().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ActiveDirectoryConfigsUpdateSamples.java new file mode 100644 index 000000000000..f642225a2bf6 --- /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: 2025-09-01-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 90969c9654f0..824e15091f23 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: 2025-09-01/BackupPolicies_Create.json + * x-ms-original-file: 2025-09-01-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 e8b206d0eb7c..d62fa3558463 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: 2025-09-01/BackupPolicies_Delete.json + * x-ms-original-file: 2025-09-01-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 9f5a975e8e52..5ba8bb69e8c9 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: 2025-09-01/BackupPolicies_Get.json + * x-ms-original-file: 2025-09-01-preview/BackupPolicies_Get.json */ /** * Sample code: Backups_Get. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListSamples.java index f44671d24222..9a2b2377e491 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: 2025-09-01/BackupPolicies_List.json + * x-ms-original-file: 2025-09-01-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 740692709757..c7456268b5c5 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: 2025-09-01/BackupPolicies_Update.json + * x-ms-original-file: 2025-09-01-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 2b3ab145f4e8..4a1b970043c6 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: 2025-09-01/BackupVaults_Create.json + * x-ms-original-file: 2025-09-01-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 a49ed100c629..bbd2ae94578f 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: 2025-09-01/BackupVaults_Delete.json + * x-ms-original-file: 2025-09-01-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 9d33d7b31e74..63ceae55a5b6 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: 2025-09-01/BackupVaults_Get.json + * x-ms-original-file: 2025-09-01-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 2115deca3e9f..027c913dfe29 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: 2025-09-01/BackupVaults_List.json + * x-ms-original-file: 2025-09-01-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 33e1cb52fb88..b70f7fb5a990 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: 2025-09-01/BackupVaults_Update.json + * x-ms-original-file: 2025-09-01-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 bca3b1b328d3..951b1ebb589d 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: 2025-09-01/BackupsUnderBackupVault_Create.json + * x-ms-original-file: 2025-09-01-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 707e20747ec1..d1c3c6d5ee3b 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: 2025-09-01/BackupsUnderBackupVault_Delete.json + * x-ms-original-file: 2025-09-01-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 b70e1b841ff7..7d098240392e 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: 2025-09-01/Volumes_LatestBackupStatus.json + * x-ms-original-file: 2025-09-01-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 a40ecc0079b0..26ed25e10036 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: 2025-09-01/BackupsUnderBackupVault_Get.json + * x-ms-original-file: 2025-09-01-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 1a99783a1c87..a306c4a56675 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: 2025-09-01/Volumes_LatestRestoreStatus.json + * x-ms-original-file: 2025-09-01-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 4667354817cb..2986dd12ac21 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsListByVaultSamples.java @@ -9,14 +9,14 @@ */ public final class BackupsListByVaultSamples { /* - * x-ms-original-file: 2025-09-01/BackupsUnderBackupVault_List.json + * x-ms-original-file: 2025-09-01-preview/Backups_ListByVault.json */ /** - * Sample code: Backups_List. + * Sample code: Backups_ListByVault. * * @param manager Entry point to NetAppFilesManager. */ - public static void backupsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + public static void backupsListByVault(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { manager.backups().listByVault("myRG", "account1", "backupVault1", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderAccountMigrateBackupsSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsUnderAccountMigrateBackupsSamples.java index c84d8a2e5ad5..8a5c83e3494b 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: 2025-09-01/BackupsUnderAccount_Migrate.json + * x-ms-original-file: 2025-09-01-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 e92ae36bbc8b..58c390718302 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: 2025-09-01/BackupsUnderBackupVault_SingleFileRestore.json + * x-ms-original-file: 2025-09-01-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 15ce7ce18e65..31103ad94fa7 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: 2025-09-01/BackupsUnderVolume_Migrate.json + * x-ms-original-file: 2025-09-01-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 6de7243d0392..b6c33c55e1e6 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: 2025-09-01/BackupsUnderBackupVault_Update.json + * x-ms-original-file: 2025-09-01-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 new file mode 100644 index 000000000000..e7c9a142e652 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsCreateOrUpdateSamples.java @@ -0,0 +1,35 @@ +// Copyright (c) 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.BucketPermissions; +import com.azure.resourcemanager.netapp.models.BucketServerProperties; +import com.azure.resourcemanager.netapp.models.FileSystemUser; +import com.azure.resourcemanager.netapp.models.NfsUser; + +/** + * Samples for Buckets CreateOrUpdate. + */ +public final class BucketsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Buckets_CreateOrUpdate.json + */ + /** + * Sample code: Buckets_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void bucketsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.buckets() + .define("bucket1") + .withExistingVolume("myRG", "account1", "pool1", "volume1") + .withPath("/path") + .withFileSystemUser(new FileSystemUser().withNfsUser(new NfsUser().withUserId(1001L).withGroupId(1000L))) + .withServer(new BucketServerProperties().withFqdn("fullyqualified.domainname.com") + .withCertificateObject("")) + .withPermissions(BucketPermissions.READ_ONLY) + .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 new file mode 100644 index 000000000000..29ca799fa620 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsDeleteSamples.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 Buckets Delete. + */ +public final class BucketsDeleteSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Buckets_Delete.json + */ + /** + * Sample code: Buckets_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void bucketsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.buckets().delete("myRG", "account1", "pool1", "volume1", "bucket1", com.azure.core.util.Context.NONE); + } +} 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 new file mode 100644 index 000000000000..c69ef3467c02 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsGenerateCredentialsSamples.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.BucketCredentialsExpiry; + +/** + * Samples for Buckets GenerateCredentials. + */ +public final class BucketsGenerateCredentialsSamples { + /* + * x-ms-original-file: 2025-09-01-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); + } +} 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 new file mode 100644 index 000000000000..9594daa6aea4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsGetSamples.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 Buckets Get. + */ +public final class BucketsGetSamples { + /* + * x-ms-original-file: 2025-09-01-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); + } +} 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 new file mode 100644 index 000000000000..dc100eaace89 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsListSamples.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 Buckets List. + */ +public final class BucketsListSamples { + /* + * x-ms-original-file: 2025-09-01-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); + } +} 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 new file mode 100644 index 000000000000..83fd298c5afe --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BucketsUpdateSamples.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.resourcemanager.netapp.models.Bucket; +import com.azure.resourcemanager.netapp.models.BucketPatchPermissions; +import com.azure.resourcemanager.netapp.models.BucketServerPatchProperties; + +/** + * Samples for Buckets Update. + */ +public final class BucketsUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-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("")) + .withPermissions(BucketPatchPermissions.READ_WRITE) + .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 new file mode 100644 index 000000000000..90dff2f65ae5 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesCreateOrUpdateSamples.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.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. + */ +public final class CachesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-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(); + } +} 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 new file mode 100644 index 000000000000..bb18ee428ba3 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesDeleteSamples.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 Caches Delete. + */ +public final class CachesDeleteSamples { + /* + * x-ms-original-file: 2025-09-01-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); + } +} 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 new file mode 100644 index 000000000000..8f51e494d71f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesGetSamples.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 Caches Get. + */ +public final class CachesGetSamples { + /* + * x-ms-original-file: 2025-09-01-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); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesListByCapacityPoolsSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesListByCapacityPoolsSamples.java new file mode 100644 index 000000000000..49ab776afa96 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesListByCapacityPoolsSamples.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 Caches ListByCapacityPools. + */ +public final class CachesListByCapacityPoolsSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Caches_ListByCapacityPools.json + */ + /** + * Sample code: Caches_List. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void cachesList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.caches().listByCapacityPools("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/CachesListPeeringPassphrasesSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesListPeeringPassphrasesSamples.java new file mode 100644 index 000000000000..cae6716e81b9 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesListPeeringPassphrasesSamples.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 Caches ListPeeringPassphrases. + */ +public final class CachesListPeeringPassphrasesSamples { + /* + * x-ms-original-file: 2025-09-01-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); + } +} 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 new file mode 100644 index 000000000000..e8fe147e84da --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesPoolChangeSamples.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.PoolChangeRequest; + +/** + * Samples for Caches PoolChange. + */ +public final class CachesPoolChangeSamples { + /* + * x-ms-original-file: 2025-09-01-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); + } +} 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 new file mode 100644 index 000000000000..b50607616f4f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/CachesUpdateSamples.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.Cache; +import com.azure.resourcemanager.netapp.models.CacheUpdateProperties; + +/** + * Samples for Caches Update. + */ +public final class CachesUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-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(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..e91a354f7457 --- /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: 2025-09-01-preview/ElasticAccounts_CreateOrUpdate.json + */ + /** + * Sample code: ElasticAccounts_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticAccountsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticAccounts() + .define("account1") + .withRegion("eastus") + .withExistingResourceGroup("myRG") + .withTags(mapOf("ac-tag1", "account1")) + .withProperties(new ElasticAccountProperties()) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsDeleteSamples.java new file mode 100644 index 000000000000..c3c64054dfcb --- /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: 2025-09-01-preview/ElasticAccounts_Delete.json + */ + /** + * Sample code: ElasticAccounts_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticAccountsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticAccounts().delete("myRG", "account1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsGetByResourceGroupSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsGetByResourceGroupSamples.java new file mode 100644 index 000000000000..5db8d339831c --- /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: 2025-09-01-preview/ElasticAccounts_Get.json + */ + /** + * Sample code: ElasticAccounts_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticAccountsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticAccounts().getByResourceGroupWithResponse("myRG", "account1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsListByResourceGroupSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsListByResourceGroupSamples.java new file mode 100644 index 000000000000..8c45aa7ee736 --- /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: 2025-09-01-preview/ElasticAccounts_ListByResourceGroup.json + */ + /** + * Sample code: ElasticAccounts_ListByResourceGroup. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticAccountsListByResourceGroup(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticAccounts().listByResourceGroup("myRG", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsListSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsListSamples.java new file mode 100644 index 000000000000..413978dfe8ad --- /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: 2025-09-01-preview/ElasticAccounts_ListBySubscription.json + */ + /** + * Sample code: ElasticAccounts_ListBySubscription. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticAccountsListBySubscription(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticAccounts().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticAccountsUpdateSamples.java new file mode 100644 index 000000000000..1135ec77c3db --- /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: 2025-09-01-preview/ElasticAccounts_Update.json + */ + /** + * Sample code: ElasticAccounts_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticAccountsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticAccount resource = manager.elasticAccounts() + .getByResourceGroupWithResponse("myRG", "account1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("Tag1", "Value1")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..dd133d88ca8e --- /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: 2025-09-01-preview/ElasticBackupPolicies_CreateOrUpdate.json + */ + /** + * Sample code: ElasticBackupPolicies_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticBackupPoliciesCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupPolicies() + .define("backupPolicyName") + .withRegion("westus") + .withExistingElasticAccount("myRG", "account1") + .withProperties(new ElasticBackupPolicyProperties().withDailyBackupsToKeep(10) + .withWeeklyBackupsToKeep(10) + .withMonthlyBackupsToKeep(10) + .withPolicyState(ElasticBackupPolicyState.ENABLED)) + .create(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesDeleteSamples.java new file mode 100644 index 000000000000..553af5de13a2 --- /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: 2025-09-01-preview/ElasticBackupPolicies_Delete.json + */ + /** + * Sample code: ElasticBackupPolicies_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupPoliciesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupPolicies() + .delete("resourceGroup", "accountName", "backupPolicyName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesGetSamples.java new file mode 100644 index 000000000000..7d586e1ec566 --- /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: 2025-09-01-preview/ElasticBackupPolicies_Get.json + */ + /** + * Sample code: ElasticBackupPolicies_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupPoliciesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupPolicies() + .getWithResponse("myRG", "account1", "backupPolicyName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesListByElasticAccountSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesListByElasticAccountSamples.java new file mode 100644 index 000000000000..15000614e401 --- /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: 2025-09-01-preview/ElasticBackupPolicies_List.json + */ + /** + * Sample code: ElasticBackupPolicies_ListByElasticAccount. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticBackupPoliciesListByElasticAccount(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupPolicies().listByElasticAccount("myRG", "account1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesUpdateSamples.java new file mode 100644 index 000000000000..918e7f9f4857 --- /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.ElasticBackupPolicyProperties; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState; + +/** + * Samples for ElasticBackupPolicies Update. + */ +public final class ElasticBackupPoliciesUpdateSamples { + /* + * x-ms-original-file: 2025-09-01-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 ElasticBackupPolicyProperties().withDailyBackupsToKeep(5) + .withWeeklyBackupsToKeep(10) + .withMonthlyBackupsToKeep(10) + .withPolicyState(ElasticBackupPolicyState.ENABLED)) + .apply(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..1d5235c78c9b --- /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: 2025-09-01-preview/ElasticBackupVaults_Create.json + */ + /** + * Sample code: ElasticBackupVaults_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupVaultsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupVaults() + .define("backupVault1") + .withRegion("eastus") + .withExistingElasticAccount("myRG", "account1") + .create(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsDeleteSamples.java new file mode 100644 index 000000000000..c3554ba9739b --- /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: 2025-09-01-preview/ElasticBackupVaults_Delete.json + */ + /** + * Sample code: ElasticBackupVaults_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupVaultsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupVaults() + .delete("resourceGroup", "account1", "backupVault1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsGetSamples.java new file mode 100644 index 000000000000..ca1062821110 --- /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: 2025-09-01-preview/ElasticBackupVaults_Get.json + */ + /** + * Sample code: ElasticBackupVaults_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupVaultsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupVaults() + .getWithResponse("myRG", "account1", "backupVault1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsListByElasticAccountSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsListByElasticAccountSamples.java new file mode 100644 index 000000000000..c8eb8b8a6c43 --- /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: 2025-09-01-preview/ElasticBackupVaults_ListByElasticAccount.json + */ + /** + * Sample code: ElasticBackupVaults_ListByElasticAccount. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticBackupVaultsListByElasticAccount(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackupVaults().listByElasticAccount("myRG", "account1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsUpdateSamples.java new file mode 100644 index 000000000000..404573023311 --- /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: 2025-09-01-preview/ElasticBackupVaults_Update.json + */ + /** + * Sample code: ElasticBackupVaults_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupVaultsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticBackupVault resource = manager.elasticBackupVaults() + .getWithResponse("myRG", "account1", "backupVault1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("Tag1", "Value1")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..cf606b211bb7 --- /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: 2025-09-01-preview/ElasticBackups_CreateOrUpdate.json + */ + /** + * Sample code: ElasticBackups_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackups() + .define("backup1") + .withExistingElasticBackupVault("myRG", "account1", "backupVault1") + .withProperties(new ElasticBackupProperties().withLabel("myLabel") + .withElasticVolumeResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticCapacityPools/pool1/elasticVolumes/volume1") + .withSnapshotUsage(SnapshotUsage.USE_EXISTING_SNAPSHOT) + .withElasticSnapshotResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticCapacityPools/pool1/elasticVolumes/volume1/elasticSnapshots/snap1")) + .create(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsDeleteSamples.java new file mode 100644 index 000000000000..3496374b9dc1 --- /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: 2025-09-01-preview/ElasticBackups_Delete.json + */ + /** + * Sample code: ElasticBackups_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackups() + .delete("resourceGroup", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsGetSamples.java new file mode 100644 index 000000000000..6b482d91f5f2 --- /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: 2025-09-01-preview/ElasticBackups_Get.json + */ + /** + * Sample code: ElasticBackups_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackups() + .getWithResponse("myRG", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsListByVaultSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsListByVaultSamples.java new file mode 100644 index 000000000000..8d7407823515 --- /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: 2025-09-01-preview/ElasticBackups_ListByVault.json + */ + /** + * Sample code: ElasticBackups_ListByVault. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupsListByVault(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticBackups().listByVault("myRG", "account1", "backupVault1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsUpdateSamples.java new file mode 100644 index 000000000000..2e1a7a05fdc4 --- /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: 2025-09-01-preview/ElasticBackups_Update.json + */ + /** + * Sample code: ElasticBackups_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticBackupsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticBackup resource = manager.elasticBackups() + .getWithResponse("myRG", "account1", "backupVault1", "backup1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsChangeZoneSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsChangeZoneSamples.java new file mode 100644 index 000000000000..c62b89a957a0 --- /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: 2025-09-01-preview/ElasticCapacityPools_ChangeZone.json + */ + /** + * Sample code: ElasticCapacityPools_ChangeZone. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticCapacityPoolsChangeZone(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools() + .changeZone("myRG", "account1", "pool1", new ChangeZoneRequest().withNewZone("3"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCheckVolumeFilePathAvailabilitySamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCheckVolumeFilePathAvailabilitySamples.java new file mode 100644 index 000000000000..9378bb2677a6 --- /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: 2025-09-01-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-filepth"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..437a3ad74a54 --- /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: 2025-09-01-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: 2025-09-01-preview/ElasticCapacityPools_CreateOrUpdate.json + */ + /** + * Sample code: ElasticCapacityPools_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticCapacityPoolsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools() + .define("pool1") + .withRegion("eastus") + .withExistingElasticAccount("myRG", "account1") + .withProperties(new ElasticCapacityPoolProperties().withSize(4398046511104L) + .withServiceLevel(ElasticServiceLevel.ZONE_REDUNDANT) + .withSubnetResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + .withActiveDirectoryConfigResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/activeDirectoryConfigs/activeDirectoryConfig1")) + .withZones(Arrays.asList("1", "2", "3")) + .create(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsDeleteSamples.java new file mode 100644 index 000000000000..8d7a080ad6d7 --- /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: 2025-09-01-preview/ElasticCapacityPools_Delete.json + */ + /** + * Sample code: ElasticCapacityPools_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticCapacityPoolsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools().delete("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsGetSamples.java new file mode 100644 index 000000000000..be26ad1fd515 --- /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: 2025-09-01-preview/ElasticCapacityPools_Get.json + */ + /** + * Sample code: ElasticCapacityPools_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticCapacityPoolsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools().getWithResponse("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsListByElasticAccountSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsListByElasticAccountSamples.java new file mode 100644 index 000000000000..9bf949ab6ee7 --- /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: 2025-09-01-preview/ElasticCapacityPools_ListByElasticAccount.json + */ + /** + * Sample code: ElasticCapacityPools_ListByElasticAccount. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticCapacityPoolsListByElasticAccount(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticCapacityPools().listByElasticAccount("myRG", "account1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsUpdateSamples.java new file mode 100644 index 000000000000..f88099d052ef --- /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: 2025-09-01-preview/ElasticCapacityPools_Update.json + */ + /** + * Sample code: ElasticCapacityPools_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticCapacityPoolsUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticCapacityPool resource = manager.elasticCapacityPools() + .getWithResponse("myRG", "account1", "pool1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new ElasticCapacityPoolUpdateProperties().withSize(4398046511104L) + .withActiveDirectoryConfigResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/activeDirectoryConfigs/activeDirectoryConfig1")) + .apply(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..2444e5348114 --- /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: 2025-09-01-preview/ElasticSnapshotPolicies_CreateOrUpdate.json + */ + /** + * Sample code: ElasticSnapshotPolicies_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticSnapshotPoliciesCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshotPolicies() + .define("snapshotPolicyName") + .withRegion("eastus") + .withExistingElasticAccount("myRG", "account1") + .withProperties(new ElasticSnapshotPolicyProperties() + .withHourlySchedule(new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(2).withMinute(50)) + .withDailySchedule( + new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(4).withHour(14).withMinute(30)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(3) + .withDays(Arrays.asList(DayOfWeek.WEDNESDAY)) + .withHour(14) + .withMinute(45)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(5) + .withDaysOfMonth(Arrays.asList(10, 11, 12)) + .withHour(14) + .withMinute(15)) + .withPolicyStatus(PolicyStatus.ENABLED)) + .create(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesDeleteSamples.java new file mode 100644 index 000000000000..4a4a12b16d08 --- /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: 2025-09-01-preview/ElasticSnapshotPolicies_Delete.json + */ + /** + * Sample code: ElasticSnapshotPolicies_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticSnapshotPoliciesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshotPolicies() + .delete("resourceGroup", "accountName", "snapshotPolicyName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesGetSamples.java new file mode 100644 index 000000000000..7edee6c0fa1d --- /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: 2025-09-01-preview/ElasticSnapshotPolicies_Get.json + */ + /** + * Sample code: ElasticSnapshotPolicies_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticSnapshotPoliciesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshotPolicies() + .getWithResponse("myRG", "account1", "snapshotPolicyName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListByElasticAccountSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListByElasticAccountSamples.java new file mode 100644 index 000000000000..2c91e3908478 --- /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: 2025-09-01-preview/ElasticSnapshotPolicies_ListByElasticAccount.json + */ + /** + * Sample code: ElasticSnapshotPolicies_ListByElasticAccount. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticSnapshotPoliciesListByElasticAccount(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshotPolicies().listByElasticAccount("myRG", "account1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListElasticVolumesSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListElasticVolumesSamples.java new file mode 100644 index 000000000000..63204d8f7408 --- /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: 2025-09-01-preview/ElasticSnapshotPolicies_ListElasticVolumes.json + */ + /** + * Sample code: ElasticSnapshotPolicies_ListElasticVolumes. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticSnapshotPoliciesListElasticVolumes(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshotPolicies() + .listElasticVolumes("myRG", "account1", "snapshotPolicyName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesUpdateSamples.java new file mode 100644 index 000000000000..d53031a76776 --- /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.ElasticSnapshotPolicyProperties; +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: 2025-09-01-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 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)) + .apply(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..421a5317f383 --- /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: 2025-09-01-preview/ElasticSnapshots_CreateOrUpdate.json + */ + /** + * Sample code: ElasticSnapshots_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticSnapshotsCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshots() + .define("snapshot1") + .withExistingElasticVolume("myRG", "account1", "pool1", "volume1") + .create(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsDeleteSamples.java new file mode 100644 index 000000000000..a1387deedc80 --- /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: 2025-09-01-preview/ElasticSnapshots_Delete.json + */ + /** + * Sample code: ElasticSnapshots_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticSnapshotsDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshots() + .delete("myRG", "account1", "pool1", "volume1", "snapshot1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsGetSamples.java new file mode 100644 index 000000000000..9b379303e41b --- /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: 2025-09-01-preview/ElasticSnapshots_Get.json + */ + /** + * Sample code: ElasticSnapshots_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticSnapshotsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshots() + .getWithResponse("myRG", "account1", "pool1", "volume1", "snapshot1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsListByElasticVolumeSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsListByElasticVolumeSamples.java new file mode 100644 index 000000000000..77686a30e4fd --- /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: 2025-09-01-preview/ElasticSnapshots_ListByElasticVolume.json + */ + /** + * Sample code: ElasticSnapshots_ListByElasticVolume. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void + elasticSnapshotsListByElasticVolume(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticSnapshots() + .listByElasticVolume("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesCreateOrUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..4ffb36451f16 --- /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: 2025-09-01-preview/ElasticVolumes_CreateOrUpdate.json + */ + /** + * Sample code: ElasticVolumes_CreateOrUpdate. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticVolumesCreateOrUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticVolumes() + .define("volume1") + .withRegion("eastus") + .withExistingElasticCapacityPool("myRG", "account1", "pool1") + .withProperties(new ElasticVolumeProperties().withFilePath("my-unique-file-path") + .withSize(107374182400L) + .withExportPolicy( + new ElasticExportPolicy().withRules(Arrays.asList(new ElasticExportPolicyRule().withRuleIndex(1) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("0.0.0.0/0")) + .withRootAccess(ElasticRootAccess.DISABLED)))) + .withProtocolTypes(Arrays.asList(ElasticProtocolType.NFSV3)) + .withDataProtection(new ElasticVolumeDataProtectionProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticSnapshotPolicies/policy1")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticBackupPolicies/elasticBackupPolicy1") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) + .withElasticBackupVaultResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticBackupVaults/elasticBackupVault1")))) + .create(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesDeleteSamples.java new file mode 100644 index 000000000000..211f18ce433b --- /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: 2025-09-01-preview/ElasticVolumes_Delete.json + */ + /** + * Sample code: ElasticVolumes_Delete. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticVolumesDelete(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticVolumes().delete("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesGetSamples.java new file mode 100644 index 000000000000..6cc9b91f20bf --- /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: 2025-09-01-preview/ElasticVolumes_Get.json + */ + /** + * Sample code: ElasticVolumes_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticVolumesGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticVolumes() + .getWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesListByElasticPoolSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesListByElasticPoolSamples.java new file mode 100644 index 000000000000..7298e30d9baa --- /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: 2025-09-01-preview/ElasticVolumes_ListByElasticPool.json + */ + /** + * Sample code: ElasticVolumes_ListByElasticPool. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticVolumesListByElasticPool(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticVolumes().listByElasticPool("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesRevertSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesRevertSamples.java new file mode 100644 index 000000000000..84225b8c6ecb --- /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: 2025-09-01-preview/ElasticVolumes_Revert.json + */ + /** + * Sample code: ElasticVolumes_Revert. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticVolumesRevert(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.elasticVolumes() + .revert("myRG", "account1", "pool1", "volume1", new ElasticVolumeRevert().withSnapshotResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticCapacityPools/pool1/elasticVolumes/volume1/elasticSnapshots/snapshot1"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesUpdateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesUpdateSamples.java new file mode 100644 index 000000000000..51c5b259ae4a --- /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: 2025-09-01-preview/ElasticVolumes_Update.json + */ + /** + * Sample code: ElasticVolumes_Update. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void elasticVolumesUpdate(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + ElasticVolume resource = manager.elasticVolumes() + .getWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new ElasticVolumeUpdateProperties() + .withExportPolicy( + new ElasticExportPolicy().withRules(Arrays.asList(new ElasticExportPolicyRule().withRuleIndex(1) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("0.0.0.0/0")) + .withRootAccess(ElasticRootAccess.DISABLED)))) + .withDataProtection(new ElasticVolumeDataProtectionPatchProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticSnapshotPolicies/policy1")))) + .apply(); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckFilePathAvailabilitySamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckFilePathAvailabilitySamples.java index dbe826696c66..f99690c29947 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: 2025-09-01/CheckFilePathAvailability.json + * x-ms-original-file: 2025-09-01-preview/CheckFilePathAvailability.json */ /** * Sample code: CheckFilePathAvailability. @@ -23,7 +23,7 @@ public static void checkFilePathAvailability(com.azure.resourcemanager.netapp.Ne .checkFilePathAvailabilityWithResponse("eastus", new FilePathAvailabilityRequest() .withName("my-exact-filepth") .withSubnetId( - "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckNameAvailabilitySamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceCheckNameAvailabilitySamples.java index 990e9cb3933e..29c291f1e2b6 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: 2025-09-01/CheckNameAvailability.json + * x-ms-original-file: 2025-09-01-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 657ce1bef424..4e2714bedbc8 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: 2025-09-01/CheckQuotaAvailability.json + * x-ms-original-file: 2025-09-01-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 61d343d73781..f1ff26ef7177 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: 2025-09-01/NetworkSiblingSet_Query.json + * x-ms-original-file: 2025-09-01-preview/NetworkSiblingSet_Query.json */ /** * Sample code: NetworkSiblingSet_Query. @@ -23,7 +23,7 @@ public static void networkSiblingSetQuery(com.azure.resourcemanager.netapp.NetAp .queryNetworkSiblingSetWithResponse("eastus", new QueryNetworkSiblingSetRequest() .withNetworkSiblingSetId("9760acf5-4638-11e7-9bdb-020073ca3333") .withSubnetId( - "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet"), + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryRegionInfoSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceQueryRegionInfoSamples.java index 5ee2046d21d7..c0466089e408 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: 2025-09-01/RegionInfo.json + * x-ms-original-file: 2025-09-01-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 2b0bafad61a8..05b1b19c58b3 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: 2025-09-01/NetAppResourceQuotaLimitsAccount_Get.json + * x-ms-original-file: 2025-09-01-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 2aebfb3c1a9e..789867f8b58a 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: 2025-09-01/NetAppResourceQuotaLimitsAccount_List.json + * x-ms-original-file: 2025-09-01-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 fc7466129fdb..14c5afc44b15 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: 2025-09-01/NetAppResourceQuotaLimits_Get.json + * x-ms-original-file: 2025-09-01-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 71809c22a202..fcac490a6fd1 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: 2025-09-01/NetAppResourceQuotaLimits_List.json + * x-ms-original-file: 2025-09-01-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 18a6e201950c..ca4fa570c198 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: 2025-09-01/RegionInfos_Get.json + * x-ms-original-file: 2025-09-01-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 79bc01ca9623..6c1a8646feb8 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: 2025-09-01/RegionInfos_List.json + * x-ms-original-file: 2025-09-01-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 34723b82f37b..788f8be5515a 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: 2025-09-01/NetworkSiblingSet_Update.json + * x-ms-original-file: 2025-09-01-preview/NetworkSiblingSet_Update.json */ /** * Sample code: NetworkFeatures_Update. @@ -24,7 +24,7 @@ public static void networkFeaturesUpdate(com.azure.resourcemanager.netapp.NetApp .updateNetworkSiblingSet("eastus", new UpdateNetworkSiblingSetRequest() .withNetworkSiblingSetId("9760acf5-4638-11e7-9bdb-020073ca3333") .withSubnetId( - "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet") + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet") .withNetworkSiblingSetStateId("12345_44420.8001578125") .withNetworkFeatures(NetworkFeatures.STANDARD), com.azure.core.util.Context.NONE); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesGetSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesGetSamples.java index 8ec4bda01748..cf6d4fe3c6e9 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: 2025-09-01/Usages_Get.json + * x-ms-original-file: 2025-09-01-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 86f85a30f7a4..48436d7a70e3 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: 2025-09-01/Usages_List.json + * x-ms-original-file: 2025-09-01-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 d77be33108f0..a69b090ec1d6 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: 2025-09-01/OperationList.json + * x-ms-original-file: 2025-09-01-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 0f46a092b1a1..5de52f738f53 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: 2025-09-01/Pools_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01-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: 2025-09-01/Pools_CreateOrUpdate_CustomThroughput.json + * x-ms-original-file: 2025-09-01-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 b6d2cd88d4d9..9dd0c7851307 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: 2025-09-01/Pools_Delete.json + * x-ms-original-file: 2025-09-01-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 8d286360b5e5..cc3e90c26fed 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: 2025-09-01/Pools_Get_CustomThroughput.json + * x-ms-original-file: 2025-09-01-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: 2025-09-01/Pools_Get.json + * x-ms-original-file: 2025-09-01-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 80bbe0258e74..f1f3d1094fdd 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: 2025-09-01/Pools_List.json + * x-ms-original-file: 2025-09-01-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 84937440d79c..7005b95a8d83 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: 2025-09-01/Pools_Update.json + * x-ms-original-file: 2025-09-01-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: 2025-09-01/Pools_Update_CustomThroughput.json + * x-ms-original-file: 2025-09-01-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 new file mode 100644 index 000000000000..b4a5ffa234ad --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsClearSuspectsSamples.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.RansomwareSuspectResolution; +import com.azure.resourcemanager.netapp.models.RansomwareSuspectsClearRequest; +import java.util.Arrays; + +/** + * Samples for RansomwareReports ClearSuspects. + */ +public final class RansomwareReportsClearSuspectsSamples { + /* + * x-ms-original-file: 2025-09-01-preview/RansomwareReports_ClearSuspects.json + */ + /** + * Sample code: RansomwareReports_ClearSuspects. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void ransomwareReportsClearSuspects(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.ransomwareReports() + .clearSuspects("myRG", "account1", "pool1", "volume1", "ransomwareReport1", + new RansomwareSuspectsClearRequest().withResolution(RansomwareSuspectResolution.POTENTIAL_THREAT) + .withExtensions(Arrays.asList(".threat")), + com.azure.core.util.Context.NONE); + } +} 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 new file mode 100644 index 000000000000..3bac3e1b039e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsGetSamples.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 RansomwareReports Get. + */ +public final class RansomwareReportsGetSamples { + /* + * x-ms-original-file: 2025-09-01-preview/RansomwareReports_Get.json + */ + /** + * Sample code: RansomwareReports_Get. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void ransomwareReportsGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.ransomwareReports() + .getWithResponse("myRG", "account1", "pool1", "volume1", "ransomwareReport1", + com.azure.core.util.Context.NONE); + } +} 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 new file mode 100644 index 000000000000..b94e29f7e2b5 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListSamples.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 RansomwareReports List. + */ +public final class RansomwareReportsListSamples { + /* + * x-ms-original-file: 2025-09-01-preview/RansomwareReports_List.json + */ + /** + * Sample code: RansomwareReports_List. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void ransomwareReportsList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.ransomwareReports().list("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } +} 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 1035b429db02..03dc57e10f00 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: 2025-09-01/SnapshotPolicies_Create.json + * x-ms-original-file: 2025-09-01-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 01d86343621f..be5b7397af58 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: 2025-09-01/SnapshotPolicies_Delete.json + * x-ms-original-file: 2025-09-01-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 be7679c499c3..62bcd7af3f77 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: 2025-09-01/SnapshotPolicies_Get.json + * x-ms-original-file: 2025-09-01-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 a1588054e776..2f4c513ee292 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: 2025-09-01/SnapshotPolicies_List.json + * x-ms-original-file: 2025-09-01-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 92762757ac3d..b1ef5743a857 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: 2025-09-01/SnapshotPolicies_ListVolumes.json + * x-ms-original-file: 2025-09-01-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 047e65846f18..6589a5eab793 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: 2025-09-01/SnapshotPolicies_Update.json + * x-ms-original-file: 2025-09-01-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 9908d5b439df..779cb32664c5 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: 2025-09-01/Snapshots_Create.json + * x-ms-original-file: 2025-09-01-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 5249d736df74..3e845776d5fa 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: 2025-09-01/Snapshots_Delete.json + * x-ms-original-file: 2025-09-01-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 0ea853436222..6b3e139368a2 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: 2025-09-01/Snapshots_Get.json + * x-ms-original-file: 2025-09-01-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 3eba98bc6b84..31db494cfc59 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: 2025-09-01/Snapshots_List.json + * x-ms-original-file: 2025-09-01-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 bb4a193a63e7..c8102f8ef339 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: 2025-09-01/Snapshots_SingleFileRestore.json + * x-ms-original-file: 2025-09-01-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 9499267178d5..36fbbdba0fd0 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: 2025-09-01/Subvolumes_Create.json + * x-ms-original-file: 2025-09-01-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 72c8e94c7115..615e5825fcc1 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: 2025-09-01/Subvolumes_Delete.json + * x-ms-original-file: 2025-09-01-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 d7cf35c6f8a9..1e075011589e 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: 2025-09-01/Subvolumes_Metadata.json + * x-ms-original-file: 2025-09-01-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 0ceaa5906c2a..ab346ad9cbcc 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: 2025-09-01/Subvolumes_Get.json + * x-ms-original-file: 2025-09-01-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 675edb0babf6..527d0acdce94 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: 2025-09-01/Subvolumes_List.json + * x-ms-original-file: 2025-09-01-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 2dc97a0440c5..4ee06fdb33e1 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: 2025-09-01/Subvolumes_Update.json + * x-ms-original-file: 2025-09-01-preview/Subvolumes_Update.json */ /** * Sample code: Subvolumes_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsCreateSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsCreateSamples.java index 62e16c4c7e89..00355be0fe37 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsCreateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsCreateSamples.java @@ -17,7 +17,7 @@ */ public final class VolumeGroupsCreateSamples { /* - * x-ms-original-file: 2025-09-01/VolumeGroups_Create_SapHana.json + * x-ms-original-file: 2025-09-01-preview/VolumeGroups_Create_SapHana.json */ /** * Sample code: VolumeGroups_Create_SapHana. @@ -177,7 +177,7 @@ public static void volumeGroupsCreateSapHana(com.azure.resourcemanager.netapp.Ne } /* - * x-ms-original-file: 2025-09-01/VolumeGroups_Create_Oracle.json + * x-ms-original-file: 2025-09-01-preview/VolumeGroups_Create_Oracle.json */ /** * Sample code: VolumeGroups_Create_Oracle. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteSamples.java index c3e64ce5774a..0e9717581890 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: 2025-09-01/VolumeGroups_Delete.json + * x-ms-original-file: 2025-09-01-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 656144c05fa8..60e09407379d 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: 2025-09-01/VolumeGroups_Get_SapHana.json + * x-ms-original-file: 2025-09-01-preview/VolumeGroups_Get_SapHana.json */ /** * Sample code: VolumeGroups_Get_SapHana. @@ -21,7 +21,7 @@ public static void volumeGroupsGetSapHana(com.azure.resourcemanager.netapp.NetAp } /* - * x-ms-original-file: 2025-09-01/VolumeGroups_Get_Oracle.json + * x-ms-original-file: 2025-09-01-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 5b48a2008dae..55d301b6e183 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: 2025-09-01/VolumeGroups_List_Oracle.json + * x-ms-original-file: 2025-09-01-preview/VolumeGroups_List_Oracle.json */ /** * Sample code: VolumeGroups_List_Oracle. @@ -21,7 +21,7 @@ public static void volumeGroupsListOracle(com.azure.resourcemanager.netapp.NetAp } /* - * x-ms-original-file: 2025-09-01/VolumeGroups_List_SapHana.json + * x-ms-original-file: 2025-09-01-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 3d097e73a102..c25f1e2285c2 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: 2025-09-01/VolumeQuotaRules_Create.json + * x-ms-original-file: 2025-09-01-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 2df4f1d19825..8d7f2ab1cbb4 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: 2025-09-01/VolumeQuotaRules_Delete.json + * x-ms-original-file: 2025-09-01-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 08c8b6a75e29..838088aa5e8e 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: 2025-09-01/VolumeQuotaRules_Get.json + * x-ms-original-file: 2025-09-01-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 9f7599edf407..63c337e8451c 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: 2025-09-01/VolumeQuotaRules_List.json + * x-ms-original-file: 2025-09-01-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 5a94bcecc23d..b080727d4c60 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: 2025-09-01/VolumeQuotaRules_Update.json + * x-ms-original-file: 2025-09-01-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 b205d0bc0054..5283c4434921 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: 2025-09-01/Volumes_AuthorizeExternalReplication.json + * x-ms-original-file: 2025-09-01-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 34b9b6342778..1fefdd4f5485 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: 2025-09-01/Volumes_AuthorizeReplication.json + * x-ms-original-file: 2025-09-01-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 006789c38340..16c7dd559117 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: 2025-09-01/Volumes_BreakFileLocks.json + * x-ms-original-file: 2025-09-01-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 eaece8caf6c1..31c46f23e89d 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: 2025-09-01/Volumes_BreakReplication.json + * x-ms-original-file: 2025-09-01-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 ffda98db1e22..05fff37bf485 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesCreateOrUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class VolumesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_CreateOrUpdate.json + * x-ms-original-file: 2025-09-01-preview/Volumes_CreateOrUpdate.json */ /** * Sample code: Volumes_CreateOrUpdate. @@ -26,7 +26,7 @@ public static void volumesCreateOrUpdate(com.azure.resourcemanager.netapp.NetApp .withCreationToken("my-unique-file-path") .withUsageThreshold(107374182400L) .withSubnetId( - "/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3") .withServiceLevel(ServiceLevel.PREMIUM) .create(); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationSamples.java index 7f130eeee4b8..33293acbd34f 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: 2025-09-01/Volumes_DeleteReplication.json + * x-ms-original-file: 2025-09-01-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 47fcdbe2c2f4..71b720876795 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: 2025-09-01/Volumes_Delete.json + * x-ms-original-file: 2025-09-01-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 baf9935b60ec..aec7efd5038f 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: 2025-09-01/Volumes_FinalizeExternalReplication.json + * x-ms-original-file: 2025-09-01-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 8114f4870e13..19ec62835de0 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: 2025-09-01/Volumes_FinalizeRelocation.json + * x-ms-original-file: 2025-09-01-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 65c3dbc905e6..d76819fc2f0b 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesGetSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesGetSamples.java @@ -9,7 +9,19 @@ */ public final class VolumesGetSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_Get.json + * x-ms-original-file: 2025-09-01-preview/Volumes_ExtraLargeVolumes_Get.json + */ + /** + * Sample code: Volumes_ExtralargeVolumeGet. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesExtralargeVolumeGet(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes().getWithResponse("myRG", "account1", "pool1", "volume1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01-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 472bd2a60c4a..b48c08145504 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: 2025-09-01/GroupIdListForLDAPUser.json + * x-ms-original-file: 2025-09-01-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 new file mode 100644 index 000000000000..3c017b0de9c1 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListQuotaReportSamples.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 Volumes ListQuotaReport. + */ +public final class VolumesListQuotaReportSamples { + /* + * x-ms-original-file: 2025-09-01-preview/Volumes_ListQuotaReport.json + */ + /** + * Sample code: ListQuotaReport. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void listQuotaReport(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes().listQuotaReport("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/VolumesListReplicationsSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListReplicationsSamples.java index 513e30c171db..5232af7839ad 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: 2025-09-01/Volumes_ListReplications.json + * x-ms-original-file: 2025-09-01-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 6d2efcf9afd0..11efdceac1cf 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesListSamples.java @@ -9,7 +9,19 @@ */ public final class VolumesListSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_List.json + * x-ms-original-file: 2025-09-01-preview/Volumes_ExtraLargeVolumes_List.json + */ + /** + * Sample code: Volumes_ExtralargeVolumeList. + * + * @param manager Entry point to NetAppFilesManager. + */ + public static void volumesExtralargeVolumeList(com.azure.resourcemanager.netapp.NetAppFilesManager manager) { + manager.volumes().list("myRG", "account1", "pool1", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-09-01-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 7e603cf9f754..da484f6ae192 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: 2025-09-01/Volumes_PeerExternalCluster.json + * x-ms-original-file: 2025-09-01-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 6e7bc9ebd77d..02d604dea7fc 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: 2025-09-01/Volumes_PerformReplicationTransfer.json + * x-ms-original-file: 2025-09-01-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 3d880fc4ba34..9f97993189a5 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: 2025-09-01/Volumes_PoolChange.json + * x-ms-original-file: 2025-09-01-preview/Volumes_PoolChange.json */ /** * Sample code: Volumes_AuthorizeReplication. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPopulateAvailabilityZoneSamples.java b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesPopulateAvailabilityZoneSamples.java index a60fc57ce04c..ce2e51682330 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: 2025-09-01/Volumes_PopulateAvailabilityZones.json + * x-ms-original-file: 2025-09-01-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 eafb4ce9cd0d..b4808d37eb27 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: 2025-09-01/Volumes_ReInitializeReplication.json + * x-ms-original-file: 2025-09-01-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 2a97a8ecc57f..574e741169eb 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: 2025-09-01/Volumes_ReestablishReplication.json + * x-ms-original-file: 2025-09-01-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 9167cd674f44..c9102acf2943 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: 2025-09-01/Volumes_Relocate.json + * x-ms-original-file: 2025-09-01-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 28bf41629cea..d299c82071ba 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: 2025-09-01/Volumes_ReplicationStatus.json + * x-ms-original-file: 2025-09-01-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 3e4100c241be..f5ce5ca9662c 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: 2025-09-01/Volumes_ResetCifsPassword.json + * x-ms-original-file: 2025-09-01-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 270db0c5c89d..4c72f32863eb 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: 2025-09-01/Volumes_ResyncReplication.json + * x-ms-original-file: 2025-09-01-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 531c6f75c9af..40e14754311a 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: 2025-09-01/Volumes_RevertRelocation.json + * x-ms-original-file: 2025-09-01-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 870d9f4ca88e..da42db4be0d0 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: 2025-09-01/Volumes_Revert.json + * x-ms-original-file: 2025-09-01-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 adbae20d2d41..0d9bd0209bfc 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: 2025-09-01/Volumes_SplitClone.json + * x-ms-original-file: 2025-09-01-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 f65e179270fd..b8cb70c6d9b9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesUpdateSamples.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/VolumesUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class VolumesUpdateSamples { /* - * x-ms-original-file: 2025-09-01/Volumes_Update.json + * x-ms-original-file: 2025-09-01-preview/Volumes_Update.json */ /** * Sample code: Volumes_Update. diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AccountsRenewCredentialsMockTests.java index 2c651ea33afc..f2eb88d5a40f 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("jmvl", "yzgib", com.azure.core.util.Context.NONE); + manager.accounts().renewCredentials("dcvxodkrvfsxxby", "e", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AuthorizeRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/AuthorizeRequestTests.java index b3e633972c42..0c1130e8ae75 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 @@ -11,15 +11,15 @@ public final class AuthorizeRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AuthorizeRequest model = BinaryData.fromString("{\"remoteVolumeResourceId\":\"ylpstdbhhxsrzdz\"}") - .toObject(AuthorizeRequest.class); - Assertions.assertEquals("ylpstdbhhxsrzdz", model.remoteVolumeResourceId()); + AuthorizeRequest model + = BinaryData.fromString("{\"remoteVolumeResourceId\":\"konzmnsik\"}").toObject(AuthorizeRequest.class); + Assertions.assertEquals("konzmnsik", model.remoteVolumeResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AuthorizeRequest model = new AuthorizeRequest().withRemoteVolumeResourceId("ylpstdbhhxsrzdz"); + AuthorizeRequest model = new AuthorizeRequest().withRemoteVolumeResourceId("konzmnsik"); model = BinaryData.fromObject(model).toObject(AuthorizeRequest.class); - Assertions.assertEquals("ylpstdbhhxsrzdz", model.remoteVolumeResourceId()); + Assertions.assertEquals("konzmnsik", 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 eeb21d1bc725..f6bf726f53d7 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\":\"qirwrweoox\",\"provisioningState\":\"Succeeded\",\"dailyBackupsToKeep\":1625380187,\"weeklyBackupsToKeep\":2004143928,\"monthlyBackupsToKeep\":109793124,\"volumesAssigned\":225627049,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"bubqmamhsycxh\",\"volumeResourceId\":\"gaztt\",\"backupsCount\":184475150,\"policyEnabled\":true},{\"volumeName\":\"mfqhppubowse\",\"volumeResourceId\":\"fgkmtdhern\",\"backupsCount\":784188527,\"policyEnabled\":true},{\"volumeName\":\"ahokqtobkauxofsh\",\"volumeResourceId\":\"hwpnulaiywzejywh\",\"backupsCount\":898369730,\"policyEnabled\":true}]},\"etag\":\"pllndnp\",\"location\":\"rpqaf\",\"tags\":{\"yetefyp\":\"gsnnf\"},\"id\":\"coc\",\"name\":\"fjgtixrjvzuy\",\"type\":\"urmlmuo\"}"; + = "{\"properties\":{\"backupPolicyId\":\"fqiu\",\"provisioningState\":\"Succeeded\",\"dailyBackupsToKeep\":1863022211,\"weeklyBackupsToKeep\":1535738796,\"monthlyBackupsToKeep\":94242644,\"volumesAssigned\":1681361815,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"jboq\",\"volumeResourceId\":\"mtqjkqevadrmm\",\"backupsCount\":7044640,\"policyEnabled\":false},{\"volumeName\":\"c\",\"volumeResourceId\":\"z\",\"backupsCount\":2142539902,\"policyEnabled\":true}]},\"etag\":\"scz\",\"location\":\"oswoqiqazugamx\",\"tags\":{\"amnppcce\":\"rcoiis\",\"tdsbezax\":\"u\"},\"id\":\"f\",\"name\":\"kzxuiz\",\"type\":\"y\"}"; 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("jfrnxousxauzlwv") - .withRegion("fbcgwgcloxoebqin") - .withExistingNetAppAccount("qcbfrmbodths", "qgvriibakcla") - .withTags(mapOf("qlafcbahhpzpofoi", "nwjfu", "kholvd", "jwpfilkm")) - .withDailyBackupsToKeep(1962597445) - .withWeeklyBackupsToKeep(849660577) - .withMonthlyBackupsToKeep(1710129608) - .withEnabled(true) + .define("qladywrxwhydtlu") + .withRegion("h") + .withExistingNetAppAccount("eumoqod", "adppyibn") + .withTags(mapOf("lwyojbfqzdkfnj", "kvhd", "fratqxmbjroumzz", "ixh")) + .withDailyBackupsToKeep(658051997) + .withWeeklyBackupsToKeep(1037982388) + .withMonthlyBackupsToKeep(547930832) + .withEnabled(false) .create(); - Assertions.assertEquals("rpqaf", response.location()); - Assertions.assertEquals("gsnnf", response.tags().get("yetefyp")); - Assertions.assertEquals(1625380187, response.dailyBackupsToKeep()); - Assertions.assertEquals(2004143928, response.weeklyBackupsToKeep()); - Assertions.assertEquals(109793124, response.monthlyBackupsToKeep()); + Assertions.assertEquals("oswoqiqazugamx", response.location()); + Assertions.assertEquals("rcoiis", response.tags().get("amnppcce")); + Assertions.assertEquals(1863022211, response.dailyBackupsToKeep()); + Assertions.assertEquals(1535738796, response.weeklyBackupsToKeep()); + Assertions.assertEquals(94242644, 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 a790860e9718..f72227c2ba7e 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,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.backupPolicies().delete("auunfprnjletlx", "mr", "ddoui", com.azure.core.util.Context.NONE); + manager.backupPolicies().delete("saeuzanhsfnhsenw", "hpzfngqj", "lidftujwjj", 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 b12f3354e387..8253a7676606 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\":\"ojqtobaxk\",\"provisioningState\":\"ytunlbfjkwr\",\"dailyBackupsToKeep\":33332792,\"weeklyBackupsToKeep\":1630715289,\"monthlyBackupsToKeep\":2127509542,\"volumesAssigned\":90955577,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"qhd\",\"volumeResourceId\":\"xaulkpakdkifmjnn\",\"backupsCount\":827393653,\"policyEnabled\":false},{\"volumeName\":\"pxuckpggq\",\"volumeResourceId\":\"eyirdhlisngw\",\"backupsCount\":1258635298,\"policyEnabled\":false},{\"volumeName\":\"izruwnpqxpxiwfc\",\"volumeResourceId\":\"jsa\",\"backupsCount\":2137009925,\"policyEnabled\":true}]},\"etag\":\"mkzjvkviir\",\"location\":\"fgrwsdpgratzvz\",\"tags\":{\"tctbrxkjzwrgxffm\":\"byvi\",\"bydpizqaclnapxb\":\"hkwfbkgozxwop\",\"ugjknf\":\"yg\",\"uyilflqoiquvrehm\":\"mfcttux\"},\"id\":\"njhvsujztc\",\"name\":\"ytqj\",\"type\":\"w\"}"; + = "{\"properties\":{\"backupPolicyId\":\"ixldzyyfy\",\"provisioningState\":\"qsix\",\"dailyBackupsToKeep\":104830049,\"weeklyBackupsToKeep\":1092655779,\"monthlyBackupsToKeep\":1776640366,\"volumesAssigned\":1424381442,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"vsmb\",\"volumeResourceId\":\"lzoy\",\"backupsCount\":1157061379,\"policyEnabled\":true},{\"volumeName\":\"pqvyb\",\"volumeResourceId\":\"gvmxnok\",\"backupsCount\":199139815,\"policyEnabled\":true},{\"volumeName\":\"seskvcuar\",\"volumeResourceId\":\"hunlpirykycnd\",\"backupsCount\":355546006,\"policyEnabled\":true},{\"volumeName\":\"reuykbbmnwagl\",\"volumeResourceId\":\"xoe\",\"backupsCount\":1187567269,\"policyEnabled\":false}]},\"etag\":\"fwmyymv\",\"location\":\"bpbhfckdvezcrcss\",\"tags\":{\"hpavawu\":\"ddubbnqfblhkal\",\"ctteajohi\":\"iqjtiogqgdmin\",\"tp\":\"gspnbonhpczykm\"},\"id\":\"wxqcsehchkhufmpq\",\"name\":\"mqyjgy\",\"type\":\"zulo\"}"; 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("nbmhyree", "dzqavbpdqmjxlyyz", "lgouwtlmjj", com.azure.core.util.Context.NONE) + .getWithResponse("xxqcwgaxf", "vaknokzwjj", "r", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("fgrwsdpgratzvz", response.location()); - Assertions.assertEquals("byvi", response.tags().get("tctbrxkjzwrgxffm")); - Assertions.assertEquals(33332792, response.dailyBackupsToKeep()); - Assertions.assertEquals(1630715289, response.weeklyBackupsToKeep()); - Assertions.assertEquals(2127509542, response.monthlyBackupsToKeep()); - Assertions.assertFalse(response.enabled()); + Assertions.assertEquals("bpbhfckdvezcrcss", response.location()); + Assertions.assertEquals("ddubbnqfblhkal", response.tags().get("hpavawu")); + Assertions.assertEquals(104830049, response.dailyBackupsToKeep()); + Assertions.assertEquals(1092655779, response.weeklyBackupsToKeep()); + Assertions.assertEquals(1776640366, response.monthlyBackupsToKeep()); + Assertions.assertTrue(response.enabled()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPoliciesListMockTests.java index e7f869a5eddb..de641a9a266d 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\":\"tmaaj\",\"provisioningState\":\"huxy\",\"dailyBackupsToKeep\":356571550,\"weeklyBackupsToKeep\":150383679,\"monthlyBackupsToKeep\":1469986611,\"volumesAssigned\":932521293,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"spsp\",\"volumeResourceId\":\"c\",\"backupsCount\":311832546,\"policyEnabled\":true},{\"volumeName\":\"mspbpssdfpp\",\"volumeResourceId\":\"gt\",\"backupsCount\":857144221,\"policyEnabled\":true},{\"volumeName\":\"vczkcnyxrxmunjd\",\"volumeResourceId\":\"glnkvxlxpagl\",\"backupsCount\":685816396,\"policyEnabled\":true}]},\"etag\":\"cvkhpzvuqdfl\",\"location\":\"niypfpubcpzg\",\"tags\":{\"gqjxgpnrhgovfgp\":\"ivhjknidi\",\"zvuporqzdfuydz\":\"kqmhhaowjr\",\"xqpswok\":\"kfvxcnq\",\"kzsz\":\"vkhlggdhbemz\"},\"id\":\"wiwtglxxhl\",\"name\":\"fpgpicrmnzhrgm\",\"type\":\"gjsxv\"}]}"; + = "{\"value\":[{\"properties\":{\"backupPolicyId\":\"iqswbqer\",\"provisioningState\":\"xiytxtdgukvl\",\"dailyBackupsToKeep\":795825658,\"weeklyBackupsToKeep\":201041686,\"monthlyBackupsToKeep\":1426032563,\"volumesAssigned\":8081594,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"ewres\",\"volumeResourceId\":\"owegmmutey\",\"backupsCount\":1286022280,\"policyEnabled\":false},{\"volumeName\":\"igijiitnspxlz\",\"volumeResourceId\":\"sygrijwa\",\"backupsCount\":76122921,\"policyEnabled\":false},{\"volumeName\":\"aybfu\",\"volumeResourceId\":\"frojsydgr\",\"backupsCount\":641548413,\"policyEnabled\":false}]},\"etag\":\"ywezskiecafyg\",\"location\":\"xieqv\",\"tags\":{\"lixqcah\":\"a\",\"jpodtbl\":\"hxalybxawo\"},\"id\":\"pkkwj\",\"name\":\"jodqhykincn\",\"type\":\"emehllizh\"}]}"; 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("amowaziynknlqwzd", "piwhxqs", com.azure.core.util.Context.NONE); + = manager.backupPolicies().list("fwbeqrkuorh", "ssruqnmdvhazcvj", com.azure.core.util.Context.NONE); - Assertions.assertEquals("niypfpubcpzg", response.iterator().next().location()); - Assertions.assertEquals("ivhjknidi", response.iterator().next().tags().get("gqjxgpnrhgovfgp")); - Assertions.assertEquals(356571550, response.iterator().next().dailyBackupsToKeep()); - Assertions.assertEquals(150383679, response.iterator().next().weeklyBackupsToKeep()); - Assertions.assertEquals(1469986611, response.iterator().next().monthlyBackupsToKeep()); + Assertions.assertEquals("xieqv", response.iterator().next().location()); + Assertions.assertEquals("a", response.iterator().next().tags().get("lixqcah")); + Assertions.assertEquals(795825658, response.iterator().next().dailyBackupsToKeep()); + Assertions.assertEquals(201041686, response.iterator().next().weeklyBackupsToKeep()); + Assertions.assertEquals(1426032563, 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 432f098609d4..d52793c81253 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\":\"fltkacjv\",\"provisioningState\":\"kdlfoa\",\"dailyBackupsToKeep\":1662630957,\"weeklyBackupsToKeep\":631067005,\"monthlyBackupsToKeep\":2102238742,\"volumesAssigned\":488745932,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"pqblylsyxkqjnsj\",\"volumeResourceId\":\"vti\",\"backupsCount\":574368120,\"policyEnabled\":false},{\"volumeName\":\"zuempsbzkf\",\"volumeResourceId\":\"eyvpnqicvinvkj\",\"backupsCount\":611015935,\"policyEnabled\":true},{\"volumeName\":\"uukzclewyhmlw\",\"volumeResourceId\":\"ztzp\",\"backupsCount\":1158924531,\"policyEnabled\":false},{\"volumeName\":\"wyfzqwhxxbuyqa\",\"volumeResourceId\":\"feqztppriol\",\"backupsCount\":621148688,\"policyEnabled\":false}]},\"etag\":\"tolmncwsobqw\",\"location\":\"dbnw\",\"tags\":{\"sbjjc\":\"hucqdpfuvg\",\"udutnco\":\"nvxbvt\",\"xqtvcofu\":\"mr\"},\"id\":\"f\",\"name\":\"vkg\",\"type\":\"u\"},{\"properties\":{\"backupPolicyId\":\"dknnqvsazn\",\"provisioningState\":\"tor\",\"dailyBackupsToKeep\":761865502,\"weeklyBackupsToKeep\":1449495124,\"monthlyBackupsToKeep\":760670144,\"volumesAssigned\":220532000,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"uwjuetaeburuvdmo\",\"volumeResourceId\":\"mz\",\"backupsCount\":866846651,\"policyEnabled\":false},{\"volumeName\":\"q\",\"volumeResourceId\":\"fkifr\",\"backupsCount\":1599154818,\"policyEnabled\":true},{\"volumeName\":\"jmqlgkfb\",\"volumeResourceId\":\"doaon\",\"backupsCount\":1443237539,\"policyEnabled\":false}]},\"etag\":\"ujitcjedftww\",\"location\":\"zkoj\",\"tags\":{\"ybxarzgszu\":\"pzfoqoui\"},\"id\":\"oxciqopidoamcio\",\"name\":\"hkh\",\"type\":\"zxkhnzbonlwnto\"},{\"properties\":{\"backupPolicyId\":\"okdwb\",\"provisioningState\":\"kszzcmrvexztv\",\"dailyBackupsToKeep\":1159944878,\"weeklyBackupsToKeep\":125773376,\"monthlyBackupsToKeep\":505924755,\"volumesAssigned\":1333415720,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"wtl\",\"volumeResourceId\":\"guxawqaldsyuuxi\",\"backupsCount\":646205101,\"policyEnabled\":false},{\"volumeName\":\"bw\",\"volumeResourceId\":\"nkbykutwpfhp\",\"backupsCount\":145025413,\"policyEnabled\":false},{\"volumeName\":\"kdsnfdsdoakgtdl\",\"volumeResourceId\":\"kzevdlhewpusds\",\"backupsCount\":690711231,\"policyEnabled\":true}]},\"etag\":\"vbbejdcng\",\"location\":\"m\",\"tags\":{\"twaenuuzko\":\"ufgmjzrwrdg\",\"iefozbhdmsml\":\"bminrfdwoyuhhzi\"},\"id\":\"zqhof\",\"name\":\"rmaequ\",\"type\":\"ah\"},{\"properties\":{\"backupPolicyId\":\"cslfaoqzpiyylha\",\"provisioningState\":\"swhccsphk\",\"dailyBackupsToKeep\":185919180,\"weeklyBackupsToKeep\":2011273129,\"monthlyBackupsToKeep\":1466032347,\"volumesAssigned\":264431505,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"woluhczbwemhair\",\"volumeResourceId\":\"rgzdwmsweyp\",\"backupsCount\":2076786264,\"policyEnabled\":true},{\"volumeName\":\"icccn\",\"volumeResourceId\":\"huexmk\",\"backupsCount\":171161135,\"policyEnabled\":false},{\"volumeName\":\"lzywemhzrncsdtc\",\"volumeResourceId\":\"siypbs\",\"backupsCount\":1861224364,\"policyEnabled\":false}]},\"etag\":\"sl\",\"location\":\"adcy\",\"tags\":{\"elolppvksrpqvuj\":\"kyhejhzisxgf\",\"wib\":\"raehtwdwrft\",\"cstwity\":\"rcdlbhshfwpr\"},\"id\":\"hevxcced\",\"name\":\"pnmdyodnwzxltjcv\",\"type\":\"hlt\"}],\"nextLink\":\"gcxn\"}") + "{\"value\":[{\"properties\":{\"backupPolicyId\":\"iahxicsl\",\"provisioningState\":\"oqzpiyylha\",\"dailyBackupsToKeep\":105326418,\"weeklyBackupsToKeep\":324184633,\"monthlyBackupsToKeep\":2121485033,\"volumesAssigned\":391457389,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"witqscywuggwoluh\",\"volumeResourceId\":\"bwemhairs\",\"backupsCount\":558001686,\"policyEnabled\":true},{\"volumeName\":\"msweypqwdxggicc\",\"volumeResourceId\":\"xqhuexm\",\"backupsCount\":735026566,\"policyEnabled\":true},{\"volumeName\":\"vlz\",\"volumeResourceId\":\"emhzrncsdtc\",\"backupsCount\":1367209105,\"policyEnabled\":true},{\"volumeName\":\"bsfgytguslfea\",\"volumeResourceId\":\"ygqukyhejh\",\"backupsCount\":435176888,\"policyEnabled\":true}]},\"etag\":\"pelol\",\"location\":\"vk\",\"tags\":{\"swibyr\":\"qvujzraehtwdwrf\",\"h\":\"dl\",\"khevxccedc\":\"hfwpracstwit\",\"jc\":\"nmdyodnwzxl\"},\"id\":\"nhltiugcxn\",\"name\":\"vvwxqi\",\"type\":\"y\"}],\"nextLink\":\"nyowxwlmdjrkvfg\"}") .toObject(BackupPoliciesList.class); - Assertions.assertEquals("dbnw", model.value().get(0).location()); - Assertions.assertEquals("hucqdpfuvg", model.value().get(0).tags().get("sbjjc")); - Assertions.assertEquals(1662630957, model.value().get(0).dailyBackupsToKeep()); - Assertions.assertEquals(631067005, model.value().get(0).weeklyBackupsToKeep()); - Assertions.assertEquals(2102238742, model.value().get(0).monthlyBackupsToKeep()); + Assertions.assertEquals("vk", model.value().get(0).location()); + Assertions.assertEquals("qvujzraehtwdwrf", model.value().get(0).tags().get("swibyr")); + Assertions.assertEquals(105326418, model.value().get(0).dailyBackupsToKeep()); + Assertions.assertEquals(324184633, model.value().get(0).weeklyBackupsToKeep()); + Assertions.assertEquals(2121485033, model.value().get(0).monthlyBackupsToKeep()); Assertions.assertFalse(model.value().get(0).enabled()); - Assertions.assertEquals("gcxn", model.nextLink()); + Assertions.assertEquals("nyowxwlmdjrkvfg", 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 1aa3eb657faf..031c986af3ad 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\":\"cjzkzivgvvcna\",\"provisioningState\":\"hyrnxxmu\",\"dailyBackupsToKeep\":2127430069,\"weeklyBackupsToKeep\":742564082,\"monthlyBackupsToKeep\":1429248323,\"volumesAssigned\":233559890,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"tchealmf\",\"volumeResourceId\":\"d\",\"backupsCount\":1434664141,\"policyEnabled\":false},{\"volumeName\":\"wvgpiohg\",\"volumeResourceId\":\"rtfudxepxg\",\"backupsCount\":682770513,\"policyEnabled\":true}]},\"etag\":\"vmnpkukghimdblx\",\"location\":\"imfnjhfjx\",\"tags\":{\"foqreyfkzik\":\"zk\",\"wczelpci\":\"jawneaiv\",\"abfatkl\":\"elsfeaen\"},\"id\":\"dxbjhwuaanozj\",\"name\":\"sphyoulpjrvxa\",\"type\":\"l\"}") + "{\"properties\":{\"backupPolicyId\":\"sz\",\"provisioningState\":\"mpsbzkfzbeyv\",\"dailyBackupsToKeep\":358858891,\"weeklyBackupsToKeep\":2090410653,\"monthlyBackupsToKeep\":1110186498,\"volumesAssigned\":242850063,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"xrbuukzclew\",\"volumeResourceId\":\"mlwpazt\",\"backupsCount\":1897978322,\"policyEnabled\":false}]},\"etag\":\"ckw\",\"location\":\"zqwhxxbuyqaxzfeq\",\"tags\":{\"rjaltolmncw\":\"priolx\",\"cqdpfuv\":\"obqwcsdbnwdcfh\"},\"id\":\"lsbjjcanvxbv\",\"name\":\"vudutncor\",\"type\":\"r\"}") .toObject(BackupPolicyInner.class); - Assertions.assertEquals("imfnjhfjx", model.location()); - Assertions.assertEquals("zk", model.tags().get("foqreyfkzik")); - Assertions.assertEquals(2127430069, model.dailyBackupsToKeep()); - Assertions.assertEquals(742564082, model.weeklyBackupsToKeep()); - Assertions.assertEquals(1429248323, model.monthlyBackupsToKeep()); - Assertions.assertTrue(model.enabled()); + Assertions.assertEquals("zqwhxxbuyqaxzfeq", model.location()); + Assertions.assertEquals("priolx", model.tags().get("rjaltolmncw")); + Assertions.assertEquals(358858891, model.dailyBackupsToKeep()); + Assertions.assertEquals(2090410653, model.weeklyBackupsToKeep()); + Assertions.assertEquals(1110186498, model.monthlyBackupsToKeep()); + Assertions.assertFalse(model.enabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupPolicyInner model = new BackupPolicyInner().withLocation("imfnjhfjx") - .withTags(mapOf("foqreyfkzik", "zk", "wczelpci", "jawneaiv", "abfatkl", "elsfeaen")) - .withDailyBackupsToKeep(2127430069) - .withWeeklyBackupsToKeep(742564082) - .withMonthlyBackupsToKeep(1429248323) - .withEnabled(true); + BackupPolicyInner model = new BackupPolicyInner().withLocation("zqwhxxbuyqaxzfeq") + .withTags(mapOf("rjaltolmncw", "priolx", "cqdpfuv", "obqwcsdbnwdcfh")) + .withDailyBackupsToKeep(358858891) + .withWeeklyBackupsToKeep(2090410653) + .withMonthlyBackupsToKeep(1110186498) + .withEnabled(false); model = BinaryData.fromObject(model).toObject(BackupPolicyInner.class); - Assertions.assertEquals("imfnjhfjx", model.location()); - Assertions.assertEquals("zk", model.tags().get("foqreyfkzik")); - Assertions.assertEquals(2127430069, model.dailyBackupsToKeep()); - Assertions.assertEquals(742564082, model.weeklyBackupsToKeep()); - Assertions.assertEquals(1429248323, model.monthlyBackupsToKeep()); - Assertions.assertTrue(model.enabled()); + Assertions.assertEquals("zqwhxxbuyqaxzfeq", model.location()); + Assertions.assertEquals("priolx", model.tags().get("rjaltolmncw")); + Assertions.assertEquals(358858891, model.dailyBackupsToKeep()); + Assertions.assertEquals(2090410653, model.weeklyBackupsToKeep()); + Assertions.assertEquals(1110186498, model.monthlyBackupsToKeep()); + Assertions.assertFalse(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 2747488c5413..f77a519c6663 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,31 +14,31 @@ public final class BackupPolicyPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BackupPolicyPatch model = BinaryData.fromString( - "{\"location\":\"xrwlyc\",\"id\":\"uhpkxkgymar\",\"name\":\"n\",\"type\":\"xqugjhkycubedd\",\"tags\":{\"zqalkrmnjijpx\":\"ofwq\",\"byxbaaabjy\":\"cqqudf\",\"zrtuzq\":\"ayffim\",\"fdnw\":\"gsexne\"},\"properties\":{\"backupPolicyId\":\"ewzsyyceuzsoib\",\"provisioningState\":\"dpfrxtrthzvaytdw\",\"dailyBackupsToKeep\":1467238377,\"weeklyBackupsToKeep\":323414034,\"monthlyBackupsToKeep\":1725477484,\"volumesAssigned\":749295202,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"i\",\"volumeResourceId\":\"vpdtiirqtdqoa\",\"backupsCount\":200859544,\"policyEnabled\":false},{\"volumeName\":\"gsquyfxrxxlept\",\"volumeResourceId\":\"mxjezwlw\",\"backupsCount\":966805028,\"policyEnabled\":false},{\"volumeName\":\"cvydypatdoo\",\"volumeResourceId\":\"jkniodko\",\"backupsCount\":354248500,\"policyEnabled\":false},{\"volumeName\":\"jhemms\",\"volumeResourceId\":\"dkcrodt\",\"backupsCount\":1997229408,\"policyEnabled\":false}]}}") + "{\"location\":\"oxciqopidoamcio\",\"id\":\"khazxkhnzbonlwn\",\"name\":\"egokdwbwhkszzcmr\",\"type\":\"xztvbtqgsfraoyzk\",\"tags\":{\"aw\":\"tlmngu\"},\"properties\":{\"backupPolicyId\":\"dsyuuximerqfob\",\"provisioningState\":\"znkbykutwpfhpagm\",\"dailyBackupsToKeep\":1165571898,\"weeklyBackupsToKeep\":1595958724,\"monthlyBackupsToKeep\":803916344,\"volumesAssigned\":1293750730,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"gtdlmk\",\"volumeResourceId\":\"evdlh\",\"backupsCount\":1686383029,\"policyEnabled\":true},{\"volumeName\":\"sttwvogvbbe\",\"volumeResourceId\":\"cngqqmoakufgmjz\",\"backupsCount\":1463483261,\"policyEnabled\":false},{\"volumeName\":\"twaenuuzko\",\"volumeResourceId\":\"minrfdw\",\"backupsCount\":1704063633,\"policyEnabled\":true},{\"volumeName\":\"iuiefozbhdmsm\",\"volumeResourceId\":\"zqhof\",\"backupsCount\":1813126235,\"policyEnabled\":false}]}}") .toObject(BackupPolicyPatch.class); - Assertions.assertEquals("xrwlyc", model.location()); - Assertions.assertEquals("ofwq", model.tags().get("zqalkrmnjijpx")); - Assertions.assertEquals(1467238377, model.dailyBackupsToKeep()); - Assertions.assertEquals(323414034, model.weeklyBackupsToKeep()); - Assertions.assertEquals(1725477484, model.monthlyBackupsToKeep()); - Assertions.assertFalse(model.enabled()); + Assertions.assertEquals("oxciqopidoamcio", model.location()); + Assertions.assertEquals("tlmngu", model.tags().get("aw")); + Assertions.assertEquals(1165571898, model.dailyBackupsToKeep()); + Assertions.assertEquals(1595958724, model.weeklyBackupsToKeep()); + Assertions.assertEquals(803916344, model.monthlyBackupsToKeep()); + Assertions.assertTrue(model.enabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupPolicyPatch model = new BackupPolicyPatch().withLocation("xrwlyc") - .withTags(mapOf("zqalkrmnjijpx", "ofwq", "byxbaaabjy", "cqqudf", "zrtuzq", "ayffim", "fdnw", "gsexne")) - .withDailyBackupsToKeep(1467238377) - .withWeeklyBackupsToKeep(323414034) - .withMonthlyBackupsToKeep(1725477484) - .withEnabled(false); + BackupPolicyPatch model = new BackupPolicyPatch().withLocation("oxciqopidoamcio") + .withTags(mapOf("aw", "tlmngu")) + .withDailyBackupsToKeep(1165571898) + .withWeeklyBackupsToKeep(1595958724) + .withMonthlyBackupsToKeep(803916344) + .withEnabled(true); model = BinaryData.fromObject(model).toObject(BackupPolicyPatch.class); - Assertions.assertEquals("xrwlyc", model.location()); - Assertions.assertEquals("ofwq", model.tags().get("zqalkrmnjijpx")); - Assertions.assertEquals(1467238377, model.dailyBackupsToKeep()); - Assertions.assertEquals(323414034, model.weeklyBackupsToKeep()); - Assertions.assertEquals(1725477484, model.monthlyBackupsToKeep()); - Assertions.assertFalse(model.enabled()); + Assertions.assertEquals("oxciqopidoamcio", model.location()); + Assertions.assertEquals("tlmngu", model.tags().get("aw")); + Assertions.assertEquals(1165571898, model.dailyBackupsToKeep()); + Assertions.assertEquals(1595958724, model.weeklyBackupsToKeep()); + Assertions.assertEquals(803916344, 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/BackupPolicyPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BackupPolicyPropertiesTests.java index 7e7b692e74b1..bc5a44cecd15 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\":\"imjwosyt\",\"provisioningState\":\"tcs\",\"dailyBackupsToKeep\":1365275067,\"weeklyBackupsToKeep\":468391476,\"monthlyBackupsToKeep\":279496369,\"volumesAssigned\":1686364184,\"enabled\":true,\"volumeBackups\":[{\"volumeName\":\"zikhl\",\"volumeResourceId\":\"jhdgqggebdunyga\",\"backupsCount\":624778524,\"policyEnabled\":true}]}") + "{\"backupPolicyId\":\"qtvcofudflvkgj\",\"provisioningState\":\"gdknnqv\",\"dailyBackupsToKeep\":1989846717,\"weeklyBackupsToKeep\":2039923498,\"monthlyBackupsToKeep\":764676926,\"volumesAssigned\":1165613569,\"enabled\":false,\"volumeBackups\":[{\"volumeName\":\"a\",\"volumeResourceId\":\"kycgrauwj\",\"backupsCount\":515836708,\"policyEnabled\":false},{\"volumeName\":\"uruv\",\"volumeResourceId\":\"ovsm\",\"backupsCount\":1969431903,\"policyEnabled\":false},{\"volumeName\":\"mqoefkifrvtpuqu\",\"volumeResourceId\":\"qlgkfbtn\",\"backupsCount\":1601819937,\"policyEnabled\":false},{\"volumeName\":\"bjcntujitc\",\"volumeResourceId\":\"df\",\"backupsCount\":125087632,\"policyEnabled\":true}]}") .toObject(BackupPolicyProperties.class); - Assertions.assertEquals(1365275067, model.dailyBackupsToKeep()); - Assertions.assertEquals(468391476, model.weeklyBackupsToKeep()); - Assertions.assertEquals(279496369, model.monthlyBackupsToKeep()); - Assertions.assertTrue(model.enabled()); + Assertions.assertEquals(1989846717, model.dailyBackupsToKeep()); + Assertions.assertEquals(2039923498, model.weeklyBackupsToKeep()); + Assertions.assertEquals(764676926, model.monthlyBackupsToKeep()); + Assertions.assertFalse(model.enabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupPolicyProperties model = new BackupPolicyProperties().withDailyBackupsToKeep(1365275067) - .withWeeklyBackupsToKeep(468391476) - .withMonthlyBackupsToKeep(279496369) - .withEnabled(true); + BackupPolicyProperties model = new BackupPolicyProperties().withDailyBackupsToKeep(1989846717) + .withWeeklyBackupsToKeep(2039923498) + .withMonthlyBackupsToKeep(764676926) + .withEnabled(false); model = BinaryData.fromObject(model).toObject(BackupPolicyProperties.class); - Assertions.assertEquals(1365275067, model.dailyBackupsToKeep()); - Assertions.assertEquals(468391476, model.weeklyBackupsToKeep()); - Assertions.assertEquals(279496369, model.monthlyBackupsToKeep()); - Assertions.assertTrue(model.enabled()); + Assertions.assertEquals(1989846717, model.dailyBackupsToKeep()); + Assertions.assertEquals(2039923498, model.weeklyBackupsToKeep()); + Assertions.assertEquals(764676926, 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 0874d6d98669..7a89b77d124d 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\":[\"rxkpmloazuruoc\"],\"restoreFilePath\":\"oorb\",\"destinationVolumeId\":\"eoybfhjxakvvjgs\"}") + "{\"fileList\":[\"klelssxb\",\"ycsxzu\",\"ksrl\",\"mdesqp\"],\"restoreFilePath\":\"vmjcdoewb\",\"destinationVolumeId\":\"dyvt\"}") .toObject(BackupRestoreFiles.class); - Assertions.assertEquals("rxkpmloazuruoc", model.fileList().get(0)); - Assertions.assertEquals("oorb", model.restoreFilePath()); - Assertions.assertEquals("eoybfhjxakvvjgs", model.destinationVolumeId()); + Assertions.assertEquals("klelssxb", model.fileList().get(0)); + Assertions.assertEquals("vmjcdoewb", model.restoreFilePath()); + Assertions.assertEquals("dyvt", model.destinationVolumeId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupRestoreFiles model = new BackupRestoreFiles().withFileList(Arrays.asList("rxkpmloazuruoc")) - .withRestoreFilePath("oorb") - .withDestinationVolumeId("eoybfhjxakvvjgs"); + BackupRestoreFiles model + = new BackupRestoreFiles().withFileList(Arrays.asList("klelssxb", "ycsxzu", "ksrl", "mdesqp")) + .withRestoreFilePath("vmjcdoewb") + .withDestinationVolumeId("dyvt"); model = BinaryData.fromObject(model).toObject(BackupRestoreFiles.class); - Assertions.assertEquals("rxkpmloazuruoc", model.fileList().get(0)); - Assertions.assertEquals("oorb", model.restoreFilePath()); - Assertions.assertEquals("eoybfhjxakvvjgs", model.destinationVolumeId()); + Assertions.assertEquals("klelssxb", model.fileList().get(0)); + Assertions.assertEquals("vmjcdoewb", model.restoreFilePath()); + Assertions.assertEquals("dyvt", 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 9f61ca7f80d1..c91cac5c5b7a 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\":\"qatmtdhtmdvy\"},\"location\":\"ikdgszywkbir\",\"tags\":{\"hkjoqr\":\"zh\",\"mfiibfggj\":\"qqaatjinrvgou\",\"rwxkvtkkgl\":\"ool\"},\"id\":\"qwjygvja\",\"name\":\"vblm\",\"type\":\"vkzuhbxvvyhgso\"}") + "{\"properties\":{\"provisioningState\":\"o\"},\"location\":\"ttpkiwkkbnujrywv\",\"tags\":{\"wiithtywub\":\"bfpncurdo\",\"fdntwjchrdgoih\":\"cbihwqk\",\"luudfdlwggytsb\":\"umwctondz\"},\"id\":\"tov\",\"name\":\"tgseinqfiufxqkn\",\"type\":\"irgne\"}") .toObject(BackupVaultInner.class); - Assertions.assertEquals("ikdgszywkbir", model.location()); - Assertions.assertEquals("zh", model.tags().get("hkjoqr")); + Assertions.assertEquals("ttpkiwkkbnujrywv", model.location()); + Assertions.assertEquals("bfpncurdo", model.tags().get("wiithtywub")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupVaultInner model = new BackupVaultInner().withLocation("ikdgszywkbir") - .withTags(mapOf("hkjoqr", "zh", "mfiibfggj", "qqaatjinrvgou", "rwxkvtkkgl", "ool")); + BackupVaultInner model = new BackupVaultInner().withLocation("ttpkiwkkbnujrywv") + .withTags(mapOf("wiithtywub", "bfpncurdo", "fdntwjchrdgoih", "cbihwqk", "luudfdlwggytsb", "umwctondz")); model = BinaryData.fromObject(model).toObject(BackupVaultInner.class); - Assertions.assertEquals("ikdgszywkbir", model.location()); - Assertions.assertEquals("zh", model.tags().get("hkjoqr")); + Assertions.assertEquals("ttpkiwkkbnujrywv", model.location()); + Assertions.assertEquals("bfpncurdo", model.tags().get("wiithtywub")); } // 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 603a5f1a2f41..0bf3ba840660 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,17 @@ public final class BackupVaultPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - BackupVaultPatch model = BinaryData.fromString( - "{\"tags\":{\"hrixkwmy\":\"hlmctlpdngitvgb\",\"hbpnaixexccbd\":\"jejveg\",\"htpwij\":\"eaxhcexdrrvqahqk\"}}") - .toObject(BackupVaultPatch.class); - Assertions.assertEquals("hlmctlpdngitvgb", model.tags().get("hrixkwmy")); + BackupVaultPatch model + = BinaryData.fromString("{\"tags\":{\"k\":\"pij\",\"c\":\"xfrdd\",\"ronasxift\":\"atiz\"}}") + .toObject(BackupVaultPatch.class); + Assertions.assertEquals("pij", model.tags().get("k")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupVaultPatch model = new BackupVaultPatch() - .withTags(mapOf("hrixkwmy", "hlmctlpdngitvgb", "hbpnaixexccbd", "jejveg", "htpwij", "eaxhcexdrrvqahqk")); + BackupVaultPatch model = new BackupVaultPatch().withTags(mapOf("k", "pij", "c", "xfrdd", "ronasxift", "atiz")); model = BinaryData.fromObject(model).toObject(BackupVaultPatch.class); - Assertions.assertEquals("hlmctlpdngitvgb", model.tags().get("hrixkwmy")); + Assertions.assertEquals("pij", model.tags().get("k")); } // 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 76b026caa2c2..d2b307b3a0b2 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\":\"yrqufegxuvwz\"}").toObject(BackupVaultProperties.class); + BackupVaultProperties model = BinaryData.fromString("{\"provisioningState\":\"twqmsniffcdmqnr\"}") + .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 533b9205e123..4a0d0457b293 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\":\"pgahxkumas\",\"tags\":{\"qepvufhbzeh\":\"acfdmmcpugme\",\"clgsc\":\"whoqhnlbqnbldxe\"},\"id\":\"orim\",\"name\":\"rsrrmoucsofldp\",\"type\":\"viyfcaabeolhbhlv\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"location\":\"qi\",\"tags\":{\"qdcadwvps\":\"xlhdj\",\"ybmrzoepnxwd\":\"zjiihjr\",\"xaurs\":\"wnjkgvfn\",\"pnqn\":\"ftibtyibuyvpirfq\"},\"id\":\"owsbedenrexkxbh\",\"name\":\"vucnulgmnh\",\"type\":\"evdyz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,14 +33,14 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BackupVault response = manager.backupVaults() - .define("napqo") - .withRegion("ybww") - .withExistingNetAppAccount("tfgxqbawpcb", "nzqcy") - .withTags(mapOf("muvapc", "vibidmhmwffpl")) + .define("g") + .withRegion("czjnc") + .withExistingNetAppAccount("pezkis", "qjm") + .withTags(mapOf("daswvpp", "yqv", "rr", "sqqzlgcndhz", "uww", "cfsrhkhgsn")) .create(); - Assertions.assertEquals("pgahxkumas", response.location()); - Assertions.assertEquals("acfdmmcpugme", response.tags().get("qepvufhbzeh")); + Assertions.assertEquals("qi", response.location()); + Assertions.assertEquals("xlhdj", response.tags().get("qdcadwvps")); } // 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 e6906d09aff6..e6138d789f1d 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\":\"yoogw\"},\"location\":\"nsduugwbsre\",\"tags\":{\"fuarenlvhht\":\"q\",\"bo\":\"lnvnafvvkyfedev\",\"minqcym\":\"lcqxypokk\"},\"id\":\"zng\",\"name\":\"bdxxe\",\"type\":\"unin\"}"; + = "{\"properties\":{\"provisioningState\":\"qqbtny\"},\"location\":\"ylxd\",\"tags\":{\"kottlwuhvajmailf\":\"abmvmsxbaevwjc\"},\"id\":\"mjjz\",\"name\":\"kzwjiqullq\",\"type\":\"bdmvrscmqerndbr\"}"; 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("hpfpazjzoywjxhp", "ulontacnpqwteht", "evrh", com.azure.core.util.Context.NONE) + .getWithResponse("ebgvo", "e", "tuoqujlyegqavni", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("nsduugwbsre", response.location()); - Assertions.assertEquals("q", response.tags().get("fuarenlvhht")); + Assertions.assertEquals("ylxd", response.location()); + Assertions.assertEquals("abmvmsxbaevwjc", response.tags().get("kottlwuhvajmailf")); } } 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 3ad600a99c3d..c622972921e9 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\":\"tmxxdtddmflhuy\"},\"location\":\"zv\",\"tags\":{\"prwnwvroevytlyo\":\"apxbannovvoxczy\",\"bcrymodizrx\":\"rrrouuxvnsa\",\"pmkmlmvevfx\":\"lobdxna\"},\"id\":\"op\",\"name\":\"hbzxli\",\"type\":\"hrdd\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"iii\"},\"location\":\"pfoh\",\"tags\":{\"zbeewoiymrvzbju\":\"kxbbcbrwjiutgnj\"},\"id\":\"rsrziuctix\",\"name\":\"bdsuifr\",\"type\":\"vka\"}]}"; 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("udbchaqdtv", "ec", com.azure.core.util.Context.NONE); + = manager.backupVaults().listByNetAppAccount("yeofltfnnxrkad", "fynn", com.azure.core.util.Context.NONE); - Assertions.assertEquals("zv", response.iterator().next().location()); - Assertions.assertEquals("apxbannovvoxczy", response.iterator().next().tags().get("prwnwvroevytlyo")); + Assertions.assertEquals("pfoh", response.iterator().next().location()); + Assertions.assertEquals("kxbbcbrwjiutgnj", response.iterator().next().tags().get("zbeewoiymrvzbju")); } } 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 c326c3a821b0..52af06c18292 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\":\"svfycxzbfv\"},\"location\":\"wvrvmtg\",\"tags\":{\"nsxkmcwaekrrjr\":\"pyostronzmyhgfi\",\"jglikkxwslolb\":\"afxtsgum\",\"elfk\":\"pvuzlmv\",\"njwmwkpnbsazejj\":\"gplcrpwjxeznoigb\"},\"id\":\"qkagfhsxt\",\"name\":\"augzxnfaazpxdtn\",\"type\":\"dm\"},{\"properties\":{\"provisioningState\":\"jlwuenvrkp\"},\"location\":\"uaibrebqaaysj\",\"tags\":{\"zlwfffiakp\":\"qtnqtt\",\"tmmjihyeozph\":\"pqqmted\"},\"id\":\"wau\",\"name\":\"qncygupkvi\",\"type\":\"mdscwxqupev\"},{\"properties\":{\"provisioningState\":\"stotxh\"},\"location\":\"ujbypelmcuvhixb\",\"tags\":{\"yl\":\"fw\",\"ujrywvtyl\":\"coolsttpkiwkkb\"},\"id\":\"fpncurdo\",\"name\":\"wiithtywub\",\"type\":\"cbihwqk\"}],\"nextLink\":\"dntwjchrdgo\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"zh\"},\"location\":\"wesgogczh\",\"tags\":{\"gnyhmossxkkg\":\"xkr\",\"rghxjb\":\"h\",\"rnsvbuswd\":\"hqxvcxgfrpdsofbs\",\"ybycnunvj\":\"z\"},\"id\":\"rtkfawnopq\",\"name\":\"ikyzirtxdy\",\"type\":\"x\"}],\"nextLink\":\"jntpsewgioilqu\"}") .toObject(BackupVaultsList.class); - Assertions.assertEquals("wvrvmtg", model.value().get(0).location()); - Assertions.assertEquals("pyostronzmyhgfi", model.value().get(0).tags().get("nsxkmcwaekrrjr")); - Assertions.assertEquals("dntwjchrdgo", model.nextLink()); + Assertions.assertEquals("wesgogczh", model.value().get(0).location()); + Assertions.assertEquals("xkr", model.value().get(0).tags().get("gnyhmossxkkg")); + Assertions.assertEquals("jntpsewgioilqu", 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 0bab8ea8b7d5..75aa775bfcaf 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\":\"mwmdxmebwjscjpa\",\"creationDate\":\"2021-10-23T16:03:49Z\",\"snapshotCreationDate\":\"2021-07-30T12:17:23Z\",\"completionDate\":\"2021-09-27T23:30:18Z\",\"provisioningState\":\"Succeeded\",\"size\":3284652238021656307,\"label\":\"jddtvqct\",\"backupType\":\"Manual\",\"failureReason\":\"jaeukmrsieekpn\",\"volumeResourceId\":\"zaapmudqmeqwi\",\"useExistingSnapshot\":false,\"snapshotName\":\"udqwyxebeybpmzz\",\"backupPolicyResourceId\":\"tffyaqit\",\"isLargeVolume\":false},\"id\":\"ioqaqhvs\",\"name\":\"ufuqyrx\",\"type\":\"dlcgqlsismjqfr\"}"; + = "{\"properties\":{\"backupId\":\"d\",\"creationDate\":\"2021-05-07T12:56:20Z\",\"snapshotCreationDate\":\"2021-02-04T21:16:01Z\",\"completionDate\":\"2021-08-05T12:55:53Z\",\"provisioningState\":\"Succeeded\",\"size\":7367059070988318333,\"label\":\"nkyhf\",\"backupType\":\"Scheduled\",\"failureReason\":\"qxfx\",\"volumeResourceId\":\"elgcmpzqjhhhqx\",\"useExistingSnapshot\":false,\"snapshotName\":\"cacoyvivbsiz\",\"backupPolicyResourceId\":\"jszlb\",\"isLargeVolume\":true},\"id\":\"lzijiufehgmvflnw\",\"name\":\"v\",\"type\":\"kxrerlniylylyfwx\"}"; 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("egprhptil") - .withExistingBackupVault("jcsheafid", "tugsresmkssjh", "iftxfkf") - .withVolumeResourceId("ylhjlm") - .withLabel("phbqz") - .withUseExistingSnapshot(false) - .withSnapshotName("primr") + .define("mqkra") + .withExistingBackupVault("ujvaannggi", "cwkdtaaw", "wfekaumrrqmb") + .withVolumeResourceId("jkutycyarnr") + .withLabel("wnf") + .withUseExistingSnapshot(true) + .withSnapshotName("uabzoghkt") .create(); - Assertions.assertEquals("jddtvqct", response.label()); - Assertions.assertEquals("zaapmudqmeqwi", response.volumeResourceId()); + Assertions.assertEquals("nkyhf", response.label()); + Assertions.assertEquals("elgcmpzqjhhhqx", response.volumeResourceId()); Assertions.assertFalse(response.useExistingSnapshot()); - Assertions.assertEquals("udqwyxebeybpmzz", response.snapshotName()); + Assertions.assertEquals("cacoyvivbsiz", 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 2596376bec7d..5f9ee67150bd 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\":\"dosfjbjsvgjrw\",\"errorMessage\":\"yvycytdclxgcckn\",\"lastTransferSize\":6413704895289470933,\"lastTransferType\":\"tmvpdvjdhtt\",\"totalTransferBytes\":6530762857956828664,\"transferProgressBytes\":4806267712213844002}"; + = "{\"healthy\":false,\"relationshipStatus\":\"Failed\",\"mirrorState\":\"Broken\",\"unhealthyReason\":\"lxhrp\",\"errorMessage\":\"vmblcouqe\",\"lastTransferSize\":673107149709372039,\"lastTransferType\":\"dsz\",\"totalTransferBytes\":1740614878460579593,\"transferProgressBytes\":2829669234757088902}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,8 +30,7 @@ public void testGetLatestStatusWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BackupStatus response = manager.backups() - .getLatestStatusWithResponse("zvytnrzvuljraaer", "nok", "gukkjqnvbroy", "a", - com.azure.core.util.Context.NONE) + .getLatestStatusWithResponse("nrup", "a", "mrdixtreki", "swyskbruffg", 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 08ff6fdde0e1..0fd681839434 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\":true,\"relationshipStatus\":\"Idle\",\"mirrorState\":\"Mirrored\",\"unhealthyReason\":\"lgehg\",\"errorMessage\":\"ipifhpfeoajvg\",\"totalTransferBytes\":5736463297269671882}"; + = "{\"healthy\":false,\"relationshipStatus\":\"Failed\",\"mirrorState\":\"Mirrored\",\"unhealthyReason\":\"gxyivpinbmh\",\"errorMessage\":\"jijkgqxnhmbke\",\"totalTransferBytes\":4322750869756620511}"; 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("ihchrphkmcrjdqn", "dfzpbgtgkylkdg", "rjeuut", "wxezwzhok", + .getVolumeLatestRestoreStatusWithResponse("oypmbltoorm", "fqlwxldykalsy", "aolnjpnnbmjk", "ibjgsjjxxahm", 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 e6ec4cf9f5b2..4240478bcd17 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\":\"bjjidjksyxky\",\"creationDate\":\"2021-06-14T02:15:17Z\",\"snapshotCreationDate\":\"2021-09-27T05:48:08Z\",\"completionDate\":\"2021-01-08T06:53:43Z\",\"provisioningState\":\"jednlj\",\"size\":7592252826756292876,\"label\":\"aulx\",\"backupType\":\"Scheduled\",\"failureReason\":\"jbnkpp\",\"volumeResourceId\":\"ynenlsvxeizz\",\"useExistingSnapshot\":true,\"snapshotName\":\"nsrmffeycx\",\"backupPolicyResourceId\":\"tpiymerteea\",\"isLargeVolume\":true},\"id\":\"iekkkzddrtkgdojb\",\"name\":\"xv\",\"type\":\"vrefdeesv\"}"; + = "{\"properties\":{\"backupId\":\"qllizstac\",\"creationDate\":\"2021-11-02T08:18:23Z\",\"snapshotCreationDate\":\"2021-06-17T05:46:19Z\",\"completionDate\":\"2021-10-11T09:49:30Z\",\"provisioningState\":\"tk\",\"size\":5869518151221469081,\"label\":\"mvss\",\"backupType\":\"Scheduled\",\"failureReason\":\"pwamcxtczhupeuk\",\"volumeResourceId\":\"ijdu\",\"useExistingSnapshot\":false,\"snapshotName\":\"pydjfboc\",\"backupPolicyResourceId\":\"hhulrtywikdm\",\"isLargeVolume\":true},\"id\":\"uflgbhgauacdixm\",\"name\":\"ufr\",\"type\":\"ryjqgdkf\"}"; 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("wa", "pqg", "tjeaahhvjhh", "akz", com.azure.core.util.Context.NONE) + .getWithResponse("ukdqkkyihztg", "qm", "qzgwldoychil", "cecfehuwaoaguh", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("aulx", response.label()); - Assertions.assertEquals("ynenlsvxeizz", response.volumeResourceId()); - Assertions.assertTrue(response.useExistingSnapshot()); - Assertions.assertEquals("nsrmffeycx", response.snapshotName()); + Assertions.assertEquals("mvss", response.label()); + Assertions.assertEquals("ijdu", response.volumeResourceId()); + Assertions.assertFalse(response.useExistingSnapshot()); + Assertions.assertEquals("pydjfboc", 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 6c32bed8c791..9ad82f142740 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\":\"tvtzeexavoxtfg\",\"creationDate\":\"2021-10-13T21:26:08Z\",\"snapshotCreationDate\":\"2021-07-20T08:15:13Z\",\"completionDate\":\"2021-07-23T09:21:39Z\",\"provisioningState\":\"wpypqtgsfj\",\"size\":1144456929835288203,\"label\":\"hhxud\",\"backupType\":\"Manual\",\"failureReason\":\"d\",\"volumeResourceId\":\"tnsi\",\"useExistingSnapshot\":true,\"snapshotName\":\"z\",\"backupPolicyResourceId\":\"es\",\"isLargeVolume\":true},\"id\":\"pagzrcxfailcfxwm\",\"name\":\"boxdfgsftufq\",\"type\":\"brjlnacgcckknhxk\"}]}"; + = "{\"value\":[{\"properties\":{\"backupId\":\"kyojwyvfk\",\"creationDate\":\"2021-05-05T00:51:27Z\",\"snapshotCreationDate\":\"2021-06-23T13:57:06Z\",\"completionDate\":\"2021-08-25T01:06:04Z\",\"provisioningState\":\"sgxjc\",\"size\":7154860054764368087,\"label\":\"scubiwsdrnpxqwod\",\"backupType\":\"Scheduled\",\"failureReason\":\"xcjr\",\"volumeResourceId\":\"muabwibvjogjonmc\",\"useExistingSnapshot\":true,\"snapshotName\":\"y\",\"backupPolicyResourceId\":\"amwineofvfkakp\",\"isLargeVolume\":false},\"id\":\"vevboclzh\",\"name\":\"jknyu\",\"type\":\"gvttx\"}]}"; 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("cuijpxt", "s", "wprtu", "wsawddjibabxvi", com.azure.core.util.Context.NONE); + .listByVault("ozo", "oqbvjhvefgwbmqj", "hntasfaymx", "ulpzealb", com.azure.core.util.Context.NONE); - Assertions.assertEquals("hhxud", response.iterator().next().label()); - Assertions.assertEquals("tnsi", response.iterator().next().volumeResourceId()); + Assertions.assertEquals("scubiwsdrnpxqwod", response.iterator().next().label()); + Assertions.assertEquals("muabwibvjogjonmc", response.iterator().next().volumeResourceId()); Assertions.assertTrue(response.iterator().next().useExistingSnapshot()); - Assertions.assertEquals("z", response.iterator().next().snapshotName()); + Assertions.assertEquals("y", 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 51255718ef31..21fbcfbcd503 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\":\"srhnjivo\"}").toObject(BackupsMigrationRequest.class); - Assertions.assertEquals("srhnjivo", model.backupVaultId()); + = BinaryData.fromString("{\"backupVaultId\":\"oihiqak\"}").toObject(BackupsMigrationRequest.class); + Assertions.assertEquals("oihiqak", model.backupVaultId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BackupsMigrationRequest model = new BackupsMigrationRequest().withBackupVaultId("srhnjivo"); + BackupsMigrationRequest model = new BackupsMigrationRequest().withBackupVaultId("oihiqak"); model = BinaryData.fromObject(model).toObject(BackupsMigrationRequest.class); - Assertions.assertEquals("srhnjivo", model.backupVaultId()); + Assertions.assertEquals("oihiqak", 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 1b276fbc805b..83099e33f130 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\":\"xb\",\"confirmRunningDisruptiveOperation\":false}") + = BinaryData.fromString("{\"clientIp\":\"dnbbglzps\",\"confirmRunningDisruptiveOperation\":true}") .toObject(BreakFileLocksRequest.class); - Assertions.assertEquals("xb", model.clientIp()); - Assertions.assertFalse(model.confirmRunningDisruptiveOperation()); + Assertions.assertEquals("dnbbglzps", model.clientIp()); + Assertions.assertTrue(model.confirmRunningDisruptiveOperation()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { BreakFileLocksRequest model - = new BreakFileLocksRequest().withClientIp("xb").withConfirmRunningDisruptiveOperation(false); + = new BreakFileLocksRequest().withClientIp("dnbbglzps").withConfirmRunningDisruptiveOperation(true); model = BinaryData.fromObject(model).toObject(BreakFileLocksRequest.class); - Assertions.assertEquals("xb", model.clientIp()); - Assertions.assertFalse(model.confirmRunningDisruptiveOperation()); + Assertions.assertEquals("dnbbglzps", 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 5dcf0a26cbbe..ed69d49d979f 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\":true}").toObject(BreakReplicationRequest.class); - Assertions.assertTrue(model.forceBreakReplication()); + = BinaryData.fromString("{\"forceBreakReplication\":false}").toObject(BreakReplicationRequest.class); + Assertions.assertFalse(model.forceBreakReplication()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BreakReplicationRequest model = new BreakReplicationRequest().withForceBreakReplication(true); + BreakReplicationRequest model = new BreakReplicationRequest().withForceBreakReplication(false); model = BinaryData.fromObject(model).toObject(BreakReplicationRequest.class); - Assertions.assertTrue(model.forceBreakReplication()); + Assertions.assertFalse(model.forceBreakReplication()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketInnerTests.java new file mode 100644 index 000000000000..b661ec2a0b2e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketInnerTests.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.fluent.models.BucketInner; +import com.azure.resourcemanager.netapp.models.BucketPermissions; +import com.azure.resourcemanager.netapp.models.BucketServerProperties; +import com.azure.resourcemanager.netapp.models.CifsUser; +import com.azure.resourcemanager.netapp.models.FileSystemUser; +import com.azure.resourcemanager.netapp.models.NfsUser; +import org.junit.jupiter.api.Assertions; + +public final class BucketInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BucketInner model = BinaryData.fromString( + "{\"properties\":{\"path\":\"dxtqmieoxo\",\"fileSystemUser\":{\"nfsUser\":{\"userId\":467906638726749311,\"groupId\":8304527452172450889},\"cifsUser\":{\"username\":\"bghhavgrvkf\"}},\"provisioningState\":\"Deleting\",\"status\":\"NoCredentialsSet\",\"server\":{\"fqdn\":\"jbibg\",\"certificateCommonName\":\"fxumv\",\"certificateExpiryDate\":\"2021-01-01T02:20:38Z\",\"ipAddress\":\"yo\",\"certificateObject\":\"xnbkfezzxscyhwzd\"},\"permissions\":\"ReadWrite\"},\"id\":\"jbzbomvzzbtdcq\",\"name\":\"pniyujviyl\",\"type\":\"dshf\"}") + .toObject(BucketInner.class); + Assertions.assertEquals("dxtqmieoxo", model.path()); + Assertions.assertEquals(467906638726749311L, model.fileSystemUser().nfsUser().userId()); + Assertions.assertEquals(8304527452172450889L, model.fileSystemUser().nfsUser().groupId()); + Assertions.assertEquals("bghhavgrvkf", model.fileSystemUser().cifsUser().username()); + Assertions.assertEquals("jbibg", model.server().fqdn()); + Assertions.assertEquals("xnbkfezzxscyhwzd", model.server().certificateObject()); + Assertions.assertEquals(BucketPermissions.READ_WRITE, model.permissions()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BucketInner model = new BucketInner().withPath("dxtqmieoxo") + .withFileSystemUser(new FileSystemUser() + .withNfsUser(new NfsUser().withUserId(467906638726749311L).withGroupId(8304527452172450889L)) + .withCifsUser(new CifsUser().withUsername("bghhavgrvkf"))) + .withServer(new BucketServerProperties().withFqdn("jbibg").withCertificateObject("xnbkfezzxscyhwzd")) + .withPermissions(BucketPermissions.READ_WRITE); + model = BinaryData.fromObject(model).toObject(BucketInner.class); + Assertions.assertEquals("dxtqmieoxo", model.path()); + Assertions.assertEquals(467906638726749311L, model.fileSystemUser().nfsUser().userId()); + Assertions.assertEquals(8304527452172450889L, model.fileSystemUser().nfsUser().groupId()); + Assertions.assertEquals("bghhavgrvkf", model.fileSystemUser().cifsUser().username()); + Assertions.assertEquals("jbibg", model.server().fqdn()); + Assertions.assertEquals("xnbkfezzxscyhwzd", model.server().certificateObject()); + Assertions.assertEquals(BucketPermissions.READ_WRITE, model.permissions()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketListTests.java new file mode 100644 index 000000000000..c1b9fb40a9db --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketListTests.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.implementation.models.BucketList; +import com.azure.resourcemanager.netapp.models.BucketPermissions; +import org.junit.jupiter.api.Assertions; + +public final class BucketListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BucketList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"path\":\"tczheydbsdshmkx\",\"fileSystemUser\":{\"nfsUser\":{\"userId\":1073794426491374095,\"groupId\":1583716455501843510},\"cifsUser\":{\"username\":\"pltfnhtba\"}},\"provisioningState\":\"Accepted\",\"status\":\"NoCredentialsSet\",\"server\":{\"fqdn\":\"ckpyklyhplu\",\"certificateCommonName\":\"pvruudlg\",\"certificateExpiryDate\":\"2021-06-03T13:51:34Z\",\"ipAddress\":\"hostgktstvdxecl\",\"certificateObject\":\"dqbcvhzlhplod\"},\"permissions\":\"ReadWrite\"},\"id\":\"wwqfbumlkxtrqj\",\"name\":\"smlmbtxhwgfwsrta\",\"type\":\"coezbrhubskh\"},{\"properties\":{\"path\":\"goo\",\"fileSystemUser\":{\"nfsUser\":{\"userId\":9221028808795014470,\"groupId\":9063355381863639034},\"cifsUser\":{\"username\":\"orfmluiqt\"}},\"provisioningState\":\"Accepted\",\"status\":\"Active\",\"server\":{\"fqdn\":\"nqqyba\",\"certificateCommonName\":\"euayjkqabqgzsles\",\"certificateExpiryDate\":\"2021-04-30T14:41:30Z\",\"ipAddress\":\"ernntiewdjcvbquw\",\"certificateObject\":\"ehwagoh\"},\"permissions\":\"ReadOnly\"},\"id\":\"kmr\",\"name\":\"emvvhm\",\"type\":\"tdrjfutacoebj\"}],\"nextLink\":\"wzcjznmwcpmgua\"}") + .toObject(BucketList.class); + Assertions.assertEquals("tczheydbsdshmkx", model.value().get(0).path()); + Assertions.assertEquals(1073794426491374095L, model.value().get(0).fileSystemUser().nfsUser().userId()); + Assertions.assertEquals(1583716455501843510L, model.value().get(0).fileSystemUser().nfsUser().groupId()); + Assertions.assertEquals("pltfnhtba", model.value().get(0).fileSystemUser().cifsUser().username()); + Assertions.assertEquals("ckpyklyhplu", model.value().get(0).server().fqdn()); + Assertions.assertEquals("dqbcvhzlhplod", model.value().get(0).server().certificateObject()); + Assertions.assertEquals(BucketPermissions.READ_WRITE, model.value().get(0).permissions()); + Assertions.assertEquals("wzcjznmwcpmgua", model.nextLink()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketPatchPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketPatchPropertiesTests.java new file mode 100644 index 000000000000..b2b3ae73a401 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketPatchPropertiesTests.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.fluent.models.BucketPatchProperties; +import com.azure.resourcemanager.netapp.models.BucketPatchPermissions; +import com.azure.resourcemanager.netapp.models.BucketServerPatchProperties; +import com.azure.resourcemanager.netapp.models.CifsUser; +import com.azure.resourcemanager.netapp.models.FileSystemUser; +import com.azure.resourcemanager.netapp.models.NfsUser; +import org.junit.jupiter.api.Assertions; + +public final class BucketPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BucketPatchProperties model = BinaryData.fromString( + "{\"path\":\"cvdsrhnj\",\"fileSystemUser\":{\"nfsUser\":{\"userId\":8488959780262323,\"groupId\":7983763858754092425},\"cifsUser\":{\"username\":\"zgemjdftuljlt\"}},\"provisioningState\":\"Patching\",\"server\":{\"fqdn\":\"mtmczuome\",\"certificateObject\":\"cwwqiokn\"},\"permissions\":\"ReadWrite\"}") + .toObject(BucketPatchProperties.class); + Assertions.assertEquals("cvdsrhnj", model.path()); + Assertions.assertEquals(8488959780262323L, model.fileSystemUser().nfsUser().userId()); + Assertions.assertEquals(7983763858754092425L, model.fileSystemUser().nfsUser().groupId()); + Assertions.assertEquals("zgemjdftuljlt", model.fileSystemUser().cifsUser().username()); + Assertions.assertEquals("mtmczuome", model.server().fqdn()); + Assertions.assertEquals("cwwqiokn", model.server().certificateObject()); + Assertions.assertEquals(BucketPatchPermissions.READ_WRITE, model.permissions()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BucketPatchProperties model = new BucketPatchProperties().withPath("cvdsrhnj") + .withFileSystemUser(new FileSystemUser() + .withNfsUser(new NfsUser().withUserId(8488959780262323L).withGroupId(7983763858754092425L)) + .withCifsUser(new CifsUser().withUsername("zgemjdftuljlt"))) + .withServer(new BucketServerPatchProperties().withFqdn("mtmczuome").withCertificateObject("cwwqiokn")) + .withPermissions(BucketPatchPermissions.READ_WRITE); + model = BinaryData.fromObject(model).toObject(BucketPatchProperties.class); + Assertions.assertEquals("cvdsrhnj", model.path()); + Assertions.assertEquals(8488959780262323L, model.fileSystemUser().nfsUser().userId()); + Assertions.assertEquals(7983763858754092425L, model.fileSystemUser().nfsUser().groupId()); + Assertions.assertEquals("zgemjdftuljlt", model.fileSystemUser().cifsUser().username()); + Assertions.assertEquals("mtmczuome", model.server().fqdn()); + Assertions.assertEquals("cwwqiokn", model.server().certificateObject()); + Assertions.assertEquals(BucketPatchPermissions.READ_WRITE, model.permissions()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketPatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketPatchTests.java new file mode 100644 index 000000000000..7ebccb30e4fc --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketPatchTests.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.BucketPatch; +import com.azure.resourcemanager.netapp.models.BucketPatchPermissions; +import com.azure.resourcemanager.netapp.models.BucketServerPatchProperties; +import com.azure.resourcemanager.netapp.models.CifsUser; +import com.azure.resourcemanager.netapp.models.FileSystemUser; +import com.azure.resourcemanager.netapp.models.NfsUser; +import org.junit.jupiter.api.Assertions; + +public final class BucketPatchTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BucketPatch model = BinaryData.fromString( + "{\"properties\":{\"path\":\"eacvl\",\"fileSystemUser\":{\"nfsUser\":{\"userId\":3388042618474963234,\"groupId\":188251228216861002},\"cifsUser\":{\"username\":\"twnawjslbiwkojgc\"}},\"provisioningState\":\"Creating\",\"server\":{\"fqdn\":\"mznbaeqphch\",\"certificateObject\":\"rn\"},\"permissions\":\"ReadOnly\"},\"id\":\"huwrykqgaifm\",\"name\":\"iklbydvkhb\",\"type\":\"jdz\"}") + .toObject(BucketPatch.class); + Assertions.assertEquals("eacvl", model.path()); + Assertions.assertEquals(3388042618474963234L, model.fileSystemUser().nfsUser().userId()); + Assertions.assertEquals(188251228216861002L, model.fileSystemUser().nfsUser().groupId()); + Assertions.assertEquals("twnawjslbiwkojgc", model.fileSystemUser().cifsUser().username()); + Assertions.assertEquals("mznbaeqphch", model.server().fqdn()); + Assertions.assertEquals("rn", model.server().certificateObject()); + Assertions.assertEquals(BucketPatchPermissions.READ_ONLY, model.permissions()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BucketPatch model = new BucketPatch().withPath("eacvl") + .withFileSystemUser(new FileSystemUser() + .withNfsUser(new NfsUser().withUserId(3388042618474963234L).withGroupId(188251228216861002L)) + .withCifsUser(new CifsUser().withUsername("twnawjslbiwkojgc"))) + .withServer(new BucketServerPatchProperties().withFqdn("mznbaeqphch").withCertificateObject("rn")) + .withPermissions(BucketPatchPermissions.READ_ONLY); + model = BinaryData.fromObject(model).toObject(BucketPatch.class); + Assertions.assertEquals("eacvl", model.path()); + Assertions.assertEquals(3388042618474963234L, model.fileSystemUser().nfsUser().userId()); + Assertions.assertEquals(188251228216861002L, model.fileSystemUser().nfsUser().groupId()); + Assertions.assertEquals("twnawjslbiwkojgc", model.fileSystemUser().cifsUser().username()); + Assertions.assertEquals("mznbaeqphch", model.server().fqdn()); + Assertions.assertEquals("rn", model.server().certificateObject()); + Assertions.assertEquals(BucketPatchPermissions.READ_ONLY, model.permissions()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketPropertiesTests.java new file mode 100644 index 000000000000..238ad98db011 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketPropertiesTests.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.fluent.models.BucketProperties; +import com.azure.resourcemanager.netapp.models.BucketPermissions; +import com.azure.resourcemanager.netapp.models.BucketServerProperties; +import com.azure.resourcemanager.netapp.models.CifsUser; +import com.azure.resourcemanager.netapp.models.FileSystemUser; +import com.azure.resourcemanager.netapp.models.NfsUser; +import org.junit.jupiter.api.Assertions; + +public final class BucketPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BucketProperties model = BinaryData.fromString( + "{\"path\":\"n\",\"fileSystemUser\":{\"nfsUser\":{\"userId\":2550755186475487656,\"groupId\":4011927311891556520},\"cifsUser\":{\"username\":\"aojfm\"}},\"provisioningState\":\"Patching\",\"status\":\"NoCredentialsSet\",\"server\":{\"fqdn\":\"fhir\",\"certificateCommonName\":\"ymoxoftpipiwyczu\",\"certificateExpiryDate\":\"2021-05-14T09:28:57Z\",\"ipAddress\":\"pqjlihhyusps\",\"certificateObject\":\"sdvlmfwdgzxulucv\"},\"permissions\":\"ReadWrite\"}") + .toObject(BucketProperties.class); + Assertions.assertEquals("n", model.path()); + Assertions.assertEquals(2550755186475487656L, model.fileSystemUser().nfsUser().userId()); + Assertions.assertEquals(4011927311891556520L, model.fileSystemUser().nfsUser().groupId()); + Assertions.assertEquals("aojfm", model.fileSystemUser().cifsUser().username()); + Assertions.assertEquals("fhir", model.server().fqdn()); + Assertions.assertEquals("sdvlmfwdgzxulucv", model.server().certificateObject()); + Assertions.assertEquals(BucketPermissions.READ_WRITE, model.permissions()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BucketProperties model = new BucketProperties().withPath("n") + .withFileSystemUser(new FileSystemUser() + .withNfsUser(new NfsUser().withUserId(2550755186475487656L).withGroupId(4011927311891556520L)) + .withCifsUser(new CifsUser().withUsername("aojfm"))) + .withServer(new BucketServerProperties().withFqdn("fhir").withCertificateObject("sdvlmfwdgzxulucv")) + .withPermissions(BucketPermissions.READ_WRITE); + model = BinaryData.fromObject(model).toObject(BucketProperties.class); + Assertions.assertEquals("n", model.path()); + Assertions.assertEquals(2550755186475487656L, model.fileSystemUser().nfsUser().userId()); + Assertions.assertEquals(4011927311891556520L, model.fileSystemUser().nfsUser().groupId()); + Assertions.assertEquals("aojfm", model.fileSystemUser().cifsUser().username()); + Assertions.assertEquals("fhir", model.server().fqdn()); + Assertions.assertEquals("sdvlmfwdgzxulucv", model.server().certificateObject()); + Assertions.assertEquals(BucketPermissions.READ_WRITE, model.permissions()); + } +} 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 new file mode 100644 index 000000000000..163b551e7e1c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketServerPatchPropertiesTests.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.BucketServerPatchProperties; +import org.junit.jupiter.api.Assertions; + +public final class BucketServerPatchPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BucketServerPatchProperties model + = BinaryData.fromString("{\"fqdn\":\"ojmsvpkjprvkwc\",\"certificateObject\":\"ql\"}") + .toObject(BucketServerPatchProperties.class); + Assertions.assertEquals("ojmsvpkjprvkwc", model.fqdn()); + Assertions.assertEquals("ql", model.certificateObject()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BucketServerPatchProperties model + = new BucketServerPatchProperties().withFqdn("ojmsvpkjprvkwc").withCertificateObject("ql"); + model = BinaryData.fromObject(model).toObject(BucketServerPatchProperties.class); + Assertions.assertEquals("ojmsvpkjprvkwc", model.fqdn()); + Assertions.assertEquals("ql", model.certificateObject()); + } +} 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 new file mode 100644 index 000000000000..a0175d4494d2 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketServerPropertiesTests.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.BucketServerProperties; +import org.junit.jupiter.api.Assertions; + +public final class BucketServerPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + BucketServerProperties model = BinaryData.fromString( + "{\"fqdn\":\"sutrgjup\",\"certificateCommonName\":\"utpwoqhihejqgw\",\"certificateExpiryDate\":\"2021-03-21T20:16:43Z\",\"ipAddress\":\"qntcypsxjvfoimwk\",\"certificateObject\":\"ircizjxvy\"}") + .toObject(BucketServerProperties.class); + Assertions.assertEquals("sutrgjup", model.fqdn()); + Assertions.assertEquals("ircizjxvy", model.certificateObject()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + BucketServerProperties model + = new BucketServerProperties().withFqdn("sutrgjup").withCertificateObject("ircizjxvy"); + model = BinaryData.fromObject(model).toObject(BucketServerProperties.class); + Assertions.assertEquals("sutrgjup", model.fqdn()); + Assertions.assertEquals("ircizjxvy", model.certificateObject()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..510d1c5eda2d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsCreateOrUpdateMockTests.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.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.Bucket; +import com.azure.resourcemanager.netapp.models.BucketPermissions; +import com.azure.resourcemanager.netapp.models.BucketServerProperties; +import com.azure.resourcemanager.netapp.models.CifsUser; +import com.azure.resourcemanager.netapp.models.FileSystemUser; +import com.azure.resourcemanager.netapp.models.NfsUser; +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 BucketsCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"path\":\"foxcx\",\"fileSystemUser\":{\"nfsUser\":{\"userId\":1543708796177391402,\"groupId\":1623834803788196043},\"cifsUser\":{\"username\":\"krmukmyjmkxett\"}},\"provisioningState\":\"Succeeded\",\"status\":\"CredentialsExpired\",\"server\":{\"fqdn\":\"qid\",\"certificateCommonName\":\"toqxjh\",\"certificateExpiryDate\":\"2021-08-12T22:31:31Z\",\"ipAddress\":\"qhtkbt\",\"certificateObject\":\"l\"},\"permissions\":\"ReadWrite\"},\"id\":\"dmbi\",\"name\":\"psnaww\",\"type\":\"qkzn\"}"; + + 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)); + + Bucket response = manager.buckets() + .define("yutrymd") + .withExistingVolume("pjptn", "wjhrsidqpxlbtpa", "f", "ngatwmy") + .withPath("jhp") + .withFileSystemUser(new FileSystemUser() + .withNfsUser(new NfsUser().withUserId(1031808729537103141L).withGroupId(6740048000390481231L)) + .withCifsUser(new CifsUser().withUsername("pldrlefgnaavuag"))) + .withServer(new BucketServerProperties().withFqdn("tnpdctuhspfefy").withCertificateObject("h")) + .withPermissions(BucketPermissions.READ_ONLY) + .create(); + + Assertions.assertEquals("foxcx", response.path()); + Assertions.assertEquals(1543708796177391402L, response.fileSystemUser().nfsUser().userId()); + Assertions.assertEquals(1623834803788196043L, response.fileSystemUser().nfsUser().groupId()); + Assertions.assertEquals("krmukmyjmkxett", response.fileSystemUser().cifsUser().username()); + Assertions.assertEquals("qid", response.server().fqdn()); + Assertions.assertEquals("l", response.server().certificateObject()); + Assertions.assertEquals(BucketPermissions.READ_WRITE, response.permissions()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsGetWithResponseMockTests.java new file mode 100644 index 000000000000..735f48c12216 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsGetWithResponseMockTests.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.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.Bucket; +import com.azure.resourcemanager.netapp.models.BucketPermissions; +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 BucketsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"path\":\"vuqbozoo\",\"fileSystemUser\":{\"nfsUser\":{\"userId\":8547000283721640460,\"groupId\":8793158195572566388},\"cifsUser\":{\"username\":\"bc\"}},\"provisioningState\":\"Succeeded\",\"status\":\"CredentialsExpired\",\"server\":{\"fqdn\":\"awqytllhdyzm\",\"certificateCommonName\":\"kzexnx\",\"certificateExpiryDate\":\"2021-06-14T23:11:42Z\",\"ipAddress\":\"ywymxgaabj\",\"certificateObject\":\"tfohf\"},\"permissions\":\"ReadWrite\"},\"id\":\"vkiwrsiwdyjqu\",\"name\":\"ykcrraue\",\"type\":\"kcsueho\"}"; + + 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)); + + Bucket response = manager.buckets() + .getWithResponse("fajs", "kskmqozzkivyhjrl", "izjixlq", "hefkwabsolronqq", "mgnlqxsjxtel", + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("vuqbozoo", response.path()); + Assertions.assertEquals(8547000283721640460L, response.fileSystemUser().nfsUser().userId()); + Assertions.assertEquals(8793158195572566388L, response.fileSystemUser().nfsUser().groupId()); + Assertions.assertEquals("bc", response.fileSystemUser().cifsUser().username()); + Assertions.assertEquals("awqytllhdyzm", response.server().fqdn()); + Assertions.assertEquals("tfohf", response.server().certificateObject()); + Assertions.assertEquals(BucketPermissions.READ_WRITE, response.permissions()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsListMockTests.java new file mode 100644 index 000000000000..fb0cae573ce9 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/BucketsListMockTests.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.Bucket; +import com.azure.resourcemanager.netapp.models.BucketPermissions; +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 BucketsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"path\":\"bnfddep\",\"fileSystemUser\":{\"nfsUser\":{\"userId\":8132115358222180607,\"groupId\":361997812372554358},\"cifsUser\":{\"username\":\"leexahvmywh\"}},\"provisioningState\":\"Deleting\",\"status\":\"CredentialsExpired\",\"server\":{\"fqdn\":\"csjjzyvoaqajuve\",\"certificateCommonName\":\"ptdmkrrbhmpful\",\"certificateExpiryDate\":\"2020-12-21T15:41:53Z\",\"ipAddress\":\"gybpmfb\",\"certificateObject\":\"nunmpzkrv\"},\"permissions\":\"ReadWrite\"},\"id\":\"kdschlzvfictnkjj\",\"name\":\"gcwn\",\"type\":\"hbkgfyrt\"}]}"; + + 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.buckets() + .list("ddacbcbgydlqidy", "mhmpty", "ilkfbnrqqxv", "tpbnfnqtxjtoma", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("bnfddep", response.iterator().next().path()); + Assertions.assertEquals(8132115358222180607L, response.iterator().next().fileSystemUser().nfsUser().userId()); + Assertions.assertEquals(361997812372554358L, response.iterator().next().fileSystemUser().nfsUser().groupId()); + Assertions.assertEquals("leexahvmywh", response.iterator().next().fileSystemUser().cifsUser().username()); + Assertions.assertEquals("csjjzyvoaqajuve", response.iterator().next().server().fqdn()); + Assertions.assertEquals("nunmpzkrv", response.iterator().next().server().certificateObject()); + Assertions.assertEquals(BucketPermissions.READ_WRITE, response.iterator().next().permissions()); + } +} 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 new file mode 100644 index 000000000000..d532b4fcf6a4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CacheMountTargetPropertiesTests.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.CacheMountTargetProperties; + +public final class CacheMountTargetPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CacheMountTargetProperties model = BinaryData + .fromString("{\"mountTargetId\":\"jlfrq\",\"ipAddress\":\"bajlka\",\"smbServerFqdn\":\"wxyiopidkqq\"}") + .toObject(CacheMountTargetProperties.class); + } +} 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 new file mode 100644 index 000000000000..131c5bdf8936 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CachesListPeeringPassphrasesWithResponseMockTests.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.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.PeeringPassphrases; +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 CachesListPeeringPassphrasesWithResponseMockTests { + @Test + public void testListPeeringPassphrasesWithResponse() throws Exception { + String responseStr + = "{\"clusterPeeringCommand\":\"oka\",\"clusterPeeringPassphrase\":\"vfejvqnttmbqda\",\"vserverPeeringCommand\":\"zfivfokpysthhzag\"}"; + + 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)); + + PeeringPassphrases response = manager.caches() + .listPeeringPassphrasesWithResponse("vzkwwwncknr", "dajlskzpt", "xulweucyrthxqle", "mcgcjeinue", + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("oka", response.clusterPeeringCommand()); + Assertions.assertEquals("vfejvqnttmbqda", response.clusterPeeringPassphrase()); + Assertions.assertEquals("zfivfokpysthhzag", 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 e7580558ec13..9b053dd10a4e 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,37 +17,36 @@ public final class CapacityPoolInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CapacityPoolInner model = BinaryData.fromString( - "{\"properties\":{\"poolId\":\"tnovqfzgemjdftul\",\"size\":7390049782510101354,\"serviceLevel\":\"Flexible\",\"provisioningState\":\"ceamtm\",\"totalThroughputMibps\":2.9999912,\"utilizedThroughputMibps\":1.4412522,\"customThroughputMibps\":418634069,\"qosType\":\"Auto\",\"coolAccess\":false,\"encryptionType\":\"Double\"},\"etag\":\"knssxmojm\",\"location\":\"p\",\"tags\":{\"zqljyxgtczh\":\"rvkwc\",\"hmkxmaehvbb\":\"ydbsd\",\"kgxywr\":\"uripltfnhtba\",\"uodpv\":\"kpyklyhp\"},\"id\":\"uudl\",\"name\":\"zibt\",\"type\":\"ostgkts\"}") + "{\"properties\":{\"poolId\":\"iwfbrkwpzdqtvhcs\",\"size\":9178428362658824056,\"serviceLevel\":\"Standard\",\"provisioningState\":\"axsipietgb\",\"totalThroughputMibps\":54.21325,\"utilizedThroughputMibps\":62.938946,\"customThroughputMibps\":1700868959,\"qosType\":\"Manual\",\"coolAccess\":true,\"encryptionType\":\"Double\"},\"etag\":\"pnfpubntnbat\",\"location\":\"iqsowsaaelc\",\"tags\":{\"cwmjvlg\":\"cjuhplrvkm\"},\"id\":\"ggcvk\",\"name\":\"y\",\"type\":\"izrzb\"}") .toObject(CapacityPoolInner.class); - Assertions.assertEquals("p", model.location()); - Assertions.assertEquals("rvkwc", model.tags().get("zqljyxgtczh")); - Assertions.assertEquals(7390049782510101354L, model.size()); - Assertions.assertEquals(ServiceLevel.FLEXIBLE, model.serviceLevel()); - Assertions.assertEquals(418634069, model.customThroughputMibps()); - Assertions.assertEquals(QosType.AUTO, model.qosType()); - Assertions.assertFalse(model.coolAccess()); + Assertions.assertEquals("iqsowsaaelc", model.location()); + Assertions.assertEquals("cjuhplrvkm", model.tags().get("cwmjvlg")); + Assertions.assertEquals(9178428362658824056L, model.size()); + Assertions.assertEquals(ServiceLevel.STANDARD, model.serviceLevel()); + Assertions.assertEquals(1700868959, model.customThroughputMibps()); + Assertions.assertEquals(QosType.MANUAL, model.qosType()); + Assertions.assertTrue(model.coolAccess()); Assertions.assertEquals(EncryptionType.DOUBLE, model.encryptionType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CapacityPoolInner model = new CapacityPoolInner().withLocation("p") - .withTags( - mapOf("zqljyxgtczh", "rvkwc", "hmkxmaehvbb", "ydbsd", "kgxywr", "uripltfnhtba", "uodpv", "kpyklyhp")) - .withSize(7390049782510101354L) - .withServiceLevel(ServiceLevel.FLEXIBLE) - .withCustomThroughputMibps(418634069) - .withQosType(QosType.AUTO) - .withCoolAccess(false) + CapacityPoolInner model = new CapacityPoolInner().withLocation("iqsowsaaelc") + .withTags(mapOf("cwmjvlg", "cjuhplrvkm")) + .withSize(9178428362658824056L) + .withServiceLevel(ServiceLevel.STANDARD) + .withCustomThroughputMibps(1700868959) + .withQosType(QosType.MANUAL) + .withCoolAccess(true) .withEncryptionType(EncryptionType.DOUBLE); model = BinaryData.fromObject(model).toObject(CapacityPoolInner.class); - Assertions.assertEquals("p", model.location()); - Assertions.assertEquals("rvkwc", model.tags().get("zqljyxgtczh")); - Assertions.assertEquals(7390049782510101354L, model.size()); - Assertions.assertEquals(ServiceLevel.FLEXIBLE, model.serviceLevel()); - Assertions.assertEquals(418634069, model.customThroughputMibps()); - Assertions.assertEquals(QosType.AUTO, model.qosType()); - Assertions.assertFalse(model.coolAccess()); + Assertions.assertEquals("iqsowsaaelc", model.location()); + Assertions.assertEquals("cjuhplrvkm", model.tags().get("cwmjvlg")); + Assertions.assertEquals(9178428362658824056L, model.size()); + Assertions.assertEquals(ServiceLevel.STANDARD, model.serviceLevel()); + Assertions.assertEquals(1700868959, model.customThroughputMibps()); + Assertions.assertEquals(QosType.MANUAL, model.qosType()); + Assertions.assertTrue(model.coolAccess()); Assertions.assertEquals(EncryptionType.DOUBLE, model.encryptionType()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CapacityPoolListTests.java index f8e28f7cca70..9e4c2935d01b 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\":\"agohbuff\",\"size\":2232582311474631364,\"serviceLevel\":\"Ultra\",\"provisioningState\":\"mvvhmxtdrjfuta\",\"totalThroughputMibps\":65.33831,\"utilizedThroughputMibps\":78.66932,\"customThroughputMibps\":650990462,\"qosType\":\"Manual\",\"coolAccess\":true,\"encryptionType\":\"Single\"},\"etag\":\"wcpmguaadraufac\",\"location\":\"ahzovajjziuxxp\",\"tags\":{\"enr\":\"eekulfgslqubkwd\",\"pjuohminyfl\":\"sutujba\"},\"id\":\"orwmduvwpklv\",\"name\":\"w\",\"type\":\"ygdxpgpqchis\"},{\"properties\":{\"poolId\":\"pnnbjc\",\"size\":7786397610725733542,\"serviceLevel\":\"Flexible\",\"provisioningState\":\"bdaxconfozauorsu\",\"totalThroughputMibps\":71.50412,\"utilizedThroughputMibps\":30.461628,\"customThroughputMibps\":1406759128,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Double\"},\"etag\":\"epzl\",\"location\":\"hw\",\"tags\":{\"wey\":\"l\",\"talywjhhgdnhxms\":\"qdunvmnnrwrbior\",\"omi\":\"v\"},\"id\":\"ox\",\"name\":\"gdufiqnd\",\"type\":\"euzaof\"},{\"properties\":{\"poolId\":\"hvcyyysfg\",\"size\":5917251343624011044,\"serviceLevel\":\"StandardZRS\",\"provisioningState\":\"biipuip\",\"totalThroughputMibps\":38.999645,\"utilizedThroughputMibps\":26.093245,\"customThroughputMibps\":1863787560,\"qosType\":\"Manual\",\"coolAccess\":false,\"encryptionType\":\"Single\"},\"etag\":\"shqvcimpev\",\"location\":\"mblrrilbywd\",\"tags\":{\"rwfscjfnynszquj\":\"icc\",\"gyavu\":\"zdvoqytibyowbb\",\"smsks\":\"pthjoxo\",\"lqol\":\"pi\"},\"id\":\"xkcgxxlxsffgcvi\",\"name\":\"qzdwlvwlyoup\",\"type\":\"gfbkjubdyh\"},{\"properties\":{\"poolId\":\"fminsgowzf\",\"size\":3309941778234907018,\"serviceLevel\":\"StandardZRS\",\"provisioningState\":\"ktlahbqa\",\"totalThroughputMibps\":96.70858,\"utilizedThroughputMibps\":52.75987,\"customThroughputMibps\":1217445631,\"qosType\":\"Manual\",\"coolAccess\":true,\"encryptionType\":\"Single\"},\"etag\":\"tg\",\"location\":\"q\",\"tags\":{\"rxcpjuisavo\":\"n\",\"ajlkatnw\":\"qdzfvazivjlfrqtt\"},\"id\":\"yiopi\",\"name\":\"kqqfk\",\"type\":\"vscx\"}],\"nextLink\":\"mligov\"}") + "{\"value\":[{\"properties\":{\"poolId\":\"uy\",\"size\":949937309271175136,\"serviceLevel\":\"StandardZRS\",\"provisioningState\":\"gmltxdw\",\"totalThroughputMibps\":32.105785,\"utilizedThroughputMibps\":12.045229,\"customThroughputMibps\":1986885457,\"qosType\":\"Auto\",\"coolAccess\":false,\"encryptionType\":\"Single\"},\"etag\":\"jzfpafolpymwamx\",\"location\":\"rag\",\"tags\":{\"a\":\"phtvdu\",\"jchcsrlzknmzla\":\"vl\"},\"id\":\"rupdwvnphcnzq\",\"name\":\"pjhmqrhvthl\",\"type\":\"iwdcxsmlzzhzd\"},{\"properties\":{\"poolId\":\"etlgydlhqvlnnpx\",\"size\":261958614734168787,\"serviceLevel\":\"StandardZRS\",\"provisioningState\":\"q\",\"totalThroughputMibps\":55.22094,\"utilizedThroughputMibps\":61.56215,\"customThroughputMibps\":339285731,\"qosType\":\"Auto\",\"coolAccess\":false,\"encryptionType\":\"Double\"},\"etag\":\"byu\",\"location\":\"dw\",\"tags\":{\"hj\":\"mzegjon\",\"zhzmtksjci\":\"rwgdnqzbrfks\"},\"id\":\"digsxcdgl\",\"name\":\"plkeuachtomflryt\",\"type\":\"wfpfmdgycx\"},{\"properties\":{\"poolId\":\"skw\",\"size\":839821646923287724,\"serviceLevel\":\"Ultra\",\"provisioningState\":\"slurlpshhkvpe\",\"totalThroughputMibps\":13.266796,\"utilizedThroughputMibps\":88.74406,\"customThroughputMibps\":510077945,\"qosType\":\"Auto\",\"coolAccess\":false,\"encryptionType\":\"Single\"},\"etag\":\"skondcbrwimu\",\"location\":\"ej\",\"tags\":{\"ljqobbpihehcecyb\":\"vyrrleaesinuq\",\"rexcrseqwjksghu\":\"rqbrjbbmpxdlvyk\",\"ggsvoujkxibdaf\":\"gzhxog\",\"xfbvfb\":\"rkmdyom\"},\"id\":\"dy\",\"name\":\"rhpw\",\"type\":\"gddeimaw\"},{\"properties\":{\"poolId\":\"vgkk\",\"size\":6795962972353206296,\"serviceLevel\":\"StandardZRS\",\"provisioningState\":\"jcjcazt\",\"totalThroughputMibps\":72.1469,\"utilizedThroughputMibps\":40.479446,\"customThroughputMibps\":62293461,\"qosType\":\"Auto\",\"coolAccess\":true,\"encryptionType\":\"Single\"},\"etag\":\"ikytwvczcswka\",\"location\":\"ejyfdvlvhbwrnfx\",\"tags\":{\"naoyank\":\"dpqthehn\",\"swankltytmh\":\"oe\"},\"id\":\"roznnhdrlktgj\",\"name\":\"sggux\",\"type\":\"eml\"}],\"nextLink\":\"waeeczgfb\"}") .toObject(CapacityPoolList.class); - Assertions.assertEquals("ahzovajjziuxxp", model.value().get(0).location()); - Assertions.assertEquals("eekulfgslqubkwd", model.value().get(0).tags().get("enr")); - Assertions.assertEquals(2232582311474631364L, model.value().get(0).size()); - Assertions.assertEquals(ServiceLevel.ULTRA, model.value().get(0).serviceLevel()); - Assertions.assertEquals(650990462, model.value().get(0).customThroughputMibps()); - Assertions.assertEquals(QosType.MANUAL, model.value().get(0).qosType()); - Assertions.assertTrue(model.value().get(0).coolAccess()); + Assertions.assertEquals("rag", model.value().get(0).location()); + Assertions.assertEquals("phtvdu", model.value().get(0).tags().get("a")); + Assertions.assertEquals(949937309271175136L, model.value().get(0).size()); + Assertions.assertEquals(ServiceLevel.STANDARD_ZRS, model.value().get(0).serviceLevel()); + Assertions.assertEquals(1986885457, 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("mligov", model.nextLink()); + Assertions.assertEquals("waeeczgfb", 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 ebf8b3eea75e..28d4f6449d4e 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\":\"btx\",\"id\":\"gfwsrtaw\",\"name\":\"ezbrhubskh\",\"type\":\"ygo\",\"tags\":{\"orfmluiqt\":\"kqfqjbvl\",\"vyvnqqyb\":\"zf\",\"yjkqabqgzslesjcb\":\"ryeu\"},\"properties\":{\"size\":908053922560982746,\"qosType\":\"Auto\",\"coolAccess\":false,\"customThroughputMibps\":1014646419}}") + "{\"location\":\"fizr\",\"id\":\"f\",\"name\":\"jmvl\",\"type\":\"z\",\"tags\":{\"jpu\":\"lkujrllfojui\",\"vtzejetjklnti\":\"yjucejikzoeo\",\"zolxrzvhqjwtr\":\"yjuzkdb\",\"rrkolawjmjs\":\"tgvgzp\"},\"properties\":{\"size\":6654247865499468513,\"qosType\":\"Manual\",\"coolAccess\":true,\"customThroughputMibps\":308582767}}") .toObject(CapacityPoolPatch.class); - Assertions.assertEquals("btx", model.location()); - Assertions.assertEquals("kqfqjbvl", model.tags().get("orfmluiqt")); - Assertions.assertEquals(908053922560982746L, model.size()); - Assertions.assertEquals(QosType.AUTO, model.qosType()); - Assertions.assertFalse(model.coolAccess()); - Assertions.assertEquals(1014646419, model.customThroughputMibps()); + Assertions.assertEquals("fizr", model.location()); + Assertions.assertEquals("lkujrllfojui", model.tags().get("jpu")); + Assertions.assertEquals(6654247865499468513L, model.size()); + Assertions.assertEquals(QosType.MANUAL, model.qosType()); + Assertions.assertTrue(model.coolAccess()); + Assertions.assertEquals(308582767, model.customThroughputMibps()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CapacityPoolPatch model = new CapacityPoolPatch().withLocation("btx") - .withTags(mapOf("orfmluiqt", "kqfqjbvl", "vyvnqqyb", "zf", "yjkqabqgzslesjcb", "ryeu")) - .withSize(908053922560982746L) - .withQosType(QosType.AUTO) - .withCoolAccess(false) - .withCustomThroughputMibps(1014646419); + CapacityPoolPatch model = new CapacityPoolPatch().withLocation("fizr") + .withTags(mapOf("jpu", "lkujrllfojui", "vtzejetjklnti", "yjucejikzoeo", "zolxrzvhqjwtr", "yjuzkdb", + "rrkolawjmjs", "tgvgzp")) + .withSize(6654247865499468513L) + .withQosType(QosType.MANUAL) + .withCoolAccess(true) + .withCustomThroughputMibps(308582767); model = BinaryData.fromObject(model).toObject(CapacityPoolPatch.class); - Assertions.assertEquals("btx", model.location()); - Assertions.assertEquals("kqfqjbvl", model.tags().get("orfmluiqt")); - Assertions.assertEquals(908053922560982746L, model.size()); - Assertions.assertEquals(QosType.AUTO, model.qosType()); - Assertions.assertFalse(model.coolAccess()); - Assertions.assertEquals(1014646419, model.customThroughputMibps()); + Assertions.assertEquals("fizr", model.location()); + Assertions.assertEquals("lkujrllfojui", model.tags().get("jpu")); + Assertions.assertEquals(6654247865499468513L, model.size()); + Assertions.assertEquals(QosType.MANUAL, model.qosType()); + Assertions.assertTrue(model.coolAccess()); + Assertions.assertEquals(308582767, model.customThroughputMibps()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ChangeZoneRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ChangeZoneRequestTests.java new file mode 100644 index 000000000000..a236323849df --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ChangeZoneRequestTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ChangeZoneRequest; +import org.junit.jupiter.api.Assertions; + +public final class ChangeZoneRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ChangeZoneRequest model = BinaryData.fromString("{\"newZone\":\"jnaeois\"}").toObject(ChangeZoneRequest.class); + Assertions.assertEquals("jnaeois", model.newZone()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ChangeZoneRequest model = new ChangeZoneRequest().withNewZone("jnaeois"); + model = BinaryData.fromObject(model).toObject(ChangeZoneRequest.class); + Assertions.assertEquals("jnaeois", 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 c25533f3e946..4eb1bfd5c6b8 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 @@ -12,11 +12,11 @@ public final class CheckAvailabilityResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CheckAvailabilityResponseInner model - = BinaryData.fromString("{\"isAvailable\":false,\"reason\":\"Invalid\",\"message\":\"npkc\"}") - .toObject(CheckAvailabilityResponseInner.class); + CheckAvailabilityResponseInner model = BinaryData + .fromString("{\"isAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"xnqmhrpqpdfwm\"}") + .toObject(CheckAvailabilityResponseInner.class); Assertions.assertFalse(model.isAvailable()); - Assertions.assertEquals(InAvailabilityReasonType.INVALID, model.reason()); - Assertions.assertEquals("npkc", model.message()); + Assertions.assertEquals(InAvailabilityReasonType.ALREADY_EXISTS, model.reason()); + Assertions.assertEquals("xnqmhrpqpdfwm", model.message()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckElasticResourceAvailabilityResponseInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckElasticResourceAvailabilityResponseInnerTests.java new file mode 100644 index 000000000000..c514a8e334e8 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckElasticResourceAvailabilityResponseInnerTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.fluent.models.CheckElasticResourceAvailabilityResponseInner; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityReason; +import com.azure.resourcemanager.netapp.models.CheckElasticResourceAvailabilityStatus; +import org.junit.jupiter.api.Assertions; + +public final class CheckElasticResourceAvailabilityResponseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CheckElasticResourceAvailabilityResponseInner model = BinaryData + .fromString("{\"isAvailable\":\"True\",\"reason\":\"AlreadyExists\",\"message\":\"wplefaxvxil\"}") + .toObject(CheckElasticResourceAvailabilityResponseInner.class); + Assertions.assertEquals(CheckElasticResourceAvailabilityStatus.TRUE, model.isAvailable()); + Assertions.assertEquals(CheckElasticResourceAvailabilityReason.ALREADY_EXISTS, model.reason()); + Assertions.assertEquals("wplefaxvxil", model.message()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckElasticVolumeFilePathAvailabilityRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CheckElasticVolumeFilePathAvailabilityRequestTests.java new file mode 100644 index 000000000000..deb3a1aca95c --- /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\":\"vhmgorffukis\"}") + .toObject(CheckElasticVolumeFilePathAvailabilityRequest.class); + Assertions.assertEquals("vhmgorffukis", model.filePath()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CheckElasticVolumeFilePathAvailabilityRequest model + = new CheckElasticVolumeFilePathAvailabilityRequest().withFilePath("vhmgorffukis"); + model = BinaryData.fromObject(model).toObject(CheckElasticVolumeFilePathAvailabilityRequest.class); + Assertions.assertEquals("vhmgorffukis", 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 new file mode 100644 index 000000000000..22a36117a266 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/CifsUserTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.CifsUser; +import org.junit.jupiter.api.Assertions; + +public final class CifsUserTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CifsUser model = BinaryData.fromString("{\"username\":\"wp\"}").toObject(CifsUser.class); + Assertions.assertEquals("wp", model.username()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CifsUser model = new CifsUser().withUsername("wp"); + model = BinaryData.fromObject(model).toObject(CifsUser.class); + Assertions.assertEquals("wp", 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 d55997c6c48a..560b04d0ee1e 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,8 +11,8 @@ public final class ClusterPeerCommandResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ClusterPeerCommandResponseInner model = BinaryData.fromString("{\"peerAcceptCommand\":\"iwjmygtdssls\"}") + ClusterPeerCommandResponseInner model = BinaryData.fromString("{\"peerAcceptCommand\":\"ibqdxbxwakbogqx\"}") .toObject(ClusterPeerCommandResponseInner.class); - Assertions.assertEquals("iwjmygtdssls", model.peerAcceptCommand()); + Assertions.assertEquals("ibqdxbxwakbogqx", model.peerAcceptCommand()); } } 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 d18f97ec2217..96a676fa804a 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\":351540832,\"hour\":1043474675,\"minute\":1810528552,\"usedBytes\":2246531138644222618}") + "{\"snapshotsToKeep\":1035814224,\"hour\":675446410,\"minute\":549865384,\"usedBytes\":5255537493272573987}") .toObject(DailySchedule.class); - Assertions.assertEquals(351540832, model.snapshotsToKeep()); - Assertions.assertEquals(1043474675, model.hour()); - Assertions.assertEquals(1810528552, model.minute()); - Assertions.assertEquals(2246531138644222618L, model.usedBytes()); + Assertions.assertEquals(1035814224, model.snapshotsToKeep()); + Assertions.assertEquals(675446410, model.hour()); + Assertions.assertEquals(549865384, model.minute()); + Assertions.assertEquals(5255537493272573987L, model.usedBytes()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DailySchedule model = new DailySchedule().withSnapshotsToKeep(351540832) - .withHour(1043474675) - .withMinute(1810528552) - .withUsedBytes(2246531138644222618L); + DailySchedule model = new DailySchedule().withSnapshotsToKeep(1035814224) + .withHour(675446410) + .withMinute(549865384) + .withUsedBytes(5255537493272573987L); model = BinaryData.fromObject(model).toObject(DailySchedule.class); - Assertions.assertEquals(351540832, model.snapshotsToKeep()); - Assertions.assertEquals(1043474675, model.hour()); - Assertions.assertEquals(1810528552, model.minute()); - Assertions.assertEquals(2246531138644222618L, model.usedBytes()); + Assertions.assertEquals(1035814224, model.snapshotsToKeep()); + Assertions.assertEquals(675446410, model.hour()); + Assertions.assertEquals(549865384, model.minute()); + Assertions.assertEquals(5255537493272573987L, model.usedBytes()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DestinationReplicationTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DestinationReplicationTests.java index 9f9824e96731..66f26193751f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DestinationReplicationTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/DestinationReplicationTests.java @@ -13,11 +13,11 @@ public final class DestinationReplicationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DestinationReplication model = BinaryData.fromString( - "{\"resourceId\":\"rgvtqag\",\"replicationType\":\"CrossRegionReplication\",\"region\":\"nhijggmebfsi\",\"zone\":\"butr\"}") + "{\"resourceId\":\"bxzpuzycisp\",\"replicationType\":\"CrossZoneReplication\",\"region\":\"hmgkbrpyy\",\"zone\":\"ibnuqqkpik\"}") .toObject(DestinationReplication.class); - Assertions.assertEquals("rgvtqag", model.resourceId()); - Assertions.assertEquals(ReplicationType.CROSS_REGION_REPLICATION, model.replicationType()); - Assertions.assertEquals("nhijggmebfsi", model.region()); - Assertions.assertEquals("butr", model.zone()); + Assertions.assertEquals("bxzpuzycisp", model.resourceId()); + Assertions.assertEquals(ReplicationType.CROSS_ZONE_REPLICATION, model.replicationType()); + Assertions.assertEquals("hmgkbrpyy", model.region()); + Assertions.assertEquals("ibnuqqkpik", model.zone()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupInnerTests.java new file mode 100644 index 000000000000..f55b49f0c07d --- /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-06-03T09:57:31Z\",\"snapshotCreationDate\":\"2021-11-29T08:31:04Z\",\"completionDate\":\"2021-04-04T17:04:10Z\",\"provisioningState\":\"Moving\",\"size\":6803616450546512715,\"label\":\"piwhxqs\",\"backupType\":\"Manual\",\"failureReason\":\"aajquhuxylrj\",\"elasticVolumeResourceId\":\"m\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"bmzyospsps\",\"elasticBackupPolicyResourceId\":\"kfkyjp\",\"volumeSize\":\"Regular\"},\"id\":\"pssdfppyogtie\",\"name\":\"ujtv\",\"type\":\"zkc\"}") + .toObject(ElasticBackupInner.class); + Assertions.assertEquals("piwhxqs", model.properties().label()); + Assertions.assertEquals("m", model.properties().elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.USE_EXISTING_SNAPSHOT, model.properties().snapshotUsage()); + Assertions.assertEquals("bmzyospsps", model.properties().elasticSnapshotResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticBackupInner model + = new ElasticBackupInner().withProperties(new ElasticBackupProperties().withLabel("piwhxqs") + .withElasticVolumeResourceId("m") + .withSnapshotUsage(SnapshotUsage.USE_EXISTING_SNAPSHOT) + .withElasticSnapshotResourceId("bmzyospsps")); + model = BinaryData.fromObject(model).toObject(ElasticBackupInner.class); + Assertions.assertEquals("piwhxqs", model.properties().label()); + Assertions.assertEquals("m", model.properties().elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.USE_EXISTING_SNAPSHOT, model.properties().snapshotUsage()); + Assertions.assertEquals("bmzyospsps", model.properties().elasticSnapshotResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupListResultTests.java new file mode 100644 index 000000000000..9c6fd1e41da1 --- /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-06-01T10:22:24Z\",\"snapshotCreationDate\":\"2021-06-04T12:48:03Z\",\"completionDate\":\"2021-07-13T05:51:22Z\",\"provisioningState\":\"Deleting\",\"size\":7097521120621616769,\"label\":\"uporqzdfu\",\"backupType\":\"Manual\",\"failureReason\":\"kfvxcnq\",\"elasticVolumeResourceId\":\"xqpswok\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"lgg\",\"elasticBackupPolicyResourceId\":\"bemzqkzszuwi\",\"volumeSize\":\"Regular\"},\"id\":\"xxhljfpgpic\",\"name\":\"mnzhrgmqg\",\"type\":\"sxvpqcbfrmbodths\"}],\"nextLink\":\"gvriibakclac\"}") + .toObject(ElasticBackupListResult.class); + Assertions.assertEquals("uporqzdfu", model.value().get(0).properties().label()); + Assertions.assertEquals("xqpswok", model.value().get(0).properties().elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.USE_EXISTING_SNAPSHOT, model.value().get(0).properties().snapshotUsage()); + Assertions.assertEquals("lgg", model.value().get(0).properties().elasticSnapshotResourceId()); + Assertions.assertEquals("gvriibakclac", model.nextLink()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..b4b6b01617e7 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesCreateOrUpdateMockTests.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.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\":1902620686,\"weeklyBackupsToKeep\":2022478169,\"monthlyBackupsToKeep\":182145934,\"assignedVolumesCount\":1776924821,\"policyState\":\"Disabled\"},\"eTag\":\"ejbsvsiaies\",\"location\":\"ddzydisnu\",\"tags\":{\"nldpxottd\":\"wyj\",\"ocqibz\":\"i\",\"ph\":\"ihweeb\"},\"id\":\"yv\",\"name\":\"jw\",\"type\":\"w\"}"; + + 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("okjxebjvb") + .withRegion("ehaqidoyzltgio") + .withExistingElasticAccount("xstcyilbvzm", "xcjzlquze") + .withTags(mapOf("aeapfsergd", "qpep")) + .withProperties(new ElasticBackupPolicyProperties().withDailyBackupsToKeep(716967552) + .withWeeklyBackupsToKeep(1595582968) + .withMonthlyBackupsToKeep(1539684502) + .withPolicyState(ElasticBackupPolicyState.ENABLED)) + .create(); + + Assertions.assertEquals("ddzydisnu", response.location()); + Assertions.assertEquals("wyj", response.tags().get("nldpxottd")); + Assertions.assertEquals(1902620686, response.properties().dailyBackupsToKeep()); + Assertions.assertEquals(2022478169, response.properties().weeklyBackupsToKeep()); + Assertions.assertEquals(182145934, response.properties().monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.DISABLED, response.properties().policyState()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPoliciesGetWithResponseMockTests.java new file mode 100644 index 000000000000..0b1394f17252 --- /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\":\"Updating\",\"dailyBackupsToKeep\":1772784576,\"weeklyBackupsToKeep\":395179970,\"monthlyBackupsToKeep\":1664350014,\"assignedVolumesCount\":253438393,\"policyState\":\"Disabled\"},\"eTag\":\"sx\",\"location\":\"d\",\"tags\":{\"gejkbvhh\":\"uyqaeohpj\",\"xb\":\"aurghooxa\"},\"id\":\"hxjxjoezlqxrkdkn\",\"name\":\"obektmbozo\",\"type\":\"tzamicbig\"}"; + + 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("xmolpcqydeyk", "skiczd", "rjeizik", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("d", response.location()); + Assertions.assertEquals("uyqaeohpj", response.tags().get("gejkbvhh")); + Assertions.assertEquals(1772784576, response.properties().dailyBackupsToKeep()); + Assertions.assertEquals(395179970, response.properties().weeklyBackupsToKeep()); + Assertions.assertEquals(1664350014, 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 000000000000..6100b905eef7 --- /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\":\"Accepted\",\"dailyBackupsToKeep\":1759829804,\"weeklyBackupsToKeep\":587215355,\"monthlyBackupsToKeep\":1644042909,\"assignedVolumesCount\":1570012392,\"policyState\":\"Disabled\"},\"eTag\":\"z\",\"location\":\"npx\",\"tags\":{\"yxelyicghflr\":\"dpr\",\"yghsf\":\"fss\",\"fgvqcpdw\":\"rkbhammgmqfm\",\"dcdjhunh\":\"gquxweysland\"},\"id\":\"hcgawn\",\"name\":\"rnquoxso\",\"type\":\"ireimseobf\"}]}"; + + 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("cdgzseznux", "euairaabmdlqjb", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("npx", response.iterator().next().location()); + Assertions.assertEquals("dpr", response.iterator().next().tags().get("yxelyicghflr")); + Assertions.assertEquals(1759829804, response.iterator().next().properties().dailyBackupsToKeep()); + Assertions.assertEquals(587215355, response.iterator().next().properties().weeklyBackupsToKeep()); + Assertions.assertEquals(1644042909, response.iterator().next().properties().monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.DISABLED, + response.iterator().next().properties().policyState()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyInnerTests.java new file mode 100644 index 000000000000..2ecb5d18146c --- /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\":\"Deleting\",\"dailyBackupsToKeep\":1507366395,\"weeklyBackupsToKeep\":1954364961,\"monthlyBackupsToKeep\":1664198206,\"assignedVolumesCount\":62384286,\"policyState\":\"Enabled\"},\"eTag\":\"okxcoxp\",\"location\":\"nje\",\"tags\":{\"g\":\"ltsxoatf\",\"rmozihmipgawt\":\"pnpbswveflocc\"},\"id\":\"xp\",\"name\":\"y\",\"type\":\"cxcjxgry\"}") + .toObject(ElasticBackupPolicyInner.class); + Assertions.assertEquals("nje", model.location()); + Assertions.assertEquals("ltsxoatf", model.tags().get("g")); + Assertions.assertEquals(1507366395, model.properties().dailyBackupsToKeep()); + Assertions.assertEquals(1954364961, model.properties().weeklyBackupsToKeep()); + Assertions.assertEquals(1664198206, model.properties().monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.ENABLED, model.properties().policyState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticBackupPolicyInner model = new ElasticBackupPolicyInner().withLocation("nje") + .withTags(mapOf("g", "ltsxoatf", "rmozihmipgawt", "pnpbswveflocc")) + .withProperties(new ElasticBackupPolicyProperties().withDailyBackupsToKeep(1507366395) + .withWeeklyBackupsToKeep(1954364961) + .withMonthlyBackupsToKeep(1664198206) + .withPolicyState(ElasticBackupPolicyState.ENABLED)); + model = BinaryData.fromObject(model).toObject(ElasticBackupPolicyInner.class); + Assertions.assertEquals("nje", model.location()); + Assertions.assertEquals("ltsxoatf", model.tags().get("g")); + Assertions.assertEquals(1507366395, model.properties().dailyBackupsToKeep()); + Assertions.assertEquals(1954364961, model.properties().weeklyBackupsToKeep()); + Assertions.assertEquals(1664198206, model.properties().monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.ENABLED, model.properties().policyState()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyListResultTests.java new file mode 100644 index 000000000000..05c359011f17 --- /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\":\"Moving\",\"dailyBackupsToKeep\":243577623,\"weeklyBackupsToKeep\":1828737583,\"monthlyBackupsToKeep\":167940342,\"assignedVolumesCount\":1720310055,\"policyState\":\"Disabled\"},\"eTag\":\"pndfcpfnznt\",\"location\":\"twk\",\"tags\":{\"tcqiosmg\":\"srxuzvoam\",\"xqdlyrtltlapr\":\"zah\",\"atbhjmznn\":\"tz\"},\"id\":\"s\",\"name\":\"qeqala\",\"type\":\"vlagun\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"dailyBackupsToKeep\":860612333,\"weeklyBackupsToKeep\":33751840,\"monthlyBackupsToKeep\":339622455,\"assignedVolumesCount\":1579880352,\"policyState\":\"Disabled\"},\"eTag\":\"eudzqavbpd\",\"location\":\"jxlyyzglgouwtlm\",\"tags\":{\"baxk\":\"uojqt\",\"lbfjkwr\":\"eytu\",\"hsyrqunj\":\"snkq\"},\"id\":\"hdenxaulk\",\"name\":\"akdkifmjnnawtqab\",\"type\":\"xuckpggqoweyir\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"dailyBackupsToKeep\":1719891120,\"weeklyBackupsToKeep\":600219061,\"monthlyBackupsToKeep\":1821607798,\"assignedVolumesCount\":586851649,\"policyState\":\"Disabled\"},\"eTag\":\"zruwn\",\"location\":\"xpxiwfcngjs\",\"tags\":{\"kv\":\"iixtmkzj\"},\"id\":\"irhgfgrwsdp\",\"name\":\"ra\",\"type\":\"zvzbglbyv\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"dailyBackupsToKeep\":2047549854,\"weeklyBackupsToKeep\":547924946,\"monthlyBackupsToKeep\":223173205,\"assignedVolumesCount\":2103940566,\"policyState\":\"Disabled\"},\"eTag\":\"ffm\",\"location\":\"kwfbkgo\",\"tags\":{\"napxbiygnug\":\"opdbydpizqac\",\"lq\":\"knfsmfcttuxuuyil\",\"njhvsujztc\":\"iquvrehm\"},\"id\":\"ytqj\",\"name\":\"w\",\"type\":\"auunfprnjletlx\"}],\"nextLink\":\"rpddouifamo\"}") + .toObject(ElasticBackupPolicyListResult.class); + Assertions.assertEquals("twk", model.value().get(0).location()); + Assertions.assertEquals("srxuzvoam", model.value().get(0).tags().get("tcqiosmg")); + Assertions.assertEquals(243577623, model.value().get(0).properties().dailyBackupsToKeep()); + Assertions.assertEquals(1828737583, model.value().get(0).properties().weeklyBackupsToKeep()); + Assertions.assertEquals(167940342, model.value().get(0).properties().monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.DISABLED, model.value().get(0).properties().policyState()); + Assertions.assertEquals("rpddouifamo", model.nextLink()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyPropertiesTests.java new file mode 100644 index 000000000000..79e037a2f689 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPolicyPropertiesTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyProperties; +import com.azure.resourcemanager.netapp.models.ElasticBackupPolicyState; +import org.junit.jupiter.api.Assertions; + +public final class ElasticBackupPolicyPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticBackupPolicyProperties model = BinaryData.fromString( + "{\"provisioningState\":\"Succeeded\",\"dailyBackupsToKeep\":451045794,\"weeklyBackupsToKeep\":756303284,\"monthlyBackupsToKeep\":1979879685,\"assignedVolumesCount\":1106517654,\"policyState\":\"Disabled\"}") + .toObject(ElasticBackupPolicyProperties.class); + Assertions.assertEquals(451045794, model.dailyBackupsToKeep()); + Assertions.assertEquals(756303284, model.weeklyBackupsToKeep()); + Assertions.assertEquals(1979879685, model.monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.DISABLED, model.policyState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticBackupPolicyProperties model = new ElasticBackupPolicyProperties().withDailyBackupsToKeep(451045794) + .withWeeklyBackupsToKeep(756303284) + .withMonthlyBackupsToKeep(1979879685) + .withPolicyState(ElasticBackupPolicyState.DISABLED); + model = BinaryData.fromObject(model).toObject(ElasticBackupPolicyProperties.class); + Assertions.assertEquals(451045794, model.dailyBackupsToKeep()); + Assertions.assertEquals(756303284, model.weeklyBackupsToKeep()); + Assertions.assertEquals(1979879685, model.monthlyBackupsToKeep()); + Assertions.assertEquals(ElasticBackupPolicyState.DISABLED, model.policyState()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupPropertiesTests.java new file mode 100644 index 000000000000..722507cb0b28 --- /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-09-20T04:44:22Z\",\"snapshotCreationDate\":\"2021-02-03T15:40:37Z\",\"completionDate\":\"2021-04-01T13:52:18Z\",\"provisioningState\":\"Failed\",\"size\":2709557591778731162,\"label\":\"lnkvxlx\",\"backupType\":\"Scheduled\",\"failureReason\":\"qivbgkcvkh\",\"elasticVolumeResourceId\":\"zvuqdflvon\",\"snapshotUsage\":\"CreateNewSnapshot\",\"elasticSnapshotResourceId\":\"pubcpzgpxtivhjk\",\"elasticBackupPolicyResourceId\":\"dibgqjxgpnrhgov\",\"volumeSize\":\"Large\"}") + .toObject(ElasticBackupProperties.class); + Assertions.assertEquals("lnkvxlx", model.label()); + Assertions.assertEquals("zvuqdflvon", model.elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.CREATE_NEW_SNAPSHOT, model.snapshotUsage()); + Assertions.assertEquals("pubcpzgpxtivhjk", model.elasticSnapshotResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticBackupProperties model = new ElasticBackupProperties().withLabel("lnkvxlx") + .withElasticVolumeResourceId("zvuqdflvon") + .withSnapshotUsage(SnapshotUsage.CREATE_NEW_SNAPSHOT) + .withElasticSnapshotResourceId("pubcpzgpxtivhjk"); + model = BinaryData.fromObject(model).toObject(ElasticBackupProperties.class); + Assertions.assertEquals("lnkvxlx", model.label()); + Assertions.assertEquals("zvuqdflvon", model.elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.CREATE_NEW_SNAPSHOT, model.snapshotUsage()); + Assertions.assertEquals("pubcpzgpxtivhjk", model.elasticSnapshotResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultInnerTests.java new file mode 100644 index 000000000000..3fbadb39260f --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultInnerTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.fluent.models.ElasticBackupVaultInner; +import com.azure.resourcemanager.netapp.models.ElasticBackupVaultProperties; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ElasticBackupVaultInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticBackupVaultInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Failed\"},\"eTag\":\"mxzjrgywwpgjx\",\"location\":\"ptfujgicgaaoept\",\"tags\":{\"vru\":\"utdewemxs\",\"jgehkf\":\"nz\",\"xokffqyin\":\"imrt\"},\"id\":\"jqepqwhi\",\"name\":\"monstshiyxgve\",\"type\":\"fclduccbirdsv\"}") + .toObject(ElasticBackupVaultInner.class); + Assertions.assertEquals("ptfujgicgaaoept", model.location()); + Assertions.assertEquals("utdewemxs", model.tags().get("vru")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticBackupVaultInner model = new ElasticBackupVaultInner().withLocation("ptfujgicgaaoept") + .withTags(mapOf("vru", "utdewemxs", "jgehkf", "nz", "xokffqyin", "imrt")) + .withProperties(new ElasticBackupVaultProperties()); + model = BinaryData.fromObject(model).toObject(ElasticBackupVaultInner.class); + Assertions.assertEquals("ptfujgicgaaoept", model.location()); + Assertions.assertEquals("utdewemxs", model.tags().get("vru")); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultListResultTests.java new file mode 100644 index 000000000000..69a15ae1f2a6 --- /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\":\"Failed\"},\"eTag\":\"stmninwjizcilng\",\"location\":\"shejjtbxqm\",\"tags\":{\"rsbycucrwn\":\"xlxqzvn\",\"qbsms\":\"mikzeb\",\"kzruswh\":\"ziqgfuh\"},\"id\":\"hczznvf\",\"name\":\"ycjsx\",\"type\":\"wwixzvumw\"}],\"nextLink\":\"qhndvnoam\"}") + .toObject(ElasticBackupVaultListResult.class); + Assertions.assertEquals("shejjtbxqm", model.value().get(0).location()); + Assertions.assertEquals("xlxqzvn", model.value().get(0).tags().get("rsbycucrwn")); + Assertions.assertEquals("qhndvnoam", model.nextLink()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultPropertiesTests.java new file mode 100644 index 000000000000..232ee71c5407 --- /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\":\"Succeeded\"}") + .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/ElasticBackupVaultsCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..5c0bb5d9e1d5 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsCreateOrUpdateMockTests.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticBackupVault; +import com.azure.resourcemanager.netapp.models.ElasticBackupVaultProperties; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticBackupVaultsCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"eTag\":\"fgjblcd\",\"location\":\"yfcemftz\",\"tags\":{\"ugekdfqn\":\"kya\",\"owrczfjjnnuxxr\":\"ttw\",\"frhjulrsulwzp\":\"kmhmnulwempdc\"},\"id\":\"lusnawmhhgzotfr\",\"name\":\"yrgkoekv\",\"type\":\"wxxyxhighctx\"}"; + + 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("mhsurlgwqkpmm") + .withRegion("awi") + .withExistingElasticAccount("pihtdmiwjekpt", "caydbjzcqymlcfnz") + .withTags(mapOf("vvjhvvlrlohewjj", "oms", "kzfzqxjosho", "ajnkdflqionswae")) + .withProperties(new ElasticBackupVaultProperties()) + .create(); + + Assertions.assertEquals("yfcemftz", response.location()); + Assertions.assertEquals("kya", response.tags().get("ugekdfqn")); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsGetWithResponseMockTests.java new file mode 100644 index 000000000000..acb5a7cf6358 --- /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\":\"khnjcmrnkfm\",\"location\":\"cqtwmlmhjnqtq\",\"tags\":{\"dvragpokddxejhh\":\"j\"},\"id\":\"vgua\",\"name\":\"tpt\",\"type\":\"k\"}"; + + 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("htfpwpqb", "ejuwyqwdqigmghgi", "z", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("cqtwmlmhjnqtq", response.location()); + Assertions.assertEquals("j", response.tags().get("dvragpokddxejhh")); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsListByElasticAccountMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupVaultsListByElasticAccountMockTests.java new file mode 100644 index 000000000000..a08da1a65b11 --- /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\":\"Succeeded\"},\"eTag\":\"exqokmy\",\"location\":\"jialz\",\"tags\":{\"yudivbxnhsqeaeo\":\"brqlpbcjtrpz\",\"ogatmoljiy\":\"qelwgdhuruzytza\"},\"id\":\"mpinmzvfkneerzzt\",\"name\":\"knsjulugd\",\"type\":\"bnhrxlelfjhkeiz\"}]}"; + + 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("wkqyns", "gbvoffbkk", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("jialz", response.iterator().next().location()); + Assertions.assertEquals("brqlpbcjtrpz", response.iterator().next().tags().get("yudivbxnhsqeaeo")); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..8550450fbb06 --- /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-01-04T21:22:26Z\",\"snapshotCreationDate\":\"2021-01-11T03:04:48Z\",\"completionDate\":\"2021-10-01T19:18:10Z\",\"provisioningState\":\"Succeeded\",\"size\":8249667917791476999,\"label\":\"gyb\",\"backupType\":\"Scheduled\",\"failureReason\":\"ok\",\"elasticVolumeResourceId\":\"cvgllixdg\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"wewqkj\",\"elasticBackupPolicyResourceId\":\"prwpxsoohu\",\"volumeSize\":\"Large\"},\"id\":\"skl\",\"name\":\"e\",\"type\":\"uugggzlfbgrd\"}"; + + 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("rf") + .withExistingElasticBackupVault("zbbgspftesubzpvp", "dylytcovq", "eu") + .withProperties(new ElasticBackupProperties().withLabel("oswkjmdihdcyyyzl") + .withElasticVolumeResourceId("dq") + .withSnapshotUsage(SnapshotUsage.USE_EXISTING_SNAPSHOT) + .withElasticSnapshotResourceId("zrtftedzuubjt")) + .create(); + + Assertions.assertEquals("gyb", response.properties().label()); + Assertions.assertEquals("cvgllixdg", response.properties().elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.USE_EXISTING_SNAPSHOT, response.properties().snapshotUsage()); + Assertions.assertEquals("wewqkj", response.properties().elasticSnapshotResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsGetWithResponseMockTests.java new file mode 100644 index 000000000000..793f353074e3 --- /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-07-26T03:35:57Z\",\"snapshotCreationDate\":\"2021-10-31T04:55:48Z\",\"completionDate\":\"2021-02-16T19:10:49Z\",\"provisioningState\":\"Failed\",\"size\":8652575046836549967,\"label\":\"iprlkdneyttlrcxi\",\"backupType\":\"Manual\",\"failureReason\":\"utpum\",\"elasticVolumeResourceId\":\"twjfluxynbp\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"ywauyqnjckhm\",\"elasticBackupPolicyResourceId\":\"gjs\",\"volumeSize\":\"Regular\"},\"id\":\"a\",\"name\":\"hwvixqqggljkybsj\",\"type\":\"clrvtzqnrbctbh\"}"; + + 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("qsratjhd", "zybspijhfrzgdkk", "gv", "ukhsusmmorf", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("iprlkdneyttlrcxi", response.properties().label()); + Assertions.assertEquals("twjfluxynbp", response.properties().elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.USE_EXISTING_SNAPSHOT, response.properties().snapshotUsage()); + Assertions.assertEquals("ywauyqnjckhm", response.properties().elasticSnapshotResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsListByVaultMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticBackupsListByVaultMockTests.java new file mode 100644 index 000000000000..d9f9f3e160e9 --- /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-01-18T17:27Z\",\"snapshotCreationDate\":\"2021-06-09T13:57:22Z\",\"completionDate\":\"2021-08-06T05:27:22Z\",\"provisioningState\":\"Failed\",\"size\":6729774136192573822,\"label\":\"iuomzczfkiceevs\",\"backupType\":\"Scheduled\",\"failureReason\":\"spcaxi\",\"elasticVolumeResourceId\":\"hfjqebglcxkxgz\",\"snapshotUsage\":\"UseExistingSnapshot\",\"elasticSnapshotResourceId\":\"vygys\",\"elasticBackupPolicyResourceId\":\"tme\",\"volumeSize\":\"Large\"},\"id\":\"vpinkzpatqt\",\"name\":\"iswxspv\",\"type\":\"koj\"}]}"; + + 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("jhxpcvrd", "y", "it", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("iuomzczfkiceevs", response.iterator().next().properties().label()); + Assertions.assertEquals("hfjqebglcxkxgz", response.iterator().next().properties().elasticVolumeResourceId()); + Assertions.assertEquals(SnapshotUsage.USE_EXISTING_SNAPSHOT, + response.iterator().next().properties().snapshotUsage()); + Assertions.assertEquals("vygys", response.iterator().next().properties().elasticSnapshotResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCheckVolumeFilePathAvailabilityWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticCapacityPoolsCheckVolumeFilePathAvailabilityWithResponseMockTests.java new file mode 100644 index 000000000000..17c02d59d8e0 --- /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\":\"False\",\"reason\":\"Invalid\",\"message\":\"kdidjc\"}"; + + 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("rt", "zkg", "eboywhczzqrhm", + new CheckElasticVolumeFilePathAvailabilityRequest().withFilePath("gqbedygi"), + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals(CheckElasticResourceAvailabilityStatus.FALSE, response.isAvailable()); + Assertions.assertEquals(CheckElasticResourceAvailabilityReason.INVALID, response.reason()); + Assertions.assertEquals("kdidjc", response.message()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticEncryptionIdentityTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticEncryptionIdentityTests.java new file mode 100644 index 000000000000..c339e6cb3a45 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticEncryptionIdentityTests.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.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\":\"p\",\"userAssignedIdentity\":\"qyikvy\"}") + .toObject(ElasticEncryptionIdentity.class); + Assertions.assertEquals("qyikvy", model.userAssignedIdentity()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticEncryptionIdentity model = new ElasticEncryptionIdentity().withUserAssignedIdentity("qyikvy"); + model = BinaryData.fromObject(model).toObject(ElasticEncryptionIdentity.class); + Assertions.assertEquals("qyikvy", model.userAssignedIdentity()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticExportPolicyRuleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticExportPolicyRuleTests.java new file mode 100644 index 000000000000..cc4c731727c0 --- /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\":2065118929,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"un\",\"ixxrtikvcpw\"],\"rootAccess\":\"Disabled\"}") + .toObject(ElasticExportPolicyRule.class); + Assertions.assertEquals(2065118929, model.ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_ONLY, model.unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.DISABLED, model.nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.nfsv4()); + Assertions.assertEquals("un", 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(2065118929) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("un", "ixxrtikvcpw")) + .withRootAccess(ElasticRootAccess.DISABLED); + model = BinaryData.fromObject(model).toObject(ElasticExportPolicyRule.class); + Assertions.assertEquals(2065118929, model.ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_ONLY, model.unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.DISABLED, model.nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.nfsv4()); + Assertions.assertEquals("un", model.allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, model.rootAccess()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticExportPolicyTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticExportPolicyTests.java new file mode 100644 index 000000000000..31a85bd3b57c --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticExportPolicyTests.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.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\":184744012,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"k\",\"xukuqgsj\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":1638200879,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"hzjhf\",\"mhv\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":1913497059,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"vmhfbuz\",\"yihsasbhudypohyu\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":900133726,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"obrltt\",\"msjnygqdnfw\",\"zdzgtilaxhnfhqly\"],\"rootAccess\":\"Enabled\"}]}") + .toObject(ElasticExportPolicy.class); + Assertions.assertEquals(184744012, model.rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_WRITE, model.rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.rules().get(0).nfsv4()); + Assertions.assertEquals("k", 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(184744012) + .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("k", "xukuqgsj")) + .withRootAccess(ElasticRootAccess.DISABLED), + new ElasticExportPolicyRule().withRuleIndex(1638200879) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("hzjhf", "mhv")) + .withRootAccess(ElasticRootAccess.ENABLED), + new ElasticExportPolicyRule().withRuleIndex(1913497059) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients(Arrays.asList("vmhfbuz", "yihsasbhudypohyu")) + .withRootAccess(ElasticRootAccess.DISABLED), + new ElasticExportPolicyRule().withRuleIndex(900133726) + .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients(Arrays.asList("obrltt", "msjnygqdnfw", "zdzgtilaxhnfhqly")) + .withRootAccess(ElasticRootAccess.ENABLED))); + model = BinaryData.fromObject(model).toObject(ElasticExportPolicy.class); + Assertions.assertEquals(184744012, model.rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_WRITE, model.rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.rules().get(0).nfsv4()); + Assertions.assertEquals("k", 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 000000000000..91ad6b2c125d --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticMountTargetPropertiesTests.java @@ -0,0 +1,16 @@ +// Copyright (c) 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\":\"rc\",\"smbServerFqdn\":\"tso\"}") + .toObject(ElasticMountTargetProperties.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSmbPatchPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSmbPatchPropertiesTests.java new file mode 100644 index 000000000000..de0774d53372 --- /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\":\"Enabled\"}").toObject(ElasticSmbPatchProperties.class); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, model.smbEncryption()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSmbPatchProperties model + = new ElasticSmbPatchProperties().withSmbEncryption(ElasticSmbEncryption.ENABLED); + model = BinaryData.fromObject(model).toObject(ElasticSmbPatchProperties.class); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, model.smbEncryption()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSmbPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSmbPropertiesTests.java new file mode 100644 index 000000000000..d5aad72609b4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSmbPropertiesTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticSmbEncryption; +import com.azure.resourcemanager.netapp.models.ElasticSmbProperties; +import org.junit.jupiter.api.Assertions; + +public final class ElasticSmbPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSmbProperties model + = BinaryData.fromString("{\"smbEncryption\":\"Disabled\"}").toObject(ElasticSmbProperties.class); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, model.smbEncryption()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSmbProperties model = new ElasticSmbProperties().withSmbEncryption(ElasticSmbEncryption.DISABLED); + model = BinaryData.fromObject(model).toObject(ElasticSmbProperties.class); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, model.smbEncryption()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotInnerTests.java new file mode 100644 index 000000000000..24201c4efd6d --- /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\":\"sjuivfcdisyir\",\"name\":\"xzhczexrxz\",\"type\":\"ujrtrhqvwr\"}") + .toObject(ElasticSnapshotInner.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotInner model = new ElasticSnapshotInner().withProperties(new ElasticSnapshotProperties()); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotInner.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotListResultTests.java new file mode 100644 index 000000000000..17a8af09f16e --- /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\":\"Failed\"},\"id\":\"zonzlrpiqywnc\",\"name\":\"jtszcof\",\"type\":\"zehtdhgb\"}],\"nextLink\":\"vreljea\"}") + .toObject(ElasticSnapshotListResult.class); + Assertions.assertEquals("vreljea", model.nextLink()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..068db793f0b0 --- /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\":2011594703,\"minute\":1431475477},\"dailySchedule\":{\"snapshotsToKeep\":872769595,\"hour\":220731180,\"minute\":1646358527},\"weeklySchedule\":{\"snapshotsToKeep\":123451644,\"days\":[\"Wednesday\",\"Wednesday\",\"Friday\"],\"hour\":2017295107,\"minute\":24417526},\"monthlySchedule\":{\"snapshotsToKeep\":1828081112,\"daysOfMonth\":[618494992,1405140229,1291070676],\"hour\":1441331556,\"minute\":1322278146},\"policyStatus\":\"Disabled\",\"provisioningState\":\"Succeeded\"},\"eTag\":\"zcjumvpsimioyoig\",\"location\":\"miqwnnrac\",\"tags\":{\"nhautwukexzgpmnm\":\"bfqpspkladyd\",\"dqilwgdfpf\":\"be\",\"xbsmtbljje\":\"fpcvstclgqrvwerf\"},\"id\":\"hci\",\"name\":\"kwdvbtb\",\"type\":\"ekqhs\"}"; + + 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("yhwqw") + .withRegion("exroqrndkt") + .withExistingElasticAccount("tagfyvrtpqp", "mhzcgkrepdqh") + .withTags(mapOf("rietbg", "onfeeqgp", "wwzkyf", "ixx", "e", "nwpiwxeiicrm")) + .withProperties(new ElasticSnapshotPolicyProperties() + .withHourlySchedule( + new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(916773179).withMinute(1291774565)) + .withDailySchedule(new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(608262144) + .withHour(119882855) + .withMinute(579634773)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(1218068854) + .withDays(Arrays.asList(DayOfWeek.TUESDAY)) + .withHour(249447669) + .withMinute(1337837190)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(727753958) + .withDaysOfMonth(Arrays.asList(442922870, 1490108927)) + .withHour(1011125497) + .withMinute(1186722301)) + .withPolicyStatus(PolicyStatus.DISABLED)) + .create(); + + Assertions.assertEquals("miqwnnrac", response.location()); + Assertions.assertEquals("bfqpspkladyd", response.tags().get("nhautwukexzgpmnm")); + Assertions.assertEquals(2011594703, response.properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1431475477, response.properties().hourlySchedule().minute()); + Assertions.assertEquals(872769595, response.properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(220731180, response.properties().dailySchedule().hour()); + Assertions.assertEquals(1646358527, response.properties().dailySchedule().minute()); + Assertions.assertEquals(123451644, response.properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.WEDNESDAY, response.properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(2017295107, response.properties().weeklySchedule().hour()); + Assertions.assertEquals(24417526, response.properties().weeklySchedule().minute()); + Assertions.assertEquals(1828081112, response.properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(618494992, response.properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(1441331556, response.properties().monthlySchedule().hour()); + Assertions.assertEquals(1322278146, response.properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.DISABLED, response.properties().policyStatus()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesGetWithResponseMockTests.java new file mode 100644 index 000000000000..bf3234fd70fc --- /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\":1796310561,\"minute\":1167474668},\"dailySchedule\":{\"snapshotsToKeep\":917160525,\"hour\":2008202977,\"minute\":534942759},\"weeklySchedule\":{\"snapshotsToKeep\":385248466,\"days\":[\"Friday\",\"Friday\",\"Thursday\"],\"hour\":1891390759,\"minute\":1073689854},\"monthlySchedule\":{\"snapshotsToKeep\":805396639,\"daysOfMonth\":[456970353],\"hour\":1625333661,\"minute\":2097746238},\"policyStatus\":\"Disabled\",\"provisioningState\":\"Moving\"},\"eTag\":\"kl\",\"location\":\"etatlakf\",\"tags\":{\"bvtooxrpogwp\":\"xwgiks\",\"bfntumeezbxvq\":\"chgjtnhtukfacih\",\"sgomtmjz\":\"bnuvwcg\",\"mkkhtgfredml\":\"xuqgovsxpwwztj\"},\"id\":\"cgrllc\",\"name\":\"na\",\"type\":\"vjowazhpabac\"}"; + + 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("qhnmhk", "ezsdsuxheq", "gcruxspinym", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("etatlakf", response.location()); + Assertions.assertEquals("xwgiks", response.tags().get("bvtooxrpogwp")); + Assertions.assertEquals(1796310561, response.properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1167474668, response.properties().hourlySchedule().minute()); + Assertions.assertEquals(917160525, response.properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(2008202977, response.properties().dailySchedule().hour()); + Assertions.assertEquals(534942759, response.properties().dailySchedule().minute()); + Assertions.assertEquals(385248466, response.properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.FRIDAY, response.properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(1891390759, response.properties().weeklySchedule().hour()); + Assertions.assertEquals(1073689854, response.properties().weeklySchedule().minute()); + Assertions.assertEquals(805396639, response.properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(456970353, response.properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(1625333661, response.properties().monthlySchedule().hour()); + Assertions.assertEquals(2097746238, response.properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.DISABLED, response.properties().policyStatus()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListByElasticAccountMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListByElasticAccountMockTests.java new file mode 100644 index 000000000000..9ce25b7ec16d --- /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\":290457934,\"minute\":86259723},\"dailySchedule\":{\"snapshotsToKeep\":1218418711,\"hour\":362918541,\"minute\":327282787},\"weeklySchedule\":{\"snapshotsToKeep\":1520987150,\"days\":[\"Friday\"],\"hour\":1643092004,\"minute\":75882074},\"monthlySchedule\":{\"snapshotsToKeep\":1416822258,\"daysOfMonth\":[1096639551],\"hour\":1262066997,\"minute\":1678159895},\"policyStatus\":\"Disabled\",\"provisioningState\":\"Updating\"},\"eTag\":\"vvxwjong\",\"location\":\"ehqqrsilcchs\",\"tags\":{\"jrulfucte\":\"kansbvriaqgvt\"},\"id\":\"rthcfjzh\",\"name\":\"lyubqjrostvrjeq\",\"type\":\"tzzbeq\"}]}"; + + 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("mlyotg", "wsxnsrqor", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("ehqqrsilcchs", response.iterator().next().location()); + Assertions.assertEquals("kansbvriaqgvt", response.iterator().next().tags().get("jrulfucte")); + Assertions.assertEquals(290457934, response.iterator().next().properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(86259723, response.iterator().next().properties().hourlySchedule().minute()); + Assertions.assertEquals(1218418711, response.iterator().next().properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(362918541, response.iterator().next().properties().dailySchedule().hour()); + Assertions.assertEquals(327282787, response.iterator().next().properties().dailySchedule().minute()); + Assertions.assertEquals(1520987150, response.iterator().next().properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.FRIDAY, + response.iterator().next().properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(1643092004, response.iterator().next().properties().weeklySchedule().hour()); + Assertions.assertEquals(75882074, response.iterator().next().properties().weeklySchedule().minute()); + Assertions.assertEquals(1416822258, + response.iterator().next().properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1096639551, + response.iterator().next().properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(1262066997, response.iterator().next().properties().monthlySchedule().hour()); + Assertions.assertEquals(1678159895, response.iterator().next().properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.DISABLED, response.iterator().next().properties().policyStatus()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListElasticVolumesMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPoliciesListElasticVolumesMockTests.java new file mode 100644 index 000000000000..7b3ced605f4b --- /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\":\"bsrwrsnrhpqat\",\"size\":2117102872399772953,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":651849981,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"svuv\",\"jkqxetqmmli\",\"rj\",\"xnwxdch\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":502816571,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"quwzp\",\"iibelwcerw\",\"w\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":1712959814,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"bxxn\",\"uisdzhgbdgz\",\"agsecnadbuw\"],\"rootAccess\":\"Disabled\"}]},\"protocolTypes\":[\"NFSv4\",\"NFSv4\",\"NFSv4\"],\"provisioningState\":\"Patching\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"ezoell\",\"mountTargets\":[{\"ipAddress\":\"iwvmtumxpymdjfu\",\"smbServerFqdn\":\"roqvqpilrgu\"},{\"ipAddress\":\"anlduwzorxsb\",\"smbServerFqdn\":\"aqklxy\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"vfqepd\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"tuubwyvpjb\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"jqduqgixe\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"lj\",\"restorationState\":\"Failed\"},\"eTag\":\"erkjddv\",\"zones\":[\"iegftc\",\"biiftksdwgdnk\",\"fgmwd\"],\"location\":\"eb\",\"tags\":{\"ekaj\":\"zldbglzoutbaaqg\",\"jgmn\":\"lyzgsnor\",\"bvvjbhvhdiq\":\"jotvmrxkhl\",\"vhyibdrqrsw\":\"yfluiyuosnuudte\"},\"id\":\"buubpyrowt\",\"name\":\"oxztfwfqch\",\"type\":\"czevjnn\"}]}"; + + 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("ztr", "alx", "d", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("eb", response.iterator().next().location()); + Assertions.assertEquals("zldbglzoutbaaqg", response.iterator().next().tags().get("ekaj")); + Assertions.assertEquals("bsrwrsnrhpqat", response.iterator().next().properties().filePath()); + Assertions.assertEquals(2117102872399772953L, response.iterator().next().properties().size()); + Assertions.assertEquals(651849981, + 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("svuv", + 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.NFSV4, + response.iterator().next().properties().protocolTypes().get(0)); + Assertions.assertEquals("ezoell", response.iterator().next().properties().snapshotResourceId()); + Assertions.assertEquals("vfqepd", + response.iterator().next().properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("tuubwyvpjb", + response.iterator().next().properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + response.iterator().next().properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("jqduqgixe", + response.iterator().next().properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, + response.iterator().next().properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, + response.iterator().next().properties().smbProperties().smbEncryption()); + Assertions.assertEquals("lj", response.iterator().next().properties().backupResourceId()); + Assertions.assertEquals("iegftc", response.iterator().next().zones().get(0)); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyDailyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyDailyScheduleTests.java new file mode 100644 index 000000000000..58633cb44d37 --- /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\":1269982634,\"hour\":1477203796,\"minute\":116262403}") + .toObject(ElasticSnapshotPolicyDailySchedule.class); + Assertions.assertEquals(1269982634, model.snapshotsToKeep()); + Assertions.assertEquals(1477203796, model.hour()); + Assertions.assertEquals(116262403, model.minute()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotPolicyDailySchedule model + = new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(1269982634) + .withHour(1477203796) + .withMinute(116262403); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyDailySchedule.class); + Assertions.assertEquals(1269982634, model.snapshotsToKeep()); + Assertions.assertEquals(1477203796, model.hour()); + Assertions.assertEquals(116262403, model.minute()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyHourlyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyHourlyScheduleTests.java new file mode 100644 index 000000000000..01667080e100 --- /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\":1291593702,\"minute\":555944790}") + .toObject(ElasticSnapshotPolicyHourlySchedule.class); + Assertions.assertEquals(1291593702, model.snapshotsToKeep()); + Assertions.assertEquals(555944790, model.minute()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotPolicyHourlySchedule model + = new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(1291593702).withMinute(555944790); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyHourlySchedule.class); + Assertions.assertEquals(1291593702, model.snapshotsToKeep()); + Assertions.assertEquals(555944790, model.minute()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyInnerTests.java new file mode 100644 index 000000000000..748d5f8a81d9 --- /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\":601956231,\"minute\":1863397561},\"dailySchedule\":{\"snapshotsToKeep\":378498503,\"hour\":2073795724,\"minute\":1291910908},\"weeklySchedule\":{\"snapshotsToKeep\":842063408,\"days\":[\"Sunday\",\"Saturday\",\"Sunday\",\"Friday\"],\"hour\":513286022,\"minute\":1754763241},\"monthlySchedule\":{\"snapshotsToKeep\":1646833466,\"daysOfMonth\":[2095946053,101589203],\"hour\":2083883646,\"minute\":1027236790},\"policyStatus\":\"Disabled\",\"provisioningState\":\"Updating\"},\"eTag\":\"on\",\"location\":\"gnwncypuuwwlt\",\"tags\":{\"zzhmkd\":\"jctzenkei\",\"gsrboldforobw\":\"svflyhbxcudch\",\"hfovvacqpbtu\":\"lvizb\"},\"id\":\"dxe\",\"name\":\"zab\",\"type\":\"elawumu\"}") + .toObject(ElasticSnapshotPolicyInner.class); + Assertions.assertEquals("gnwncypuuwwlt", model.location()); + Assertions.assertEquals("jctzenkei", model.tags().get("zzhmkd")); + Assertions.assertEquals(601956231, model.properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1863397561, model.properties().hourlySchedule().minute()); + Assertions.assertEquals(378498503, model.properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(2073795724, model.properties().dailySchedule().hour()); + Assertions.assertEquals(1291910908, model.properties().dailySchedule().minute()); + Assertions.assertEquals(842063408, model.properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.SUNDAY, model.properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(513286022, model.properties().weeklySchedule().hour()); + Assertions.assertEquals(1754763241, model.properties().weeklySchedule().minute()); + Assertions.assertEquals(1646833466, model.properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(2095946053, model.properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(2083883646, model.properties().monthlySchedule().hour()); + Assertions.assertEquals(1027236790, 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("gnwncypuuwwlt") + .withTags(mapOf("zzhmkd", "jctzenkei", "gsrboldforobw", "svflyhbxcudch", "hfovvacqpbtu", "lvizb")) + .withProperties(new ElasticSnapshotPolicyProperties() + .withHourlySchedule( + new ElasticSnapshotPolicyHourlySchedule().withSnapshotsToKeep(601956231).withMinute(1863397561)) + .withDailySchedule(new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(378498503) + .withHour(2073795724) + .withMinute(1291910908)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(842063408) + .withDays(Arrays.asList(DayOfWeek.SUNDAY, DayOfWeek.SATURDAY, DayOfWeek.SUNDAY, DayOfWeek.FRIDAY)) + .withHour(513286022) + .withMinute(1754763241)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(1646833466) + .withDaysOfMonth(Arrays.asList(2095946053, 101589203)) + .withHour(2083883646) + .withMinute(1027236790)) + .withPolicyStatus(PolicyStatus.DISABLED)); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyInner.class); + Assertions.assertEquals("gnwncypuuwwlt", model.location()); + Assertions.assertEquals("jctzenkei", model.tags().get("zzhmkd")); + Assertions.assertEquals(601956231, model.properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1863397561, model.properties().hourlySchedule().minute()); + Assertions.assertEquals(378498503, model.properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(2073795724, model.properties().dailySchedule().hour()); + Assertions.assertEquals(1291910908, model.properties().dailySchedule().minute()); + Assertions.assertEquals(842063408, model.properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.SUNDAY, model.properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(513286022, model.properties().weeklySchedule().hour()); + Assertions.assertEquals(1754763241, model.properties().weeklySchedule().minute()); + Assertions.assertEquals(1646833466, model.properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(2095946053, model.properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(2083883646, model.properties().monthlySchedule().hour()); + Assertions.assertEquals(1027236790, 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 000000000000..8b9a2127fe3d --- /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\":1984466292,\"minute\":1807706712},\"dailySchedule\":{\"snapshotsToKeep\":1929531496,\"hour\":2002873882,\"minute\":607410563},\"weeklySchedule\":{\"snapshotsToKeep\":1123016962,\"days\":[\"Monday\"],\"hour\":529118708,\"minute\":391461704},\"monthlySchedule\":{\"snapshotsToKeep\":1365374514,\"daysOfMonth\":[790882759],\"hour\":1670220024,\"minute\":2016652942},\"policyStatus\":\"Disabled\",\"provisioningState\":\"Failed\"},\"eTag\":\"oqq\",\"location\":\"cyyufmh\",\"tags\":{\"cdqzhlctddu\":\"cuwmqsp\"},\"id\":\"qn\",\"name\":\"yfp\",\"type\":\"hrqbnjjrcg\"},{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":459036091,\"minute\":2089757116},\"dailySchedule\":{\"snapshotsToKeep\":1832381587,\"hour\":2079611289,\"minute\":1314460255},\"weeklySchedule\":{\"snapshotsToKeep\":1101777200,\"days\":[\"Tuesday\",\"Friday\",\"Thursday\"],\"hour\":920933381,\"minute\":181506173},\"monthlySchedule\":{\"snapshotsToKeep\":1365525358,\"daysOfMonth\":[1218728383,434775558,617532608],\"hour\":6794810,\"minute\":373191664},\"policyStatus\":\"Enabled\",\"provisioningState\":\"Failed\"},\"eTag\":\"flrzpas\",\"location\":\"biuimzdlyjdfq\",\"tags\":{\"lzo\":\"yoqufdvruz\",\"fnmdxotn\":\"hpc\"},\"id\":\"fdgugeyzi\",\"name\":\"grkyuizabsnmfpph\",\"type\":\"jee\"},{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1052982888,\"minute\":837668712},\"dailySchedule\":{\"snapshotsToKeep\":610959790,\"hour\":341716623,\"minute\":2056400257},\"weeklySchedule\":{\"snapshotsToKeep\":393843566,\"days\":[\"Wednesday\",\"Thursday\",\"Wednesday\",\"Tuesday\"],\"hour\":1720362354,\"minute\":1081249993},\"monthlySchedule\":{\"snapshotsToKeep\":967532883,\"daysOfMonth\":[974044007],\"hour\":198526916,\"minute\":1087949642},\"policyStatus\":\"Disabled\",\"provisioningState\":\"Succeeded\"},\"eTag\":\"eebtijvacvb\",\"location\":\"z\",\"tags\":{\"jrnwxacev\":\"xl\"},\"id\":\"h\",\"name\":\"kuyxoafg\",\"type\":\"oqltfae\"}],\"nextLink\":\"inmfgvxirp\"}") + .toObject(ElasticSnapshotPolicyListResult.class); + Assertions.assertEquals("cyyufmh", model.value().get(0).location()); + Assertions.assertEquals("cuwmqsp", model.value().get(0).tags().get("cdqzhlctddu")); + Assertions.assertEquals(1984466292, model.value().get(0).properties().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1807706712, model.value().get(0).properties().hourlySchedule().minute()); + Assertions.assertEquals(1929531496, model.value().get(0).properties().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(2002873882, model.value().get(0).properties().dailySchedule().hour()); + Assertions.assertEquals(607410563, model.value().get(0).properties().dailySchedule().minute()); + Assertions.assertEquals(1123016962, model.value().get(0).properties().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.MONDAY, model.value().get(0).properties().weeklySchedule().days().get(0)); + Assertions.assertEquals(529118708, model.value().get(0).properties().weeklySchedule().hour()); + Assertions.assertEquals(391461704, model.value().get(0).properties().weeklySchedule().minute()); + Assertions.assertEquals(1365374514, model.value().get(0).properties().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(790882759, model.value().get(0).properties().monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(1670220024, model.value().get(0).properties().monthlySchedule().hour()); + Assertions.assertEquals(2016652942, model.value().get(0).properties().monthlySchedule().minute()); + Assertions.assertEquals(PolicyStatus.DISABLED, model.value().get(0).properties().policyStatus()); + Assertions.assertEquals("inmfgvxirp", model.nextLink()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyMonthlyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyMonthlyScheduleTests.java new file mode 100644 index 000000000000..4394a84ad2d0 --- /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\":1567146664,\"daysOfMonth\":[255810244,1460319466],\"hour\":993307689,\"minute\":1202587998}") + .toObject(ElasticSnapshotPolicyMonthlySchedule.class); + Assertions.assertEquals(1567146664, model.snapshotsToKeep()); + Assertions.assertEquals(255810244, model.daysOfMonth().get(0)); + Assertions.assertEquals(993307689, model.hour()); + Assertions.assertEquals(1202587998, model.minute()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotPolicyMonthlySchedule model + = new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(1567146664) + .withDaysOfMonth(Arrays.asList(255810244, 1460319466)) + .withHour(993307689) + .withMinute(1202587998); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyMonthlySchedule.class); + Assertions.assertEquals(1567146664, model.snapshotsToKeep()); + Assertions.assertEquals(255810244, model.daysOfMonth().get(0)); + Assertions.assertEquals(993307689, model.hour()); + Assertions.assertEquals(1202587998, model.minute()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyPropertiesTests.java new file mode 100644 index 000000000000..bd696700fc4e --- /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\":46527363,\"minute\":665685017},\"dailySchedule\":{\"snapshotsToKeep\":755872582,\"hour\":2024604117,\"minute\":562241712},\"weeklySchedule\":{\"snapshotsToKeep\":745271232,\"days\":[\"Thursday\",\"Sunday\",\"Saturday\",\"Sunday\"],\"hour\":161517252,\"minute\":673323258},\"monthlySchedule\":{\"snapshotsToKeep\":298891105,\"daysOfMonth\":[1735351807,1524678464,643812278,2025319282],\"hour\":2057925756,\"minute\":1610831264},\"policyStatus\":\"Enabled\",\"provisioningState\":\"Patching\"}") + .toObject(ElasticSnapshotPolicyProperties.class); + Assertions.assertEquals(46527363, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(665685017, model.hourlySchedule().minute()); + Assertions.assertEquals(755872582, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(2024604117, model.dailySchedule().hour()); + Assertions.assertEquals(562241712, model.dailySchedule().minute()); + Assertions.assertEquals(745271232, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.THURSDAY, model.weeklySchedule().days().get(0)); + Assertions.assertEquals(161517252, model.weeklySchedule().hour()); + Assertions.assertEquals(673323258, model.weeklySchedule().minute()); + Assertions.assertEquals(298891105, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1735351807, model.monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(2057925756, model.monthlySchedule().hour()); + Assertions.assertEquals(1610831264, 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(46527363).withMinute(665685017)) + .withDailySchedule(new ElasticSnapshotPolicyDailySchedule().withSnapshotsToKeep(755872582) + .withHour(2024604117) + .withMinute(562241712)) + .withWeeklySchedule(new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(745271232) + .withDays(Arrays.asList(DayOfWeek.THURSDAY, DayOfWeek.SUNDAY, DayOfWeek.SATURDAY, DayOfWeek.SUNDAY)) + .withHour(161517252) + .withMinute(673323258)) + .withMonthlySchedule(new ElasticSnapshotPolicyMonthlySchedule().withSnapshotsToKeep(298891105) + .withDaysOfMonth(Arrays.asList(1735351807, 1524678464, 643812278, 2025319282)) + .withHour(2057925756) + .withMinute(1610831264)) + .withPolicyStatus(PolicyStatus.ENABLED); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyProperties.class); + Assertions.assertEquals(46527363, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(665685017, model.hourlySchedule().minute()); + Assertions.assertEquals(755872582, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(2024604117, model.dailySchedule().hour()); + Assertions.assertEquals(562241712, model.dailySchedule().minute()); + Assertions.assertEquals(745271232, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.THURSDAY, model.weeklySchedule().days().get(0)); + Assertions.assertEquals(161517252, model.weeklySchedule().hour()); + Assertions.assertEquals(673323258, model.weeklySchedule().minute()); + Assertions.assertEquals(298891105, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1735351807, model.monthlySchedule().daysOfMonth().get(0)); + Assertions.assertEquals(2057925756, model.monthlySchedule().hour()); + Assertions.assertEquals(1610831264, 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/ElasticSnapshotPolicyVolumeListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyVolumeListTests.java new file mode 100644 index 000000000000..a9230cdaf2cf --- /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\":\"iypoqeyhlqhykprl\",\"size\":9018579554570541261,\"exportPolicy\":{\"rules\":[{},{}]},\"protocolTypes\":[\"NFSv4\"],\"provisioningState\":\"Deleting\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"iitdfuxt\",\"mountTargets\":[{\"ipAddress\":\"ibmi\",\"smbServerFqdn\":\"nnust\"},{\"ipAddress\":\"ljhnmgixhcmav\",\"smbServerFqdn\":\"foudor\"},{\"ipAddress\":\"gyyprotwy\",\"smbServerFqdn\":\"ndm\"},{\"ipAddress\":\"hu\",\"smbServerFqdn\":\"mjkavlgorbmft\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"zfjltfvnzcyjto\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"opv\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"zq\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"svqwthmkyibc\",\"restorationState\":\"Restoring\"},\"eTag\":\"sgqcwdho\",\"zones\":[\"tmcdzsufcohd\",\"bzlmcm\"],\"location\":\"pcvhdbevwqqxeys\",\"tags\":{\"z\":\"qzinkfkbg\"},\"id\":\"owxeqocljmy\",\"name\":\"vkzqk\",\"type\":\"jeokbzefezrxccz\"},{\"properties\":{\"filePath\":\"tleipqxbkw\",\"size\":4735704121627529946,\"exportPolicy\":{\"rules\":[{}]},\"protocolTypes\":[\"NFSv3\",\"NFSv3\",\"SMB\"],\"provisioningState\":\"Creating\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"q\",\"mountTargets\":[{\"ipAddress\":\"awopqh\",\"smbServerFqdn\":\"jptmcgsbost\"},{\"ipAddress\":\"lnd\",\"smbServerFqdn\":\"tutmzl\"},{\"ipAddress\":\"ojlvfhrbbpneqvc\",\"smbServerFqdn\":\"yyurmochpprprsnm\"},{\"ipAddress\":\"ayzejnhlbkpbz\",\"smbServerFqdn\":\"piljhahzvech\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"wieholewjwiu\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"efqsfapaqtferrqw\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"mfxapjwogqqno\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"btqwpwyawbzas\",\"restorationState\":\"Failed\"},\"eTag\":\"ljgkyex\",\"zones\":[\"uy\",\"i\"],\"location\":\"dsdaultxijjumf\",\"tags\":{\"nqnm\":\"z\",\"qdqx\":\"jng\",\"zsvtuikzhajqgl\":\"bjwgnyfus\",\"l\":\"fh\"},\"id\":\"qryxyn\",\"name\":\"nzrdpsovwxz\",\"type\":\"ptgoeiybbabp\"},{\"properties\":{\"filePath\":\"vf\",\"size\":3863385123536090602,\"exportPolicy\":{\"rules\":[{},{},{}]},\"protocolTypes\":[\"NFSv3\",\"NFSv3\",\"SMB\",\"SMB\"],\"provisioningState\":\"Moving\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"rioov\",\"mountTargets\":[{\"ipAddress\":\"xwaabzmifrygznmm\",\"smbServerFqdn\":\"ri\"},{\"ipAddress\":\"zob\",\"smbServerFqdn\":\"pxl\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"elxieixynllxecw\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"jphslhcaw\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"fdwfmvigorqj\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"glka\",\"restorationState\":\"Failed\"},\"eTag\":\"qjujeickpzvcp\",\"zones\":[\"xelnwc\",\"tyjedex\",\"mlfmkqs\",\"azuawx\"],\"location\":\"x\",\"tags\":{\"s\":\"mwabzxrvxc\",\"gzwywak\":\"sphaivmxyasflvg\",\"ljhlnymzotq\":\"ihknsmjbl\",\"mv\":\"ryuzcbmqqv\"},\"id\":\"fgtayxonsup\",\"name\":\"ujlzqnhcvsqltn\",\"type\":\"oibgsxg\"},{\"properties\":{\"filePath\":\"fyq\",\"size\":3790273851089805519,\"exportPolicy\":{\"rules\":[{}]},\"protocolTypes\":[\"NFSv4\",\"SMB\"],\"provisioningState\":\"Failed\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"iqxeiiqbimht\",\"mountTargets\":[{\"ipAddress\":\"nhe\",\"smbServerFqdn\":\"qpofvwbc\"},{\"ipAddress\":\"embnkbw\",\"smbServerFqdn\":\"vxkdivqihebwtswb\"},{\"ipAddress\":\"wfmdurage\",\"smbServerFqdn\":\"zvcjfelisdjubggb\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"xkbsazgakgac\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"m\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"pofap\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"iofrzgbzjedmstk\",\"restorationState\":\"Restored\"},\"eTag\":\"xbcuiiznkt\",\"zones\":[\"nsnvpd\",\"bmikost\"],\"location\":\"bkiw\",\"tags\":{\"ophzfylsgcrp\":\"n\",\"fwyfwlwxjwet\":\"bcunezzceze\",\"zvaylptrsqqw\":\"psihcla\"},\"id\":\"tcmwqkchc\",\"name\":\"waxfewzjkj\",\"type\":\"xfdeqvhpsyl\"}],\"nextLink\":\"shk\"}") + .toObject(ElasticSnapshotPolicyVolumeList.class); + Assertions.assertEquals("pcvhdbevwqqxeys", model.value().get(0).location()); + Assertions.assertEquals("qzinkfkbg", model.value().get(0).tags().get("z")); + Assertions.assertEquals("iypoqeyhlqhykprl", model.value().get(0).properties().filePath()); + Assertions.assertEquals(9018579554570541261L, model.value().get(0).properties().size()); + Assertions.assertEquals(ElasticProtocolType.NFSV4, model.value().get(0).properties().protocolTypes().get(0)); + Assertions.assertEquals("iitdfuxt", model.value().get(0).properties().snapshotResourceId()); + Assertions.assertEquals("zfjltfvnzcyjto", + model.value().get(0).properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("opv", + model.value().get(0).properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, + model.value().get(0).properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("zq", + model.value().get(0).properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, + model.value().get(0).properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, + model.value().get(0).properties().smbProperties().smbEncryption()); + Assertions.assertEquals("svqwthmkyibc", model.value().get(0).properties().backupResourceId()); + Assertions.assertEquals("tmcdzsufcohd", model.value().get(0).zones().get(0)); + Assertions.assertEquals("shk", model.nextLink()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyWeeklyScheduleTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPolicyWeeklyScheduleTests.java new file mode 100644 index 000000000000..aeba93e54762 --- /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\":1599319524,\"days\":[\"Tuesday\",\"Sunday\",\"Sunday\",\"Monday\"],\"hour\":325946802,\"minute\":808258027}") + .toObject(ElasticSnapshotPolicyWeeklySchedule.class); + Assertions.assertEquals(1599319524, model.snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.TUESDAY, model.days().get(0)); + Assertions.assertEquals(325946802, model.hour()); + Assertions.assertEquals(808258027, model.minute()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotPolicyWeeklySchedule model + = new ElasticSnapshotPolicyWeeklySchedule().withSnapshotsToKeep(1599319524) + .withDays(Arrays.asList(DayOfWeek.TUESDAY, DayOfWeek.SUNDAY, DayOfWeek.SUNDAY, DayOfWeek.MONDAY)) + .withHour(325946802) + .withMinute(808258027); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotPolicyWeeklySchedule.class); + Assertions.assertEquals(1599319524, model.snapshotsToKeep()); + Assertions.assertEquals(DayOfWeek.TUESDAY, model.days().get(0)); + Assertions.assertEquals(325946802, model.hour()); + Assertions.assertEquals(808258027, model.minute()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPropertiesTests.java new file mode 100644 index 000000000000..d502127a3fb2 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotPropertiesTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.ElasticSnapshotProperties; + +public final class ElasticSnapshotPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ElasticSnapshotProperties model + = BinaryData.fromString("{\"provisioningState\":\"Creating\"}").toObject(ElasticSnapshotProperties.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticSnapshotProperties model = new ElasticSnapshotProperties(); + model = BinaryData.fromObject(model).toObject(ElasticSnapshotProperties.class); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..651088795093 --- /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\":\"obfelhldiuhz\",\"name\":\"gqlmfaewzgi\",\"type\":\"djpxpqht\"}"; + + 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("wffcvvye") + .withExistingElasticVolume("ghmp", "nwlslrcigtzjcvbx", "lapsnsso", "yxpavidnie") + .withProperties(new ElasticSnapshotProperties()) + .create(); + + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsGetWithResponseMockTests.java new file mode 100644 index 000000000000..aeb7201958dd --- /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\":\"Updating\"},\"id\":\"pqtmojhvrztnvgys\",\"name\":\"qrdgrtw\",\"type\":\"ewjzl\"}"; + + 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("anizerwgudasmxub", "fbngfcocef", "priylfmp", "trauds", "hlcdc", + com.azure.core.util.Context.NONE) + .getValue(); + + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsListByElasticVolumeMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsListByElasticVolumeMockTests.java new file mode 100644 index 000000000000..d04f82ffd210 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticSnapshotsListByElasticVolumeMockTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.netapp.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.netapp.NetAppFilesManager; +import com.azure.resourcemanager.netapp.models.ElasticSnapshot; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ElasticSnapshotsListByElasticVolumeMockTests { + @Test + public void testListByElasticVolume() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\"},\"id\":\"wtltngvmreuptrk\",\"name\":\"zmijajwo\",\"type\":\"xfsv\"}]}"; + + 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("ykcfazz", "jcayerzrransyby", "polwzrghsrlei", "kfscjfncjwv", + com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeBackupPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeBackupPropertiesTests.java new file mode 100644 index 000000000000..f46ce8c18c51 --- /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\":\"gnitgvkxlzyq\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"gcealzxwh\"}") + .toObject(ElasticVolumeBackupProperties.class); + Assertions.assertEquals("gnitgvkxlzyq", model.elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, model.policyEnforcement()); + Assertions.assertEquals("gcealzxwh", model.elasticBackupVaultResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeBackupProperties model + = new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("gnitgvkxlzyq") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) + .withElasticBackupVaultResourceId("gcealzxwh"); + model = BinaryData.fromObject(model).toObject(ElasticVolumeBackupProperties.class); + Assertions.assertEquals("gnitgvkxlzyq", model.elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, model.policyEnforcement()); + Assertions.assertEquals("gcealzxwh", model.elasticBackupVaultResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeDataProtectionPatchPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeDataProtectionPatchPropertiesTests.java new file mode 100644 index 000000000000..7aac9f380be9 --- /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\":\"tgsfja\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"lhhxudbxvodhtnsi\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"z\"}}") + .toObject(ElasticVolumeDataProtectionPatchProperties.class); + Assertions.assertEquals("tgsfja", model.snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("lhhxudbxvodhtnsi", model.backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, model.backup().policyEnforcement()); + Assertions.assertEquals("z", model.backup().elasticBackupVaultResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeDataProtectionPatchProperties model = new ElasticVolumeDataProtectionPatchProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("tgsfja")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("lhhxudbxvodhtnsi") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.NOT_ENFORCED) + .withElasticBackupVaultResourceId("z")); + model = BinaryData.fromObject(model).toObject(ElasticVolumeDataProtectionPatchProperties.class); + Assertions.assertEquals("tgsfja", model.snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("lhhxudbxvodhtnsi", model.backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, model.backup().policyEnforcement()); + Assertions.assertEquals("z", model.backup().elasticBackupVaultResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeDataProtectionPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeDataProtectionPropertiesTests.java new file mode 100644 index 000000000000..1d8c7975384c --- /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\":\"kenx\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"yefrpmpdnqqska\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"vmm\"}}") + .toObject(ElasticVolumeDataProtectionProperties.class); + Assertions.assertEquals("kenx", model.snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("yefrpmpdnqqska", model.backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, model.backup().policyEnforcement()); + Assertions.assertEquals("vmm", model.backup().elasticBackupVaultResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeDataProtectionProperties model = new ElasticVolumeDataProtectionProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("kenx")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("yefrpmpdnqqska") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) + .withElasticBackupVaultResourceId("vmm")); + model = BinaryData.fromObject(model).toObject(ElasticVolumeDataProtectionProperties.class); + Assertions.assertEquals("kenx", model.snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("yefrpmpdnqqska", model.backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, model.backup().policyEnforcement()); + Assertions.assertEquals("vmm", model.backup().elasticBackupVaultResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeInnerTests.java new file mode 100644 index 000000000000..248b85ab2f26 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeInnerTests.java @@ -0,0 +1,149 @@ +// Copyright (c) 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\":\"tg\",\"size\":3849034252951154606,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":1521773196,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"hycav\",\"dggxdbeesmi\",\"knlrariaawiuagy\",\"wqfbylyrfgiagt\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":1650535228,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"vusfzld\",\"ozuxylfsbtkadpys\",\"wn\",\"tgkbugrjqctojc\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":2091790952,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"yqdhcuplcplcw\"],\"rootAccess\":\"Enabled\"}]},\"protocolTypes\":[\"NFSv4\",\"NFSv3\",\"SMB\",\"NFSv4\"],\"provisioningState\":\"Succeeded\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"zbsrgnowcj\",\"mountTargets\":[{\"ipAddress\":\"vecactx\",\"smbServerFqdn\":\"oteyowc\"},{\"ipAddress\":\"qovekqvgqou\",\"smbServerFqdn\":\"fzmpjwyivq\"},{\"ipAddress\":\"f\",\"smbServerFqdn\":\"vhrfsphuagrt\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"eusqczkvyklxu\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"affmmfblcqc\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"qibrtalme\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"lqxihhrmooiz\",\"restorationState\":\"Failed\"},\"eTag\":\"pxiutc\",\"zones\":[\"zhyrpeto\",\"e\"],\"location\":\"oxslh\",\"tags\":{\"aehvvibrxjjstoq\":\"labrqnkkzjcjbtr\",\"bklftidgfcwqmpim\":\"eitpkxztmo\"},\"id\":\"qxzhem\",\"name\":\"yhohujswtwkozzwc\",\"type\":\"lkb\"}") + .toObject(ElasticVolumeInner.class); + Assertions.assertEquals("oxslh", model.location()); + Assertions.assertEquals("labrqnkkzjcjbtr", model.tags().get("aehvvibrxjjstoq")); + Assertions.assertEquals("tg", model.properties().filePath()); + Assertions.assertEquals(3849034252951154606L, model.properties().size()); + Assertions.assertEquals(1521773196, model.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, + model.properties().exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.DISABLED, model.properties().exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.properties().exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("hycav", model.properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, + model.properties().exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.NFSV4, model.properties().protocolTypes().get(0)); + Assertions.assertEquals("zbsrgnowcj", model.properties().snapshotResourceId()); + Assertions.assertEquals("eusqczkvyklxu", + model.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("affmmfblcqc", + model.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + model.properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("qibrtalme", + model.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, model.properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, model.properties().smbProperties().smbEncryption()); + Assertions.assertEquals("lqxihhrmooiz", model.properties().backupResourceId()); + Assertions.assertEquals("zhyrpeto", model.zones().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeInner model + = new ElasticVolumeInner().withLocation("oxslh") + .withTags(mapOf("aehvvibrxjjstoq", "labrqnkkzjcjbtr", "bklftidgfcwqmpim", "eitpkxztmo")) + .withProperties( + new ElasticVolumeProperties().withFilePath("tg") + .withSize(3849034252951154606L) + .withExportPolicy( + new ElasticExportPolicy() + .withRules( + Arrays.asList( + new ElasticExportPolicyRule().withRuleIndex(1521773196) + .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("hycav", "dggxdbeesmi", "knlrariaawiuagy", + "wqfbylyrfgiagt")) + .withRootAccess(ElasticRootAccess.DISABLED), + new ElasticExportPolicyRule().withRuleIndex(1650535228) + .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients( + Arrays.asList("vusfzld", "ozuxylfsbtkadpys", "wn", "tgkbugrjqctojc")) + .withRootAccess(ElasticRootAccess.DISABLED), + new ElasticExportPolicyRule().withRuleIndex(2091790952) + .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients(Arrays.asList("yqdhcuplcplcw")) + .withRootAccess(ElasticRootAccess.ENABLED)))) + .withProtocolTypes(Arrays.asList(ElasticProtocolType.NFSV4, ElasticProtocolType.NFSV3, + ElasticProtocolType.SMB, ElasticProtocolType.NFSV4)) + .withSnapshotResourceId("zbsrgnowcj") + .withDataProtection(new ElasticVolumeDataProtectionProperties() + .withSnapshot( + new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("eusqczkvyklxu")) + .withBackup( + new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("affmmfblcqc") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) + .withElasticBackupVaultResourceId("qibrtalme"))) + .withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility.HIDDEN) + .withSmbProperties(new ElasticSmbProperties().withSmbEncryption(ElasticSmbEncryption.DISABLED)) + .withBackupResourceId("lqxihhrmooiz")) + .withZones(Arrays.asList("zhyrpeto", "e")); + model = BinaryData.fromObject(model).toObject(ElasticVolumeInner.class); + Assertions.assertEquals("oxslh", model.location()); + Assertions.assertEquals("labrqnkkzjcjbtr", model.tags().get("aehvvibrxjjstoq")); + Assertions.assertEquals("tg", model.properties().filePath()); + Assertions.assertEquals(3849034252951154606L, model.properties().size()); + Assertions.assertEquals(1521773196, model.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, + model.properties().exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.DISABLED, model.properties().exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.properties().exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("hycav", model.properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.DISABLED, + model.properties().exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.NFSV4, model.properties().protocolTypes().get(0)); + Assertions.assertEquals("zbsrgnowcj", model.properties().snapshotResourceId()); + Assertions.assertEquals("eusqczkvyklxu", + model.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("affmmfblcqc", + model.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + model.properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("qibrtalme", + model.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, model.properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, model.properties().smbProperties().smbEncryption()); + Assertions.assertEquals("lqxihhrmooiz", model.properties().backupResourceId()); + Assertions.assertEquals("zhyrpeto", model.zones().get(0)); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeListResultTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeListResultTests.java new file mode 100644 index 000000000000..3048895df312 --- /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\":\"kdlpa\",\"size\":8631416850120033003,\"exportPolicy\":{\"rules\":[{},{}]},\"protocolTypes\":[\"SMB\"],\"provisioningState\":\"Deleting\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"m\",\"mountTargets\":[{\"ipAddress\":\"dfgsftufqobrj\",\"smbServerFqdn\":\"acgcckknhx\"},{\"ipAddress\":\"zvytnrzvuljraaer\",\"smbServerFqdn\":\"okqgukkjq\"},{\"ipAddress\":\"broyla\",\"smbServerFqdn\":\"ulcdisdosf\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"vgjrwhr\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"cytdclxgccknfnwm\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"pdvjdhttzaefedx\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"k\",\"restorationState\":\"Restoring\"},\"eTag\":\"dqns\",\"zones\":[\"pbgtgkylkdghrj\",\"uutlwxezwzhok\",\"bwnhhtql\"],\"location\":\"hgppipifhpfeoa\",\"tags\":{\"heafidlt\":\"cxtxjc\",\"oiftxfkfwegprh\":\"gsresmkssj\"},\"id\":\"tillucbiqtg\",\"name\":\"q\",\"type\":\"hm\"},{\"properties\":{\"filePath\":\"sldrizetpwbral\",\"size\":4960885543522270739,\"exportPolicy\":{\"rules\":[{},{},{},{}]},\"protocolTypes\":[\"NFSv3\",\"NFSv4\",\"NFSv3\"],\"provisioningState\":\"Moving\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"kan\",\"mountTargets\":[{\"ipAddress\":\"n\",\"smbServerFqdn\":\"ha\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"hjlmu\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"primr\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"eecjmeis\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"lwxdzaum\",\"restorationState\":\"Failed\"},\"eTag\":\"hguuf\",\"zones\":[\"oyjathwtzol\",\"a\",\"mwmdxmebwjscjpa\"],\"location\":\"xveabf\",\"tags\":{\"ijddtvqc\":\"mwmqtibx\",\"jaeukmrsieekpn\":\"tad\",\"pibudqwyxebeybpm\":\"zaapmudqmeqwi\"},\"id\":\"znrtffyaqit\",\"name\":\"hheioqaqhvseuf\",\"type\":\"qyrxp\"}],\"nextLink\":\"cgq\"}") + .toObject(ElasticVolumeListResult.class); + Assertions.assertEquals("hgppipifhpfeoa", model.value().get(0).location()); + Assertions.assertEquals("cxtxjc", model.value().get(0).tags().get("heafidlt")); + Assertions.assertEquals("kdlpa", model.value().get(0).properties().filePath()); + Assertions.assertEquals(8631416850120033003L, model.value().get(0).properties().size()); + Assertions.assertEquals(ElasticProtocolType.SMB, model.value().get(0).properties().protocolTypes().get(0)); + Assertions.assertEquals("m", model.value().get(0).properties().snapshotResourceId()); + Assertions.assertEquals("vgjrwhr", + model.value().get(0).properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("cytdclxgccknfnwm", + model.value().get(0).properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, + model.value().get(0).properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("pdvjdhttzaefedx", + model.value().get(0).properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, + model.value().get(0).properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, + model.value().get(0).properties().smbProperties().smbEncryption()); + Assertions.assertEquals("k", model.value().get(0).properties().backupResourceId()); + Assertions.assertEquals("pbgtgkylkdghrj", model.value().get(0).zones().get(0)); + Assertions.assertEquals("cgq", model.nextLink()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumePropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumePropertiesTests.java new file mode 100644 index 000000000000..054dfb13efc2 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumePropertiesTests.java @@ -0,0 +1,105 @@ +// Copyright (c) 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\":\"wpfaj\",\"size\":2813139304371547019,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":1722549420,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"hsnvkcdmxzrp\",\"aimlnwiaaom\",\"l\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":835106090,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"npjhlfzswpchwahf\",\"ousnfepgfewe\",\"wlyxgncxyk\",\"hdjhlimmbcx\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":331049008,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"hqizxfpxtgqscj\",\"vftjuhd\"],\"rootAccess\":\"Disabled\"}]},\"protocolTypes\":[\"NFSv4\"],\"provisioningState\":\"Accepted\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"pijrajcivmmghf\",\"mountTargets\":[{\"ipAddress\":\"rxgkne\",\"smbServerFqdn\":\"yinzqodfvpgs\"},{\"ipAddress\":\"xgsg\",\"smbServerFqdn\":\"fgzdjtxvz\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"v\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"vl\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"qusrdvetnws\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"duy\",\"restorationState\":\"Restoring\"}") + .toObject(ElasticVolumeProperties.class); + Assertions.assertEquals("wpfaj", model.filePath()); + Assertions.assertEquals(2813139304371547019L, model.size()); + Assertions.assertEquals(1722549420, model.exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_ONLY, model.exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.DISABLED, model.exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("hsnvkcdmxzrp", model.exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.ENABLED, model.exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.NFSV4, model.protocolTypes().get(0)); + Assertions.assertEquals("pijrajcivmmghf", model.snapshotResourceId()); + Assertions.assertEquals("v", model.dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("vl", model.dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + model.dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("qusrdvetnws", model.dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, model.snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, model.smbProperties().smbEncryption()); + Assertions.assertEquals("duy", model.backupResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeProperties model = new ElasticVolumeProperties().withFilePath("wpfaj") + .withSize(2813139304371547019L) + .withExportPolicy(new ElasticExportPolicy().withRules(Arrays.asList( + new ElasticExportPolicyRule().withRuleIndex(1722549420) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("hsnvkcdmxzrp", "aimlnwiaaom", "l")) + .withRootAccess(ElasticRootAccess.ENABLED), + new ElasticExportPolicyRule().withRuleIndex(835106090) + .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients(Arrays.asList("npjhlfzswpchwahf", "ousnfepgfewe", "wlyxgncxyk", "hdjhlimmbcx")) + .withRootAccess(ElasticRootAccess.DISABLED), + new ElasticExportPolicyRule().withRuleIndex(331049008) + .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients(Arrays.asList("hqizxfpxtgqscj", "vftjuhd")) + .withRootAccess(ElasticRootAccess.DISABLED)))) + .withProtocolTypes(Arrays.asList(ElasticProtocolType.NFSV4)) + .withSnapshotResourceId("pijrajcivmmghf") + .withDataProtection(new ElasticVolumeDataProtectionProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("v")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("vl") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) + .withElasticBackupVaultResourceId("qusrdvetnws"))) + .withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility.HIDDEN) + .withSmbProperties(new ElasticSmbProperties().withSmbEncryption(ElasticSmbEncryption.ENABLED)) + .withBackupResourceId("duy"); + model = BinaryData.fromObject(model).toObject(ElasticVolumeProperties.class); + Assertions.assertEquals("wpfaj", model.filePath()); + Assertions.assertEquals(2813139304371547019L, model.size()); + Assertions.assertEquals(1722549420, model.exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_ONLY, model.exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.DISABLED, model.exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.DISABLED, model.exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("hsnvkcdmxzrp", model.exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.ENABLED, model.exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.NFSV4, model.protocolTypes().get(0)); + Assertions.assertEquals("pijrajcivmmghf", model.snapshotResourceId()); + Assertions.assertEquals("v", model.dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("vl", model.dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + model.dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("qusrdvetnws", model.dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, model.snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, model.smbProperties().smbEncryption()); + Assertions.assertEquals("duy", model.backupResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeRevertTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeRevertTests.java new file mode 100644 index 000000000000..1b21fdb4f24b --- /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\":\"ismjqfrddgamqu\"}").toObject(ElasticVolumeRevert.class); + Assertions.assertEquals("ismjqfrddgamqu", model.snapshotResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeRevert model = new ElasticVolumeRevert().withSnapshotResourceId("ismjqfrddgamqu"); + model = BinaryData.fromObject(model).toObject(ElasticVolumeRevert.class); + Assertions.assertEquals("ismjqfrddgamqu", model.snapshotResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeSnapshotPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeSnapshotPropertiesTests.java new file mode 100644 index 000000000000..db68300f214e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeSnapshotPropertiesTests.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.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\":\"pqfrtqlkz\"}") + .toObject(ElasticVolumeSnapshotProperties.class); + Assertions.assertEquals("pqfrtqlkz", model.snapshotPolicyResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeSnapshotProperties model + = new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("pqfrtqlkz"); + model = BinaryData.fromObject(model).toObject(ElasticVolumeSnapshotProperties.class); + Assertions.assertEquals("pqfrtqlkz", model.snapshotPolicyResourceId()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeUpdatePropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeUpdatePropertiesTests.java new file mode 100644 index 000000000000..180342ed5f25 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeUpdatePropertiesTests.java @@ -0,0 +1,92 @@ +// Copyright (c) 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\":6340644129016563843,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":1430018563,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"klnsrmffey\",\"xcktpiymerteeamm\",\"qiekkkzddrt\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":221974172,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"fdeesvecuijpxtx\",\"uwprtujwsawd\"],\"rootAccess\":\"Disabled\"}]},\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"xvititvtz\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"avoxtfg\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"m\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"}}") + .toObject(ElasticVolumeUpdateProperties.class); + Assertions.assertEquals(6340644129016563843L, model.size()); + Assertions.assertEquals(1430018563, 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.ENABLED, model.exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("klnsrmffey", model.exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.ENABLED, model.exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals("xvititvtz", model.dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("avoxtfg", model.dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + model.dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("m", 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(6340644129016563843L) + .withExportPolicy( + new ElasticExportPolicy() + .withRules( + Arrays + .asList( + new ElasticExportPolicyRule().withRuleIndex(1430018563) + .withUnixAccessRule(ElasticUnixAccessRule.NO_ACCESS) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients( + Arrays.asList("klnsrmffey", "xcktpiymerteeamm", "qiekkkzddrt")) + .withRootAccess(ElasticRootAccess.ENABLED), + new ElasticExportPolicyRule().withRuleIndex(221974172) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("fdeesvecuijpxtx", "uwprtujwsawd")) + .withRootAccess(ElasticRootAccess.DISABLED)))) + .withDataProtection(new ElasticVolumeDataProtectionPatchProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("xvititvtz")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("avoxtfg") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.ENFORCED) + .withElasticBackupVaultResourceId("m"))) + .withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility.VISIBLE) + .withSmbProperties(new ElasticSmbPatchProperties().withSmbEncryption(ElasticSmbEncryption.ENABLED)); + model = BinaryData.fromObject(model).toObject(ElasticVolumeUpdateProperties.class); + Assertions.assertEquals(6340644129016563843L, model.size()); + Assertions.assertEquals(1430018563, 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.ENABLED, model.exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("klnsrmffey", model.exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.ENABLED, model.exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals("xvititvtz", model.dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("avoxtfg", model.dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + model.dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("m", model.dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, model.snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, model.smbProperties().smbEncryption()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeUpdateTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeUpdateTests.java new file mode 100644 index 000000000000..e6fa38ff186b --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumeUpdateTests.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.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\":{\"hlwigdivbkbxg\":\"moy\"},\"properties\":{\"size\":6821670520079081021,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":1690246024,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"xakjsqzhzb\",\"zkgimsid\",\"asi\",\"ddyvvjskgfmo\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":540587127,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"hhvjhh\",\"akz\",\"bbjjidjksyxk\"],\"rootAccess\":\"Enabled\"}]},\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"blbjedn\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"age\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"xuns\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"}}}") + .toObject(ElasticVolumeUpdate.class); + Assertions.assertEquals("moy", model.tags().get("hlwigdivbkbxg")); + Assertions.assertEquals(6821670520079081021L, model.properties().size()); + Assertions.assertEquals(1690246024, model.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_WRITE, + model.properties().exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.properties().exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.ENABLED, model.properties().exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("xakjsqzhzb", model.properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.ENABLED, + model.properties().exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals("blbjedn", model.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("age", model.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, + model.properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("xuns", model.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, model.properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, model.properties().smbProperties().smbEncryption()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ElasticVolumeUpdate model + = new ElasticVolumeUpdate().withTags(mapOf("hlwigdivbkbxg", "moy")) + .withProperties( + new ElasticVolumeUpdateProperties().withSize(6821670520079081021L) + .withExportPolicy( + new ElasticExportPolicy() + .withRules(Arrays.asList( + new ElasticExportPolicyRule().withRuleIndex(1690246024) + .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients( + Arrays.asList("xakjsqzhzb", "zkgimsid", "asi", "ddyvvjskgfmo")) + .withRootAccess(ElasticRootAccess.ENABLED), + new ElasticExportPolicyRule().withRuleIndex(540587127) + .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("hhvjhh", "akz", "bbjjidjksyxk")) + .withRootAccess(ElasticRootAccess.ENABLED)))) + .withDataProtection(new ElasticVolumeDataProtectionPatchProperties() + .withSnapshot(new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("blbjedn")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("age") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.NOT_ENFORCED) + .withElasticBackupVaultResourceId("xuns"))) + .withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility.HIDDEN) + .withSmbProperties( + new ElasticSmbPatchProperties().withSmbEncryption(ElasticSmbEncryption.DISABLED))); + model = BinaryData.fromObject(model).toObject(ElasticVolumeUpdate.class); + Assertions.assertEquals("moy", model.tags().get("hlwigdivbkbxg")); + Assertions.assertEquals(6821670520079081021L, model.properties().size()); + Assertions.assertEquals(1690246024, model.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_WRITE, + model.properties().exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.ENABLED, model.properties().exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.ENABLED, model.properties().exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("xakjsqzhzb", model.properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.ENABLED, + model.properties().exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals("blbjedn", model.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("age", model.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, + model.properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("xuns", model.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, model.properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, model.properties().smbProperties().smbEncryption()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesCreateOrUpdateMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..a29ccf174df4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesCreateOrUpdateMockTests.java @@ -0,0 +1,141 @@ +// Copyright (c) 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\":\"za\",\"size\":6760924228094510861,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":1535281676,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"taznkcqwwxwjyof\",\"whnkbtl\",\"ljssm\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":638318099,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"s\",\"bxbteogfgfiijry\",\"wlefksxqceazfpxg\"],\"rootAccess\":\"Enabled\"},{\"ruleIndex\":1146170186,\"unixAccessRule\":\"ReadWrite\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"ossscyva\"],\"rootAccess\":\"Disabled\"},{\"ruleIndex\":1599548007,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Enabled\",\"nfsv4\":\"Disabled\",\"allowedClients\":[\"psfx\"],\"rootAccess\":\"Disabled\"}]},\"protocolTypes\":[\"NFSv4\",\"NFSv4\",\"NFSv4\"],\"provisioningState\":\"Succeeded\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"yqfttehdpboujst\",\"mountTargets\":[{\"ipAddress\":\"dshx\",\"smbServerFqdn\":\"edsuenygnxcgj\"},{\"ipAddress\":\"rnquktrf\",\"smbServerFqdn\":\"lnlrxsmy\"},{\"ipAddress\":\"rwntfm\",\"smbServerFqdn\":\"g\"},{\"ipAddress\":\"dxwnazkurrd\",\"smbServerFqdn\":\"yzjwhsetwwjwzzq\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"uukykcyqh\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"zzdcykeys\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"opazdazgbs\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"fut\",\"restorationState\":\"Failed\"},\"eTag\":\"ozglq\",\"zones\":[\"nlzclctz\"],\"location\":\"owmnd\",\"tags\":{\"wkudrbcpf\":\"dwzqauxzanhmkvfr\"},\"id\":\"xudqyemebunaucmc\",\"name\":\"rtneemmja\",\"type\":\"wcgxefnohait\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + NetAppFilesManager manager = NetAppFilesManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ElasticVolume response + = manager.elasticVolumes() + .define("admskx") + .withRegion("llojkpoyhgwwdj") + .withExistingElasticCapacityPool("bi", "dfsbwceivb", "zipbwxgoooxzp") + .withTags(mapOf("zgdyrcvuqbs", "bdl", "bsfp", "zlrqhbjnqogdx")) + .withProperties( + new ElasticVolumeProperties().withFilePath("pdgzigjsugswhg") + .withSize(4512170267931436352L) + .withExportPolicy( + new ElasticExportPolicy() + .withRules( + Arrays + .asList( + new ElasticExportPolicyRule().withRuleIndex(1892682448) + .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) + .withNfsv3(ElasticNfsv3Access.ENABLED) + .withNfsv4(ElasticNfsv4Access.ENABLED) + .withAllowedClients( + Arrays.asList("zhaquvwsxb", "nvkervq", "hoadhrsxqvzv")) + .withRootAccess(ElasticRootAccess.ENABLED), + new ElasticExportPolicyRule().withRuleIndex(1911808291) + .withUnixAccessRule(ElasticUnixAccessRule.READ_WRITE) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("zrsubklrxhjnltce", "jdvqy")) + .withRootAccess(ElasticRootAccess.ENABLED), + new ElasticExportPolicyRule().withRuleIndex(2064386356) + .withUnixAccessRule(ElasticUnixAccessRule.READ_ONLY) + .withNfsv3(ElasticNfsv3Access.DISABLED) + .withNfsv4(ElasticNfsv4Access.DISABLED) + .withAllowedClients(Arrays.asList("vqzxoebwg")) + .withRootAccess(ElasticRootAccess.ENABLED)))) + .withProtocolTypes(Arrays.asList(ElasticProtocolType.NFSV4, ElasticProtocolType.SMB)) + .withSnapshotResourceId("wtzvpakloz") + .withDataProtection(new ElasticVolumeDataProtectionProperties() + .withSnapshot( + new ElasticVolumeSnapshotProperties().withSnapshotPolicyResourceId("rswgkpjhboyikeb")) + .withBackup(new ElasticVolumeBackupProperties().withElasticBackupPolicyResourceId("ksl") + .withPolicyEnforcement(ElasticVolumePolicyEnforcement.NOT_ENFORCED) + .withElasticBackupVaultResourceId("kh"))) + .withSnapshotDirectoryVisibility(SnapshotDirectoryVisibility.HIDDEN) + .withSmbProperties(new ElasticSmbProperties().withSmbEncryption(ElasticSmbEncryption.DISABLED)) + .withBackupResourceId("cqypz")) + .withZones(Arrays.asList("tpq", "yamkncfgybm", "snxoc")) + .create(); + + Assertions.assertEquals("owmnd", response.location()); + Assertions.assertEquals("dwzqauxzanhmkvfr", response.tags().get("wkudrbcpf")); + Assertions.assertEquals("za", response.properties().filePath()); + Assertions.assertEquals(6760924228094510861L, response.properties().size()); + Assertions.assertEquals(1535281676, response.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, + 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("taznkcqwwxwjyof", + response.properties().exportPolicy().rules().get(0).allowedClients().get(0)); + Assertions.assertEquals(ElasticRootAccess.ENABLED, + response.properties().exportPolicy().rules().get(0).rootAccess()); + Assertions.assertEquals(ElasticProtocolType.NFSV4, response.properties().protocolTypes().get(0)); + Assertions.assertEquals("yqfttehdpboujst", response.properties().snapshotResourceId()); + Assertions.assertEquals("uukykcyqh", + response.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("zzdcykeys", + response.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, + response.properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("opazdazgbs", + response.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, + response.properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, response.properties().smbProperties().smbEncryption()); + Assertions.assertEquals("fut", response.properties().backupResourceId()); + Assertions.assertEquals("nlzclctz", response.zones().get(0)); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesGetWithResponseMockTests.java new file mode 100644 index 000000000000..17a343d73c58 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesGetWithResponseMockTests.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.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\":\"hvmaxgnuyeamcmhu\",\"size\":7145608410541121603,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":147732303,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"oesqrggvrbnyruko\",\"laciduwjleipj\",\"h\"],\"rootAccess\":\"Disabled\"}]},\"protocolTypes\":[\"SMB\"],\"provisioningState\":\"Failed\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"hqkkwhbgxvellvul\",\"mountTargets\":[{\"ipAddress\":\"nitmujdtvmclyymf\",\"smbServerFqdn\":\"mjpddnyxf\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"zmzqmzjqrb\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"nmdyfoebo\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"pglaoh\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"qjilaywkdcwmqsyr\",\"restorationState\":\"Failed\"},\"eTag\":\"xdqaolfylnkkb\",\"zones\":[\"vlywlt\",\"fwobb\"],\"location\":\"hlwyjfnqzocrd\",\"tags\":{\"xdncaqtt\":\"zeunt\",\"gyrihlgm\":\"ekoifuvnyttzgi\"},\"id\":\"behlqtxnr\",\"name\":\"lkndrndpgfjodh\",\"type\":\"aqotwfhipxwgsabv\"}"; + + 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("fj", "rwq", "xet", "gcwvrrmdqntycna", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("hlwyjfnqzocrd", response.location()); + Assertions.assertEquals("zeunt", response.tags().get("xdncaqtt")); + Assertions.assertEquals("hvmaxgnuyeamcmhu", response.properties().filePath()); + Assertions.assertEquals(7145608410541121603L, response.properties().size()); + Assertions.assertEquals(147732303, 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("oesqrggvrbnyruko", + 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("hqkkwhbgxvellvul", response.properties().snapshotResourceId()); + Assertions.assertEquals("zmzqmzjqrb", + response.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("nmdyfoebo", + response.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + response.properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("pglaoh", + response.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, + response.properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, response.properties().smbProperties().smbEncryption()); + Assertions.assertEquals("qjilaywkdcwmqsyr", response.properties().backupResourceId()); + Assertions.assertEquals("vlywlt", response.zones().get(0)); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesListByElasticPoolMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesListByElasticPoolMockTests.java new file mode 100644 index 000000000000..2f22c1d599c4 --- /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\":\"ei\",\"size\":4552090543693283985,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":635282226,\"unixAccessRule\":\"ReadOnly\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"ju\",\"xxbxqvm\"],\"rootAccess\":\"Disabled\"}]},\"protocolTypes\":[\"NFSv3\",\"SMB\",\"SMB\",\"NFSv3\"],\"provisioningState\":\"Succeeded\",\"availabilityStatus\":\"Online\",\"snapshotResourceId\":\"bwpntghy\",\"mountTargets\":[{\"ipAddress\":\"cdrnxsl\",\"smbServerFqdn\":\"lzladltxkpbqh\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"qjwkrhwz\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"ojisg\",\"policyEnforcement\":\"Enforced\",\"elasticBackupVaultResourceId\":\"okatu\"}},\"snapshotDirectoryVisibility\":\"Visible\",\"smbProperties\":{\"smbEncryption\":\"Disabled\"},\"backupResourceId\":\"pvbkaehxsmzyg\",\"restorationState\":\"Restored\"},\"eTag\":\"kwseivmakxhyso\",\"zones\":[\"ux\",\"kb\",\"ctvtf\",\"mskdch\"],\"location\":\"iubavlzwpvgm\",\"tags\":{\"gokedgjqafkm\":\"kzaz\",\"tvaoznqn\":\"rokzrthqetwpq\",\"ugedh\":\"xiezeagmceit\"},\"id\":\"pj\",\"name\":\"tlzm\",\"type\":\"lsyj\"}]}"; + + 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("ipowza", "czuumljcir", "pefyc", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("iubavlzwpvgm", response.iterator().next().location()); + Assertions.assertEquals("kzaz", response.iterator().next().tags().get("gokedgjqafkm")); + Assertions.assertEquals("ei", response.iterator().next().properties().filePath()); + Assertions.assertEquals(4552090543693283985L, response.iterator().next().properties().size()); + Assertions.assertEquals(635282226, + response.iterator().next().properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.READ_ONLY, + response.iterator().next().properties().exportPolicy().rules().get(0).unixAccessRule()); + Assertions.assertEquals(ElasticNfsv3Access.DISABLED, + response.iterator().next().properties().exportPolicy().rules().get(0).nfsv3()); + Assertions.assertEquals(ElasticNfsv4Access.ENABLED, + response.iterator().next().properties().exportPolicy().rules().get(0).nfsv4()); + Assertions.assertEquals("ju", + 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("bwpntghy", response.iterator().next().properties().snapshotResourceId()); + Assertions.assertEquals("qjwkrhwz", + response.iterator().next().properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("ojisg", + response.iterator().next().properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.ENFORCED, + response.iterator().next().properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("okatu", + response.iterator().next().properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.VISIBLE, + response.iterator().next().properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.DISABLED, + response.iterator().next().properties().smbProperties().smbEncryption()); + Assertions.assertEquals("pvbkaehxsmzyg", response.iterator().next().properties().backupResourceId()); + Assertions.assertEquals("ux", response.iterator().next().zones().get(0)); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesRevertMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesRevertMockTests.java new file mode 100644 index 000000000000..e98e2c81bf9e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ElasticVolumesRevertMockTests.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.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\":\"yfjlpzeqto\",\"size\":3006316405676166806,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":418707975,\"unixAccessRule\":\"NoAccess\",\"nfsv3\":\"Disabled\",\"nfsv4\":\"Enabled\",\"allowedClients\":[\"vh\",\"mfowgwbtmkek\",\"pkzwa\"],\"rootAccess\":\"Disabled\"}]},\"protocolTypes\":[\"NFSv4\",\"NFSv4\"],\"provisioningState\":\"Succeeded\",\"availabilityStatus\":\"Offline\",\"snapshotResourceId\":\"bplvfidu\",\"mountTargets\":[{\"ipAddress\":\"kxbyjg\",\"smbServerFqdn\":\"fepxyihpqadag\"},{\"ipAddress\":\"rdi\",\"smbServerFqdn\":\"dw\"},{\"ipAddress\":\"fowxwyovcxjsgbi\",\"smbServerFqdn\":\"ukdveksbuhoduc\"}],\"dataProtection\":{\"snapshot\":{\"snapshotPolicyResourceId\":\"crdpibfdyjduss\"},\"backup\":{\"elasticBackupPolicyResourceId\":\"zekbhwlkaagg\",\"policyEnforcement\":\"NotEnforced\",\"elasticBackupVaultResourceId\":\"bfrnuybffljfii\"}},\"snapshotDirectoryVisibility\":\"Hidden\",\"smbProperties\":{\"smbEncryption\":\"Enabled\"},\"backupResourceId\":\"qtaadusrexxfavsq\",\"restorationState\":\"Restoring\"},\"eTag\":\"hzilfmn\",\"zones\":[\"psimsf\",\"ypofqpmbhyqgs\",\"rmmttjxop\",\"gerhsmvg\"],\"location\":\"twzmqilrixysfnim\",\"tags\":{\"mlqoinhzduew\":\"wwwmhkruwaedrym\"},\"id\":\"hapfjiik\",\"name\":\"jdiq\",\"type\":\"liejhpc\"}"; + + 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("eolctaebf", "yrle", "jcustbvtq", "gdxzvsgeafgfoseh", + new ElasticVolumeRevert().withSnapshotResourceId("zsxezppkkwaae"), com.azure.core.util.Context.NONE); + + Assertions.assertEquals("twzmqilrixysfnim", response.location()); + Assertions.assertEquals("wwwmhkruwaedrym", response.tags().get("mlqoinhzduew")); + Assertions.assertEquals("yfjlpzeqto", response.properties().filePath()); + Assertions.assertEquals(3006316405676166806L, response.properties().size()); + Assertions.assertEquals(418707975, response.properties().exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ElasticUnixAccessRule.NO_ACCESS, + 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("vh", 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("bplvfidu", response.properties().snapshotResourceId()); + Assertions.assertEquals("crdpibfdyjduss", + response.properties().dataProtection().snapshot().snapshotPolicyResourceId()); + Assertions.assertEquals("zekbhwlkaagg", + response.properties().dataProtection().backup().elasticBackupPolicyResourceId()); + Assertions.assertEquals(ElasticVolumePolicyEnforcement.NOT_ENFORCED, + response.properties().dataProtection().backup().policyEnforcement()); + Assertions.assertEquals("bfrnuybffljfii", + response.properties().dataProtection().backup().elasticBackupVaultResourceId()); + Assertions.assertEquals(SnapshotDirectoryVisibility.HIDDEN, + response.properties().snapshotDirectoryVisibility()); + Assertions.assertEquals(ElasticSmbEncryption.ENABLED, response.properties().smbProperties().smbEncryption()); + Assertions.assertEquals("qtaadusrexxfavsq", response.properties().backupResourceId()); + Assertions.assertEquals("psimsf", response.zones().get(0)); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionIdentityTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/EncryptionIdentityTests.java index 735a2ac71afd..7d4a9527e3fa 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 @@ -13,18 +13,18 @@ public final class EncryptionIdentityTests { public void testDeserialize() throws Exception { EncryptionIdentity model = BinaryData .fromString( - "{\"principalId\":\"rfh\",\"userAssignedIdentity\":\"ctymoxoftp\",\"federatedClientId\":\"iwyczuh\"}") + "{\"principalId\":\"whoqhnlbqnbldxe\",\"userAssignedIdentity\":\"lgsc\",\"federatedClientId\":\"ri\"}") .toObject(EncryptionIdentity.class); - Assertions.assertEquals("ctymoxoftp", model.userAssignedIdentity()); - Assertions.assertEquals("iwyczuh", model.federatedClientId()); + Assertions.assertEquals("lgsc", model.userAssignedIdentity()); + Assertions.assertEquals("ri", model.federatedClientId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { EncryptionIdentity model - = new EncryptionIdentity().withUserAssignedIdentity("ctymoxoftp").withFederatedClientId("iwyczuh"); + = new EncryptionIdentity().withUserAssignedIdentity("lgsc").withFederatedClientId("ri"); model = BinaryData.fromObject(model).toObject(EncryptionIdentity.class); - Assertions.assertEquals("ctymoxoftp", model.userAssignedIdentity()); - Assertions.assertEquals("iwyczuh", model.federatedClientId()); + Assertions.assertEquals("lgsc", model.userAssignedIdentity()); + Assertions.assertEquals("ri", 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 59d1df8b1017..30bf61622c3b 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\":\"kojgcyzts\",\"privateEndpointId\":\"mznbaeqphch\"}") + = BinaryData.fromString("{\"virtualNetworkId\":\"hoocl\",\"privateEndpointId\":\"tnpqmemczjk\"}") .toObject(EncryptionTransitionRequest.class); - Assertions.assertEquals("kojgcyzts", model.virtualNetworkId()); - Assertions.assertEquals("mznbaeqphch", model.privateEndpointId()); + Assertions.assertEquals("hoocl", model.virtualNetworkId()); + Assertions.assertEquals("tnpqmemczjk", model.privateEndpointId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { EncryptionTransitionRequest model - = new EncryptionTransitionRequest().withVirtualNetworkId("kojgcyzts").withPrivateEndpointId("mznbaeqphch"); + = new EncryptionTransitionRequest().withVirtualNetworkId("hoocl").withPrivateEndpointId("tnpqmemczjk"); model = BinaryData.fromObject(model).toObject(EncryptionTransitionRequest.class); - Assertions.assertEquals("kojgcyzts", model.virtualNetworkId()); - Assertions.assertEquals("mznbaeqphch", model.privateEndpointId()); + Assertions.assertEquals("hoocl", model.virtualNetworkId()); + Assertions.assertEquals("tnpqmemczjk", model.privateEndpointId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FilePathAvailabilityRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FilePathAvailabilityRequestTests.java index 86d426c25051..c73c4765e79c 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FilePathAvailabilityRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FilePathAvailabilityRequestTests.java @@ -11,22 +11,21 @@ public final class FilePathAvailabilityRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - FilePathAvailabilityRequest model = BinaryData - .fromString("{\"name\":\"ayzri\",\"subnetId\":\"khyawfvjlboxqv\",\"availabilityZone\":\"lmxhomdyn\"}") - .toObject(FilePathAvailabilityRequest.class); - Assertions.assertEquals("ayzri", model.name()); - Assertions.assertEquals("khyawfvjlboxqv", model.subnetId()); - Assertions.assertEquals("lmxhomdyn", model.availabilityZone()); + FilePathAvailabilityRequest model + = BinaryData.fromString("{\"name\":\"oi\",\"subnetId\":\"qc\",\"availabilityZone\":\"f\"}") + .toObject(FilePathAvailabilityRequest.class); + Assertions.assertEquals("oi", model.name()); + Assertions.assertEquals("qc", model.subnetId()); + Assertions.assertEquals("f", model.availabilityZone()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FilePathAvailabilityRequest model = new FilePathAvailabilityRequest().withName("ayzri") - .withSubnetId("khyawfvjlboxqv") - .withAvailabilityZone("lmxhomdyn"); + FilePathAvailabilityRequest model + = new FilePathAvailabilityRequest().withName("oi").withSubnetId("qc").withAvailabilityZone("f"); model = BinaryData.fromObject(model).toObject(FilePathAvailabilityRequest.class); - Assertions.assertEquals("ayzri", model.name()); - Assertions.assertEquals("khyawfvjlboxqv", model.subnetId()); - Assertions.assertEquals("lmxhomdyn", model.availabilityZone()); + Assertions.assertEquals("oi", model.name()); + Assertions.assertEquals("qc", model.subnetId()); + Assertions.assertEquals("f", 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 new file mode 100644 index 000000000000..06323bf706db --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/FileSystemUserTests.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.CifsUser; +import com.azure.resourcemanager.netapp.models.FileSystemUser; +import com.azure.resourcemanager.netapp.models.NfsUser; +import org.junit.jupiter.api.Assertions; + +public final class FileSystemUserTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FileSystemUser model = BinaryData.fromString( + "{\"nfsUser\":{\"userId\":3604947321817577406,\"groupId\":3720735958022849834},\"cifsUser\":{\"username\":\"risjnhnytxifqjz\"}}") + .toObject(FileSystemUser.class); + Assertions.assertEquals(3604947321817577406L, model.nfsUser().userId()); + Assertions.assertEquals(3720735958022849834L, model.nfsUser().groupId()); + Assertions.assertEquals("risjnhnytxifqjz", model.cifsUser().username()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + FileSystemUser model = new FileSystemUser() + .withNfsUser(new NfsUser().withUserId(3604947321817577406L).withGroupId(3720735958022849834L)) + .withCifsUser(new CifsUser().withUsername("risjnhnytxifqjz")); + model = BinaryData.fromObject(model).toObject(FileSystemUser.class); + Assertions.assertEquals(3604947321817577406L, model.nfsUser().userId()); + Assertions.assertEquals(3720735958022849834L, model.nfsUser().groupId()); + Assertions.assertEquals("risjnhnytxifqjz", 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 de185fbf8cc4..b040f674c24b 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\":\"srfbjfdtwss\"}").toObject(GetGroupIdListForLdapUserRequest.class); - Assertions.assertEquals("srfbjfdtwss", model.username()); + = BinaryData.fromString("{\"username\":\"d\"}").toObject(GetGroupIdListForLdapUserRequest.class); + Assertions.assertEquals("d", model.username()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - GetGroupIdListForLdapUserRequest model = new GetGroupIdListForLdapUserRequest().withUsername("srfbjfdtwss"); + GetGroupIdListForLdapUserRequest model = new GetGroupIdListForLdapUserRequest().withUsername("d"); model = BinaryData.fromObject(model).toObject(GetGroupIdListForLdapUserRequest.class); - Assertions.assertEquals("srfbjfdtwss", model.username()); + Assertions.assertEquals("d", 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 ddc4d591b0fc..af0a7c990caf 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\":[\"tpvjzbexilzznfqq\",\"vwpm\",\"taruoujmkcj\"]}") + = BinaryData.fromString("{\"groupIdsForLdapUser\":[\"yhz\",\"xssadbzmnvdf\"]}") .toObject(GetGroupIdListForLdapUserResponseInner.class); - Assertions.assertEquals("tpvjzbexilzznfqq", model.groupIdsForLdapUser().get(0)); + Assertions.assertEquals("yhz", 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 1bb184e3a0b0..55b619e5815d 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\":1699030440,\"minute\":1045229648,\"usedBytes\":5254392939268183781}") + .fromString("{\"snapshotsToKeep\":2036871201,\"minute\":1512461872,\"usedBytes\":1374467922340694380}") .toObject(HourlySchedule.class); - Assertions.assertEquals(1699030440, model.snapshotsToKeep()); - Assertions.assertEquals(1045229648, model.minute()); - Assertions.assertEquals(5254392939268183781L, model.usedBytes()); + Assertions.assertEquals(2036871201, model.snapshotsToKeep()); + Assertions.assertEquals(1512461872, model.minute()); + Assertions.assertEquals(1374467922340694380L, model.usedBytes()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - HourlySchedule model = new HourlySchedule().withSnapshotsToKeep(1699030440) - .withMinute(1045229648) - .withUsedBytes(5254392939268183781L); + HourlySchedule model = new HourlySchedule().withSnapshotsToKeep(2036871201) + .withMinute(1512461872) + .withUsedBytes(1374467922340694380L); model = BinaryData.fromObject(model).toObject(HourlySchedule.class); - Assertions.assertEquals(1699030440, model.snapshotsToKeep()); - Assertions.assertEquals(1045229648, model.minute()); - Assertions.assertEquals(5254392939268183781L, model.usedBytes()); + Assertions.assertEquals(2036871201, model.snapshotsToKeep()); + Assertions.assertEquals(1512461872, model.minute()); + Assertions.assertEquals(1374467922340694380L, 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 f8b0fa827b99..93bc1c03f011 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\":\"aifmvikl\",\"privateEndpointId\":\"dvk\"}") + = BinaryData.fromString("{\"virtualNetworkId\":\"hotj\",\"privateEndpointId\":\"lpxuzzjgnrefq\"}") .toObject(KeyVaultPrivateEndpoint.class); - Assertions.assertEquals("aifmvikl", model.virtualNetworkId()); - Assertions.assertEquals("dvk", model.privateEndpointId()); + Assertions.assertEquals("hotj", model.virtualNetworkId()); + Assertions.assertEquals("lpxuzzjgnrefq", model.privateEndpointId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { KeyVaultPrivateEndpoint model - = new KeyVaultPrivateEndpoint().withVirtualNetworkId("aifmvikl").withPrivateEndpointId("dvk"); + = new KeyVaultPrivateEndpoint().withVirtualNetworkId("hotj").withPrivateEndpointId("lpxuzzjgnrefq"); model = BinaryData.fromObject(model).toObject(KeyVaultPrivateEndpoint.class); - Assertions.assertEquals("aifmvikl", model.virtualNetworkId()); - Assertions.assertEquals("dvk", model.privateEndpointId()); + Assertions.assertEquals("hotj", model.virtualNetworkId()); + Assertions.assertEquals("lpxuzzjgnrefq", model.privateEndpointId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapConfigurationTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapConfigurationTests.java new file mode 100644 index 000000000000..a81a4cb0149a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapConfigurationTests.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.LdapConfiguration; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class LdapConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LdapConfiguration model = BinaryData.fromString( + "{\"domain\":\"rsrrmoucsofldp\",\"ldapServers\":[\"yfcaabeolhbhlvbm\"],\"ldapOverTLS\":false,\"serverCACertificate\":\"bsxtkcudfbsfarfs\",\"certificateCNHost\":\"wlkjxn\"}") + .toObject(LdapConfiguration.class); + Assertions.assertEquals("rsrrmoucsofldp", model.domain()); + Assertions.assertEquals("yfcaabeolhbhlvbm", model.ldapServers().get(0)); + Assertions.assertFalse(model.ldapOverTLS()); + Assertions.assertEquals("bsxtkcudfbsfarfs", model.serverCACertificate()); + Assertions.assertEquals("wlkjxn", model.certificateCNHost()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LdapConfiguration model = new LdapConfiguration().withDomain("rsrrmoucsofldp") + .withLdapServers(Arrays.asList("yfcaabeolhbhlvbm")) + .withLdapOverTLS(false) + .withServerCACertificate("bsxtkcudfbsfarfs") + .withCertificateCNHost("wlkjxn"); + model = BinaryData.fromObject(model).toObject(LdapConfiguration.class); + Assertions.assertEquals("rsrrmoucsofldp", model.domain()); + Assertions.assertEquals("yfcaabeolhbhlvbm", model.ldapServers().get(0)); + Assertions.assertFalse(model.ldapOverTLS()); + Assertions.assertEquals("bsxtkcudfbsfarfs", model.serverCACertificate()); + Assertions.assertEquals("wlkjxn", model.certificateCNHost()); + } +} 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 28cbdb5c44cb..5903dfe5c0bd 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapSearchScopeOptTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/LdapSearchScopeOptTests.java @@ -11,23 +11,22 @@ public final class LdapSearchScopeOptTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - LdapSearchScopeOpt model = BinaryData - .fromString( - "{\"userDN\":\"bomvzzbtdcqv\",\"groupDN\":\"iyujviylwdshfs\",\"groupMembershipFilter\":\"rbgyefry\"}") + LdapSearchScopeOpt model = BinaryData.fromString( + "{\"userDN\":\"svbpavbopfppdbwn\",\"groupDN\":\"gahxkumasjcaa\",\"groupMembershipFilter\":\"dmmcpugmehqep\"}") .toObject(LdapSearchScopeOpt.class); - Assertions.assertEquals("bomvzzbtdcqv", model.userDN()); - Assertions.assertEquals("iyujviylwdshfs", model.groupDN()); - Assertions.assertEquals("rbgyefry", model.groupMembershipFilter()); + Assertions.assertEquals("svbpavbopfppdbwn", model.userDN()); + Assertions.assertEquals("gahxkumasjcaa", model.groupDN()); + Assertions.assertEquals("dmmcpugmehqep", model.groupMembershipFilter()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LdapSearchScopeOpt model = new LdapSearchScopeOpt().withUserDN("bomvzzbtdcqv") - .withGroupDN("iyujviylwdshfs") - .withGroupMembershipFilter("rbgyefry"); + LdapSearchScopeOpt model = new LdapSearchScopeOpt().withUserDN("svbpavbopfppdbwn") + .withGroupDN("gahxkumasjcaa") + .withGroupMembershipFilter("dmmcpugmehqep"); model = BinaryData.fromObject(model).toObject(LdapSearchScopeOpt.class); - Assertions.assertEquals("bomvzzbtdcqv", model.userDN()); - Assertions.assertEquals("iyujviylwdshfs", model.groupDN()); - Assertions.assertEquals("rbgyefry", model.groupMembershipFilter()); + Assertions.assertEquals("svbpavbopfppdbwn", model.userDN()); + Assertions.assertEquals("gahxkumasjcaa", model.groupDN()); + Assertions.assertEquals("dmmcpugmehqep", model.groupMembershipFilter()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListQuotaReportResponseInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListQuotaReportResponseInnerTests.java new file mode 100644 index 000000000000..f03ad37f38ac --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListQuotaReportResponseInnerTests.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.fluent.models.ListQuotaReportResponseInner; +import com.azure.resourcemanager.netapp.models.Type; +import org.junit.jupiter.api.Assertions; + +public final class ListQuotaReportResponseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ListQuotaReportResponseInner model = BinaryData.fromString( + "{\"value\":[{\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"vseotgqrl\",\"quotaLimitUsedInKiBs\":4929519207657456173,\"quotaLimitTotalInKiBs\":8105546637199671811,\"percentageUsed\":94.56387,\"isDerivedQuota\":true},{\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"mpgcjefuzmuvpbt\",\"quotaLimitUsedInKiBs\":2208029659863881636,\"quotaLimitTotalInKiBs\":1424992942576592611,\"percentageUsed\":8.391643,\"isDerivedQuota\":true}]}") + .toObject(ListQuotaReportResponseInner.class); + Assertions.assertEquals(Type.INDIVIDUAL_GROUP_QUOTA, model.value().get(0).quotaType()); + Assertions.assertEquals("vseotgqrl", model.value().get(0).quotaTarget()); + Assertions.assertEquals(4929519207657456173L, model.value().get(0).quotaLimitUsedInKiBs()); + Assertions.assertEquals(8105546637199671811L, model.value().get(0).quotaLimitTotalInKiBs()); + Assertions.assertEquals(94.56387F, model.value().get(0).percentageUsed()); + Assertions.assertTrue(model.value().get(0).isDerivedQuota()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListReplicationsRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListReplicationsRequestTests.java index 2a49b3ed58ff..c7a0a2ed38b3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListReplicationsRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ListReplicationsRequestTests.java @@ -13,14 +13,14 @@ public final class ListReplicationsRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ListReplicationsRequest model - = BinaryData.fromString("{\"exclude\":\"None\"}").toObject(ListReplicationsRequest.class); - Assertions.assertEquals(Exclude.NONE, model.exclude()); + = BinaryData.fromString("{\"exclude\":\"Deleted\"}").toObject(ListReplicationsRequest.class); + Assertions.assertEquals(Exclude.DELETED, model.exclude()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ListReplicationsRequest model = new ListReplicationsRequest().withExclude(Exclude.NONE); + ListReplicationsRequest model = new ListReplicationsRequest().withExclude(Exclude.DELETED); model = BinaryData.fromObject(model).toObject(ListReplicationsRequest.class); - Assertions.assertEquals(Exclude.NONE, model.exclude()); + Assertions.assertEquals(Exclude.DELETED, model.exclude()); } } 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 5ea47c9f1374..474c32738c33 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\":\"nayqi\",\"endpointType\":\"dst\",\"replicationSchedule\":\"_10minutely\",\"remoteVolumeResourceId\":\"havhqlkthumaqolb\",\"remoteVolumeRegion\":\"cdui\",\"mirrorState\":\"Uninitialized\",\"replicationCreationTime\":\"2021-07-05T23:49:12Z\",\"replicationDeletionTime\":\"2021-11-08T10:44:08Z\"}],\"nextLink\":\"vaolpsslqlf\"}") + "{\"value\":[{\"replicationId\":\"rsc\",\"endpointType\":\"src\",\"replicationSchedule\":\"hourly\",\"remoteVolumeResourceId\":\"vfiwjmygtdss\",\"remoteVolumeRegion\":\"wtmwerio\",\"mirrorState\":\"Uninitialized\",\"replicationCreationTime\":\"2021-06-08T10:58:30Z\",\"replicationDeletionTime\":\"2021-02-21T22:13:10Z\"}],\"nextLink\":\"wab\"}") .toObject(ListReplications.class); - Assertions.assertEquals(EndpointType.DST, model.value().get(0).endpointType()); - Assertions.assertEquals(ReplicationSchedule.ONE_ZEROMINUTELY, model.value().get(0).replicationSchedule()); - Assertions.assertEquals("havhqlkthumaqolb", model.value().get(0).remoteVolumeResourceId()); - Assertions.assertEquals("cdui", model.value().get(0).remoteVolumeRegion()); - Assertions.assertEquals("vaolpsslqlf", model.nextLink()); + Assertions.assertEquals(EndpointType.SRC, model.value().get(0).endpointType()); + Assertions.assertEquals(ReplicationSchedule.HOURLY, model.value().get(0).replicationSchedule()); + Assertions.assertEquals("vfiwjmygtdss", model.value().get(0).remoteVolumeResourceId()); + Assertions.assertEquals("wtmwerio", model.value().get(0).remoteVolumeRegion()); + Assertions.assertEquals("wab", 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 aa57a816d949..b00c7119eae3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ManagedServiceIdentityTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ManagedServiceIdentityTests.java @@ -16,7 +16,7 @@ public final class ManagedServiceIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedServiceIdentity model = BinaryData.fromString( - "{\"principalId\":\"4874fca2-98c7-489a-b222-1e81560c1cc3\",\"tenantId\":\"fb4813d8-c3b4-4303-8154-a8ad04c76c98\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"h\":{\"principalId\":\"650d7d51-5a6e-4400-b441-f8be2806f868\",\"clientId\":\"b189049f-a04e-455f-a235-fe97c63a1f2a\"},\"spskasdvlmfwdgz\":{\"principalId\":\"14e56ed6-7ee2-4877-a330-08080cd8c9a6\",\"clientId\":\"910ff85d-3155-4cd9-8fe6-2dbe334fe04b\"}}}") + "{\"principalId\":\"b323b4ce-9b20-4865-aa3c-1ca8884a7941\",\"tenantId\":\"d1fffcc9-5318-4a1d-954b-ace8d851ad0e\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"wmn\":{\"principalId\":\"ee1da2c4-c96e-47ef-83bf-dab440bc6fd0\",\"clientId\":\"471ec672-e4ba-4779-83f1-84df25bd5683\"},\"tijfybvp\":{\"principalId\":\"ff5396d2-630f-4e19-9865-522660410dcc\",\"clientId\":\"12018565-60b5-469e-8a74-607fcf909ec2\"},\"rsg\":{\"principalId\":\"587a036b-1484-4a54-b8c5-2dbeccaaca81\",\"clientId\":\"23553cbb-1091-4c86-8510-f16dd18ebb02\"}}}") .toObject(ManagedServiceIdentity.class); Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); } @@ -24,8 +24,8 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ManagedServiceIdentity model = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf("h", new UserAssignedIdentity(), "spskasdvlmfwdgz", new UserAssignedIdentity())); + .withUserAssignedIdentities(mapOf("wmn", new UserAssignedIdentity(), "tijfybvp", new UserAssignedIdentity(), + "rsg", new UserAssignedIdentity())); model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); } 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 4e3d3971d9c7..46b955fb81bf 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\":22897042,\"daysOfMonth\":\"yftaakcpw\",\"hour\":1040923285,\"minute\":842537299,\"usedBytes\":7212384813102944092}") + "{\"snapshotsToKeep\":1736041382,\"daysOfMonth\":\"kuwhh\",\"hour\":1745648414,\"minute\":537605324,\"usedBytes\":5084521144740681912}") .toObject(MonthlySchedule.class); - Assertions.assertEquals(22897042, model.snapshotsToKeep()); - Assertions.assertEquals("yftaakcpw", model.daysOfMonth()); - Assertions.assertEquals(1040923285, model.hour()); - Assertions.assertEquals(842537299, model.minute()); - Assertions.assertEquals(7212384813102944092L, model.usedBytes()); + Assertions.assertEquals(1736041382, model.snapshotsToKeep()); + Assertions.assertEquals("kuwhh", model.daysOfMonth()); + Assertions.assertEquals(1745648414, model.hour()); + Assertions.assertEquals(537605324, model.minute()); + Assertions.assertEquals(5084521144740681912L, model.usedBytes()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MonthlySchedule model = new MonthlySchedule().withSnapshotsToKeep(22897042) - .withDaysOfMonth("yftaakcpw") - .withHour(1040923285) - .withMinute(842537299) - .withUsedBytes(7212384813102944092L); + MonthlySchedule model = new MonthlySchedule().withSnapshotsToKeep(1736041382) + .withDaysOfMonth("kuwhh") + .withHour(1745648414) + .withMinute(537605324) + .withUsedBytes(5084521144740681912L); model = BinaryData.fromObject(model).toObject(MonthlySchedule.class); - Assertions.assertEquals(22897042, model.snapshotsToKeep()); - Assertions.assertEquals("yftaakcpw", model.daysOfMonth()); - Assertions.assertEquals(1040923285, model.hour()); - Assertions.assertEquals(842537299, model.minute()); - Assertions.assertEquals(7212384813102944092L, model.usedBytes()); + Assertions.assertEquals(1736041382, model.snapshotsToKeep()); + Assertions.assertEquals("kuwhh", model.daysOfMonth()); + Assertions.assertEquals(1745648414, model.hour()); + Assertions.assertEquals(537605324, model.minute()); + Assertions.assertEquals(5084521144740681912L, 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 49536ebc5aae..37b0e4e08f27 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\":1928900887,\"default\":956016489,\"usage\":1913497059},\"id\":\"mun\",\"name\":\"qsxvmhf\",\"type\":\"uzjyihsasbhudypo\"}"; + = "{\"properties\":{\"current\":757946426,\"default\":1006803160,\"usage\":505649327},\"id\":\"uuzivensrpmeyyvp\",\"name\":\"patlbijp\",\"type\":\"gsksrfhf\"}"; 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("gsjj", "undxgketw", "hhzjhfj", com.azure.core.util.Context.NONE) + .getWithResponse("fkoxmlghktuidvr", "azlp", "wwexymzvlazipbh", 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 6480aea513aa..f55ca87bf44b 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\":2092951767,\"default\":97968246,\"usage\":2105592893},\"id\":\"nygq\",\"name\":\"nfwqzdzgtilaxhn\",\"type\":\"hqlyvijo\"}]}"; + = "{\"value\":[{\"properties\":{\"current\":406069948,\"default\":2037491254,\"usage\":421608055},\"id\":\"wzfgbrttuiaclkie\",\"name\":\"hajlfn\",\"type\":\"hiqfyuttdiy\"}]}"; 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("yue", "slynsqyrpfoo", com.azure.core.util.Context.NONE); + = manager.netAppResourceQuotaLimitsAccounts().list("olmk", "bnxwc", 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 506ae88ad4fe..1e68fb5f37ee 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\":698476500,\"default\":1137080537,\"usage\":1889972002},\"id\":\"pvwgfstmhqykizmd\",\"name\":\"saoafcluqvox\",\"type\":\"ycjimryvwgcwwpbm\"}"; + = "{\"properties\":{\"current\":962255720,\"default\":576069827,\"usage\":1195801008},\"id\":\"kjguwrjmwvvbtuq\",\"name\":\"xximwgxq\",\"type\":\"dekotjgxieqfkyf\"}"; 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("mxuq", "bsxtkcudfbsfarfs", com.azure.core.util.Context.NONE) + .getWithResponse("imyc", "grvkcxzznnuif", 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 4b6c33ac69d0..e43539885dfb 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\":1162604826,\"default\":405632211,\"usage\":322305993},\"id\":\"hecbvopwndyq\",\"name\":\"eallklmtkhlo\",\"type\":\"kxxpvbrd\"}]}"; + = "{\"value\":[{\"properties\":{\"current\":1874096637,\"default\":1667611376,\"usage\":883857471},\"id\":\"eumexmjbxc\",\"name\":\"ccwkqmtx\",\"type\":\"p\"}]}"; 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("gwe", com.azure.core.util.Context.NONE); + = manager.netAppResourceQuotaLimits().list("iwvjaqupbyyn", 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 c79dc9b422a3..9fdcd41f0343 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\":\"Default\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"yych\",\"isAvailable\":true}]},\"id\":\"lpjrtwsz\",\"name\":\"vv\",\"type\":\"icphvtrrmhw\"}"; + = "{\"properties\":{\"storageToNetworkProximity\":\"T1\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"trqrejda\",\"isAvailable\":true},{\"availabilityZone\":\"imldahlfxlmu\",\"isAvailable\":true},{\"availabilityZone\":\"adj\",\"isAvailable\":false},{\"availabilityZone\":\"cskiioshjgc\",\"isAvailable\":true}]},\"id\":\"bnxgzt\",\"name\":\"cg\",\"type\":\"tjchfjvmy\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,12 +31,11 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - RegionInfoResource response = manager.netAppResourceRegionInfos() - .getWithResponse("jmzsyzfh", com.azure.core.util.Context.NONE) - .getValue(); + RegionInfoResource response + = manager.netAppResourceRegionInfos().getWithResponse("qis", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals(RegionStorageToNetworkProximity.DEFAULT, response.storageToNetworkProximity()); - Assertions.assertEquals("yych", response.availabilityZoneMappings().get(0).availabilityZone()); + Assertions.assertEquals(RegionStorageToNetworkProximity.T1, response.storageToNetworkProximity()); + Assertions.assertEquals("trqrejda", response.availabilityZoneMappings().get(0).availabilityZone()); Assertions.assertTrue(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 f8a138a5b3db..3ce2ff35bf17 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\":\"yzlwh\",\"isAvailable\":true},{\"availabilityZone\":\"hoocl\",\"isAvailable\":false},{\"availabilityZone\":\"qmemc\",\"isAvailable\":true},{\"availabilityZone\":\"mykyujxsglhs\",\"isAvailable\":false}]},\"id\":\"ejylmbkzu\",\"name\":\"nigrfihotjewl\",\"type\":\"xuzzjgnrefq\"}]}"; + = "{\"value\":[{\"properties\":{\"storageToNetworkProximity\":\"T1\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"lbefvwc\",\"isAvailable\":true},{\"availabilityZone\":\"pylrwoxzgwpsy\",\"isAvailable\":true},{\"availabilityZone\":\"eypdvrbk\",\"isAvailable\":true}]},\"id\":\"dkgaw\",\"name\":\"wjxildfkcefeyg\",\"type\":\"q\"}]}"; 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("bfdpyflubhv", com.azure.core.util.Context.NONE); + = manager.netAppResourceRegionInfos().list("j", com.azure.core.util.Context.NONE); - Assertions.assertEquals(RegionStorageToNetworkProximity.DEFAULT, + Assertions.assertEquals(RegionStorageToNetworkProximity.T1, response.iterator().next().storageToNetworkProximity()); - Assertions.assertEquals("yzlwh", + Assertions.assertEquals("lbefvwc", response.iterator().next().availabilityZoneMappings().get(0).availabilityZone()); Assertions.assertTrue(response.iterator().next().availabilityZoneMappings().get(0).isAvailable()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesGetWithResponseMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NetAppResourceUsagesGetWithResponseMockTests.java index 664a362b6bcd..a2339c5c47a9 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\":\"vvpa\",\"name\":{\"value\":\"sgb\",\"localizedValue\":\"antuygdhgaqipirp\"},\"properties\":{\"currentValue\":986571803,\"limit\":1818026917,\"unit\":\"lopmjnlexwhcbjpi\"}}"; + = "{\"id\":\"mdmuqoh\",\"name\":{\"value\":\"raxq\",\"localizedValue\":\"drwjcljbrhlh\"},\"properties\":{\"currentValue\":1266501182,\"limit\":495666062,\"unit\":\"enninafhxrzfrm\"}}"; 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("vyuns", "xlghieegj", com.azure.core.util.Context.NONE) + .getWithResponse("i", "kkcxwnujvqynvav", 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 23f7be045aab..77d8d78498df 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\":\"m\",\"name\":{\"value\":\"xne\",\"localizedValue\":\"sm\"},\"properties\":{\"currentValue\":1095840050,\"limit\":1064315343,\"unit\":\"apucygvo\"}}]}"; + = "{\"value\":[{\"id\":\"jlvzklk\",\"name\":{\"value\":\"ikyjtkakvlb\",\"localizedValue\":\"hjvpzaptu\"},\"properties\":{\"currentValue\":1787762673,\"limit\":425882032,\"unit\":\"jixwfgc\"}}]}"; 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("yvk", com.azure.core.util.Context.NONE); + = manager.netAppResourceUsages().list("wgofmhx", 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 702a6241d2f1..1384d947cef1 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\":true,\"reason\":\"Invalid\",\"message\":\"qbnqbpizxqltgrdo\"}"; + String responseStr = "{\"isAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"tvdxxhe\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,15 +32,13 @@ public void testCheckFilePathAvailabilityWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CheckAvailabilityResponse response = manager.netAppResources() - .checkFilePathAvailabilityWithResponse("dzsylollgtrczz", - new FilePathAvailabilityRequest().withName("dmxzjijpv") - .withSubnetId("aurkihcirlde") - .withAvailabilityZone("rdcoxnbkkj"), + .checkFilePathAvailabilityWithResponse("detjygowi", + new FilePathAvailabilityRequest().withName("cq").withSubnetId("olzkgys").withAvailabilityZone("zyybzo"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertTrue(response.isAvailable()); - Assertions.assertEquals(InAvailabilityReasonType.INVALID, response.reason()); - Assertions.assertEquals("qbnqbpizxqltgrdo", response.message()); + Assertions.assertFalse(response.isAvailable()); + Assertions.assertEquals(InAvailabilityReasonType.ALREADY_EXISTS, response.reason()); + Assertions.assertEquals("tvdxxhe", 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 ec7892f19df0..a6605e485ef1 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\":\"Invalid\",\"message\":\"xuifmcsypobkdqz\"}"; + String responseStr = "{\"isAvailable\":true,\"reason\":\"Invalid\",\"message\":\"wzt\"}"; 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("hrpq", - new ResourceNameAvailabilityRequest().withName("df") - .withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS) - .withResourceGroup("kois"), + .checkNameAvailabilityWithResponse("iflikyypzkgxfx", + new ResourceNameAvailabilityRequest().withName("myrqsdbpokszan") + .withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES) + .withResourceGroup("wgpterdiuw"), com.azure.core.util.Context.NONE) .getValue(); Assertions.assertTrue(response.isAvailable()); Assertions.assertEquals(InAvailabilityReasonType.INVALID, response.reason()); - Assertions.assertEquals("xuifmcsypobkdqz", response.message()); + Assertions.assertEquals("wzt", 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 ea7e55be2192..47aa9c082934 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\":\"iowxi\"}"; + String responseStr = "{\"isAvailable\":false,\"reason\":\"Invalid\",\"message\":\"neychbjizq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,15 +33,15 @@ public void testCheckQuotaAvailabilityWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CheckAvailabilityResponse response = manager.netAppResources() - .checkQuotaAvailabilityWithResponse("ypxrx", - new QuotaAvailabilityRequest().withName("bfihw") + .checkQuotaAvailabilityWithResponse("gmlilwzghjhjvmab", + new QuotaAvailabilityRequest().withName("zbwaybfmdafbgym") .withType(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS) - .withResourceGroup("vctafsrb"), + .withResourceGroup("napreojxrjnbsco"), com.azure.core.util.Context.NONE) .getValue(); Assertions.assertFalse(response.isAvailable()); Assertions.assertEquals(InAvailabilityReasonType.INVALID, response.reason()); - Assertions.assertEquals("iowxi", response.message()); + Assertions.assertEquals("neychbjizq", 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 bc1c50245984..485138b3dac8 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\":\"byrrueqth\",\"subnetId\":\"gnmbscbbxigdhx\",\"networkSiblingSetStateId\":\"d\",\"networkFeatures\":\"Basic_Standard\",\"provisioningState\":\"Updating\",\"nicInfoList\":[{\"ipAddress\":\"pyqy\",\"volumeResourceIds\":[\"ubmdnafcbqwre\",\"jelaqacigele\",\"hdbvqvwzkjop\"]},{\"ipAddress\":\"eonrlkwzdqybxce\",\"volumeResourceIds\":[\"cptsoqfyiase\",\"chkrttzr\",\"zisgykiuemvanb\",\"zohmnrxxbs\"]}]}"; + = "{\"networkSiblingSetId\":\"qbtimpk\",\"subnetId\":\"lornsihqh\",\"networkSiblingSetStateId\":\"smusuaawj\",\"networkFeatures\":\"Standard\",\"provisioningState\":\"Canceled\",\"nicInfoList\":[{\"ipAddress\":\"z\",\"volumeResourceIds\":[\"iixyxvqbanosj\"]},{\"ipAddress\":\"irnb\",\"volumeResourceIds\":[\"m\"]}]}"; 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("zezkhhltnjadh", - new QueryNetworkSiblingSetRequest().withNetworkSiblingSetId("oawjqoyueay").withSubnetId("bpcms"), - com.azure.core.util.Context.NONE) - .getValue(); + NetworkSiblingSet response + = manager.netAppResources() + .queryNetworkSiblingSetWithResponse("h", + new QueryNetworkSiblingSetRequest().withNetworkSiblingSetId("shthmgpczqu") + .withSubnetId("ptkbvcpxtzhi"), + com.azure.core.util.Context.NONE) + .getValue(); - Assertions.assertEquals("byrrueqth", response.networkSiblingSetId()); - Assertions.assertEquals("gnmbscbbxigdhx", response.subnetId()); - Assertions.assertEquals("d", response.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.BASIC_STANDARD, response.networkFeatures()); - Assertions.assertEquals("ubmdnafcbqwre", response.nicInfoList().get(0).volumeResourceIds().get(0)); + Assertions.assertEquals("qbtimpk", response.networkSiblingSetId()); + Assertions.assertEquals("lornsihqh", response.subnetId()); + Assertions.assertEquals("smusuaawj", response.networkSiblingSetStateId()); + Assertions.assertEquals(NetworkFeatures.STANDARD, response.networkFeatures()); + Assertions.assertEquals("iixyxvqbanosj", 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 a6ab9b16a8de..52fb3b1744df 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\":\"T1\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"bqqqagwwrxa\",\"isAvailable\":true},{\"availabilityZone\":\"sgl\",\"isAvailable\":true}]}"; + = "{\"storageToNetworkProximity\":\"Default\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"xi\",\"isAvailable\":false},{\"availabilityZone\":\"fyzavfrbypicdb\",\"isAvailable\":false},{\"availabilityZone\":\"taq\",\"isAvailable\":true},{\"availabilityZone\":\"azpdg\",\"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("spnxwqagnepzw", com.azure.core.util.Context.NONE) + .queryRegionInfoWithResponse("sgnwdxzedpq", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(RegionStorageToNetworkProximity.T1, response.storageToNetworkProximity()); - Assertions.assertEquals("bqqqagwwrxa", response.availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertTrue(response.availabilityZoneMappings().get(0).isAvailable()); + Assertions.assertEquals(RegionStorageToNetworkProximity.DEFAULT, response.storageToNetworkProximity()); + Assertions.assertEquals("xi", 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 19f76c277c26..b6846c9f7130 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\":\"apcohhouc\",\"subnetId\":\"q\",\"networkSiblingSetStateId\":\"xcxzrzdcgdzben\",\"networkFeatures\":\"Standard\",\"provisioningState\":\"Failed\",\"nicInfoList\":[{\"ipAddress\":\"zqddtjwfljhzn\",\"volumeResourceIds\":[\"uatmzwcjjncqtj\",\"mizvgbgatzuuvbx\",\"grebwggahttzlsw\"]},{\"ipAddress\":\"jqfutlxj\",\"volumeResourceIds\":[\"asunwqrjzfrgq\",\"aohcmbuocn\",\"r\",\"hmbpyryxamebly\"]}]}"; + = "{\"networkSiblingSetId\":\"lkpzwbhnrecchd\",\"subnetId\":\"rmuhkahmjedbiucv\",\"networkSiblingSetStateId\":\"hwmjpjbweunxc\",\"networkFeatures\":\"Standard_Basic\",\"provisioningState\":\"Succeeded\",\"nicInfoList\":[{\"ipAddress\":\"ihppiyb\",\"volumeResourceIds\":[\"nzuz\",\"bgk\",\"cscpiuzvkunh\",\"i\"]},{\"ipAddress\":\"uktirzkaugpu\",\"volumeResourceIds\":[\"cfqp\"]}]}"; 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("jklinh", - new UpdateNetworkSiblingSetRequest().withNetworkSiblingSetId("dptysprqs") - .withSubnetId("nzxojpslsvjgpli") - .withNetworkSiblingSetStateId("fiqwoy") - .withNetworkFeatures(NetworkFeatures.BASIC_STANDARD), + .updateNetworkSiblingSet("dorgmynltw", + new UpdateNetworkSiblingSetRequest().withNetworkSiblingSetId("p") + .withSubnetId("tmfoeajogsyxwet") + .withNetworkSiblingSetStateId("mfd") + .withNetworkFeatures(NetworkFeatures.STANDARD_BASIC), com.azure.core.util.Context.NONE); - Assertions.assertEquals("apcohhouc", response.networkSiblingSetId()); - Assertions.assertEquals("q", response.subnetId()); - Assertions.assertEquals("xcxzrzdcgdzben", response.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.STANDARD, response.networkFeatures()); - Assertions.assertEquals("uatmzwcjjncqtj", response.nicInfoList().get(0).volumeResourceIds().get(0)); + Assertions.assertEquals("lkpzwbhnrecchd", response.networkSiblingSetId()); + Assertions.assertEquals("rmuhkahmjedbiucv", response.subnetId()); + Assertions.assertEquals("hwmjpjbweunxc", response.networkSiblingSetStateId()); + Assertions.assertEquals(NetworkFeatures.STANDARD_BASIC, response.networkFeatures()); + Assertions.assertEquals("nzuz", 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 8ee4e170a4df..f25b16bf8b0e 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\":\"qyikvy\",\"subnetId\":\"uyav\",\"networkSiblingSetStateId\":\"wmn\",\"networkFeatures\":\"Standard_Basic\",\"provisioningState\":\"Succeeded\",\"nicInfoList\":[{\"ipAddress\":\"bvpoekrsgsgbdhu\",\"volumeResourceIds\":[\"njdgkynscliq\",\"zvhxnk\",\"mtk\",\"bo\"]},{\"ipAddress\":\"pnvdxz\",\"volumeResourceIds\":[\"hfrbbc\",\"vqagtltdhlf\",\"qojpy\"]}]}") + "{\"networkSiblingSetId\":\"ci\",\"subnetId\":\"defxrdc\",\"networkSiblingSetStateId\":\"nbkkjanurnnq\",\"networkFeatures\":\"Basic\",\"provisioningState\":\"Updating\",\"nicInfoList\":[{\"ipAddress\":\"qltgrd\",\"volumeResourceIds\":[\"pxrxvbfihwu\",\"vctafsrb\"]},{\"ipAddress\":\"blml\",\"volumeResourceIds\":[\"xihspnxwq\",\"gnepz\"]},{\"ipAddress\":\"klsbsbqqqagw\",\"volumeResourceIds\":[\"ao\",\"zisglrrczezkhh\",\"tnjadhq\"]},{\"ipAddress\":\"wjqo\",\"volumeResourceIds\":[\"ayfbpcm\",\"plby\",\"rueqthwm\"]}]}") .toObject(NetworkSiblingSetInner.class); - Assertions.assertEquals("qyikvy", model.networkSiblingSetId()); - Assertions.assertEquals("uyav", model.subnetId()); - Assertions.assertEquals("wmn", model.networkSiblingSetStateId()); - Assertions.assertEquals(NetworkFeatures.STANDARD_BASIC, model.networkFeatures()); - Assertions.assertEquals("njdgkynscliq", model.nicInfoList().get(0).volumeResourceIds().get(0)); + Assertions.assertEquals("ci", model.networkSiblingSetId()); + Assertions.assertEquals("defxrdc", model.subnetId()); + Assertions.assertEquals("nbkkjanurnnq", model.networkSiblingSetStateId()); + Assertions.assertEquals(NetworkFeatures.BASIC, model.networkFeatures()); + Assertions.assertEquals("pxrxvbfihwu", 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 new file mode 100644 index 000000000000..a3dcc803e185 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/NfsUserTests.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.NfsUser; +import org.junit.jupiter.api.Assertions; + +public final class NfsUserTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NfsUser model = BinaryData.fromString("{\"userId\":605829579091214596,\"groupId\":4223928428315416005}") + .toObject(NfsUser.class); + Assertions.assertEquals(605829579091214596L, model.userId()); + Assertions.assertEquals(4223928428315416005L, model.groupId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NfsUser model = new NfsUser().withUserId(605829579091214596L).withGroupId(4223928428315416005L); + model = BinaryData.fromObject(model).toObject(NfsUser.class); + Assertions.assertEquals(605829579091214596L, model.userId()); + Assertions.assertEquals(4223928428315416005L, 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 b0f0888fd36e..45e488c1c2de 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 @@ -11,8 +11,10 @@ public final class NicInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NicInfo model = BinaryData.fromString("{\"ipAddress\":\"gtrd\",\"volumeResourceIds\":[\"fmzzsdymbrny\",\"u\"]}") + NicInfo model = BinaryData + .fromString( + "{\"ipAddress\":\"mbscbbx\",\"volumeResourceIds\":[\"hxiidlopedb\",\"dpyqyybxubmd\",\"afcbqw\",\"e\"]}") .toObject(NicInfo.class); - Assertions.assertEquals("fmzzsdymbrny", model.volumeResourceIds().get(0)); + Assertions.assertEquals("hxiidlopedb", 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 0088075ae8c0..de94209bc098 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\":\"jhf\",\"display\":{\"provider\":\"ecactx\",\"resource\":\"oteyowc\",\"operation\":\"qovekqvgqou\",\"description\":\"fzmpjwyivq\"},\"origin\":\"f\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"sphuagrttikteus\",\"displayName\":\"zkvyklx\",\"displayDescription\":\"yja\",\"unit\":\"mmfblcqcuubgqib\",\"supportedAggregationTypes\":[\"Average\"],\"supportedTimeGrainTypes\":[\"tttwgdslqxih\",\"rmooizqse\",\"pxiutc\",\"apzhyrpetoge\"],\"internalMetricName\":\"oxslh\",\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"abrqnkkzj\",\"sourceMdmNamespace\":\"b\",\"dimensions\":[{},{},{},{}],\"aggregationType\":\"ehvvib\",\"fillGapWithZero\":false,\"category\":\"s\",\"resourceIdDimensionNameOverride\":\"qbeitpkxztmoob\",\"isInternal\":false},{\"name\":\"idgfc\",\"displayName\":\"mpimaqxzhemjyh\",\"displayDescription\":\"uj\",\"unit\":\"t\",\"supportedAggregationTypes\":[\"Average\",\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"lkb\"],\"internalMetricName\":\"pfajnjwltlwtjj\",\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"alhsnvkc\",\"sourceMdmNamespace\":\"xzrpo\",\"dimensions\":[{},{},{},{}],\"aggregationType\":\"nwiaaomyl\",\"fillGapWithZero\":false,\"category\":\"ulcsethwwnpj\",\"resourceIdDimensionNameOverride\":\"fz\",\"isInternal\":false},{\"name\":\"hwahfbousn\",\"displayName\":\"pgfewetwlyx\",\"displayDescription\":\"cxy\",\"unit\":\"hdjhlimmbcx\",\"supportedAggregationTypes\":[\"Average\",\"Average\",\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"xcjzhqizxfpxt\",\"qscjavftjuh\",\"qaz\",\"mtggu\"],\"internalMetricName\":\"ijr\",\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"vmmghfcfiwrxgk\",\"sourceMdmNamespace\":\"uvyinzqodfvpgs\",\"dimensions\":[{}],\"aggregationType\":\"sgbpfgzdjtx\",\"fillGapWithZero\":false,\"category\":\"bqvgaqv\",\"resourceIdDimensionNameOverride\":\"a\",\"isInternal\":true}],\"logSpecifications\":[{\"name\":\"dvetnws\",\"displayName\":\"utnw\"},{\"name\":\"uycvuzhyrmewip\",\"displayName\":\"ekdxuku\"}]}}}]}"; + = "{\"value\":[{\"name\":\"gbgatzuuvbxn\",\"display\":{\"provider\":\"bwggahtt\",\"resource\":\"swvajqfu\",\"operation\":\"x\",\"description\":\"qzasunwqrjzfrgqh\"},\"origin\":\"hcmbuocnjrohmbp\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"eblydyv\",\"displayName\":\"kmrocxne\",\"displayDescription\":\"sm\",\"unit\":\"dlfp\",\"supportedAggregationTypes\":[\"Average\",\"Average\",\"Average\",\"Average\"],\"supportedTimeGrainTypes\":[\"avyunssxlg\",\"ieegjl\"],\"internalMetricName\":\"vpaseksgbu\",\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"uygdhgaqipirp\",\"sourceMdmNamespace\":\"rqofulopmjnlexwh\",\"dimensions\":[{}],\"aggregationType\":\"ibkeph\",\"fillGapWithZero\":false,\"category\":\"rctat\",\"resourceIdDimensionNameOverride\":\"intqpbrlcyr\",\"isInternal\":true}],\"logSpecifications\":[{\"name\":\"ofxyfsrucvcrrpc\",\"displayName\":\"tbstvjeaqnrmv\"}]}}}]}"; 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("jhf", response.iterator().next().name()); - Assertions.assertEquals("ecactx", response.iterator().next().display().provider()); - Assertions.assertEquals("oteyowc", response.iterator().next().display().resource()); - Assertions.assertEquals("qovekqvgqou", response.iterator().next().display().operation()); - Assertions.assertEquals("fzmpjwyivq", response.iterator().next().display().description()); - Assertions.assertEquals("f", response.iterator().next().origin()); - Assertions.assertEquals("sphuagrttikteus", + Assertions.assertEquals("gbgatzuuvbxn", response.iterator().next().name()); + Assertions.assertEquals("bwggahtt", response.iterator().next().display().provider()); + Assertions.assertEquals("swvajqfu", response.iterator().next().display().resource()); + Assertions.assertEquals("x", response.iterator().next().display().operation()); + Assertions.assertEquals("qzasunwqrjzfrgqh", response.iterator().next().display().description()); + Assertions.assertEquals("hcmbuocnjrohmbp", response.iterator().next().origin()); + Assertions.assertEquals("eblydyv", response.iterator().next().serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("zkvyklx", + Assertions.assertEquals("kmrocxne", response.iterator().next().serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("yja", + Assertions.assertEquals("sm", response.iterator().next().serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("mmfblcqcuubgqib", + Assertions.assertEquals("dlfp", 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("tttwgdslqxih", + Assertions.assertEquals("avyunssxlg", response.iterator() .next() .serviceSpecification() @@ -64,21 +64,21 @@ public void testList() throws Exception { .get(0) .supportedTimeGrainTypes() .get(0)); - Assertions.assertEquals("oxslh", + Assertions.assertEquals("vpaseksgbu", response.iterator().next().serviceSpecification().metricSpecifications().get(0).internalMetricName()); - Assertions.assertFalse( + Assertions.assertTrue( response.iterator().next().serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("abrqnkkzj", + Assertions.assertEquals("uygdhgaqipirp", response.iterator().next().serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("b", + Assertions.assertEquals("rqofulopmjnlexwh", response.iterator().next().serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("ehvvib", + Assertions.assertEquals("ibkeph", response.iterator().next().serviceSpecification().metricSpecifications().get(0).aggregationType()); Assertions.assertFalse( response.iterator().next().serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("s", + Assertions.assertEquals("rctat", response.iterator().next().serviceSpecification().metricSpecifications().get(0).category()); - Assertions.assertEquals("qbeitpkxztmoob", + Assertions.assertEquals("intqpbrlcyr", response.iterator() .next() .serviceSpecification() @@ -86,10 +86,10 @@ public void testList() throws Exception { .get(0) .resourceIdDimensionNameOverride()); Assertions - .assertFalse(response.iterator().next().serviceSpecification().metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("dvetnws", + .assertTrue(response.iterator().next().serviceSpecification().metricSpecifications().get(0).isInternal()); + Assertions.assertEquals("ofxyfsrucvcrrpc", response.iterator().next().serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("utnw", + Assertions.assertEquals("tbstvjeaqnrmv", 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 new file mode 100644 index 000000000000..34d42875e068 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/OriginClusterInformationTests.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.OriginClusterInformation; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class OriginClusterInformationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OriginClusterInformation model = BinaryData.fromString( + "{\"peerClusterName\":\"kdmligovi\",\"peerAddresses\":[\"xk\",\"mloazuru\",\"cbgoor\",\"te\"],\"peerVserverName\":\"ybfhjxa\",\"peerVolumeName\":\"vvjgslor\"}") + .toObject(OriginClusterInformation.class); + Assertions.assertEquals("kdmligovi", model.peerClusterName()); + Assertions.assertEquals("xk", model.peerAddresses().get(0)); + Assertions.assertEquals("ybfhjxa", model.peerVserverName()); + Assertions.assertEquals("vvjgslor", model.peerVolumeName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OriginClusterInformation model = new OriginClusterInformation().withPeerClusterName("kdmligovi") + .withPeerAddresses(Arrays.asList("xk", "mloazuru", "cbgoor", "te")) + .withPeerVserverName("ybfhjxa") + .withPeerVolumeName("vvjgslor"); + model = BinaryData.fromObject(model).toObject(OriginClusterInformation.class); + Assertions.assertEquals("kdmligovi", model.peerClusterName()); + Assertions.assertEquals("xk", model.peerAddresses().get(0)); + Assertions.assertEquals("ybfhjxa", model.peerVserverName()); + Assertions.assertEquals("vvjgslor", 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 11ad290a74ef..58fc122f72c4 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 @@ -12,16 +12,17 @@ public final class PeerClusterForVolumeMigrationRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PeerClusterForVolumeMigrationRequest model = BinaryData.fromString("{\"peerIpAddresses\":[\"erscdntne\"]}") - .toObject(PeerClusterForVolumeMigrationRequest.class); - Assertions.assertEquals("erscdntne", model.peerIpAddresses().get(0)); + PeerClusterForVolumeMigrationRequest model + = BinaryData.fromString("{\"peerIpAddresses\":[\"kqze\",\"qkdltfz\",\"mhhv\",\"gureodkwobdag\"]}") + .toObject(PeerClusterForVolumeMigrationRequest.class); + Assertions.assertEquals("kqze", model.peerIpAddresses().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PeerClusterForVolumeMigrationRequest model - = new PeerClusterForVolumeMigrationRequest().withPeerIpAddresses(Arrays.asList("erscdntne")); + PeerClusterForVolumeMigrationRequest model = new PeerClusterForVolumeMigrationRequest() + .withPeerIpAddresses(Arrays.asList("kqze", "qkdltfz", "mhhv", "gureodkwobdag")); model = BinaryData.fromObject(model).toObject(PeerClusterForVolumeMigrationRequest.class); - Assertions.assertEquals("erscdntne", model.peerIpAddresses().get(0)); + Assertions.assertEquals("kqze", 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 new file mode 100644 index 000000000000..057defd13094 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PeeringPassphrasesInnerTests.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.fluent.models.PeeringPassphrasesInner; +import org.junit.jupiter.api.Assertions; + +public final class PeeringPassphrasesInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PeeringPassphrasesInner model = BinaryData.fromString( + "{\"clusterPeeringCommand\":\"kjlmx\",\"clusterPeeringPassphrase\":\"omdynhdwdigum\",\"vserverPeeringCommand\":\"nraauzz\"}") + .toObject(PeeringPassphrasesInner.class); + Assertions.assertEquals("kjlmx", model.clusterPeeringCommand()); + Assertions.assertEquals("omdynhdwdigum", model.clusterPeeringPassphrase()); + Assertions.assertEquals("nraauzz", 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 0aa4540b9d0d..16f835336ce3 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\":\"semwabnet\"}").toObject(PoolChangeRequest.class); - Assertions.assertEquals("semwabnet", model.newPoolResourceId()); + = BinaryData.fromString("{\"newPoolResourceId\":\"dxunkbebxmubyyn\"}").toObject(PoolChangeRequest.class); + Assertions.assertEquals("dxunkbebxmubyyn", model.newPoolResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PoolChangeRequest model = new PoolChangeRequest().withNewPoolResourceId("semwabnet"); + PoolChangeRequest model = new PoolChangeRequest().withNewPoolResourceId("dxunkbebxmubyyn"); model = BinaryData.fromObject(model).toObject(PoolChangeRequest.class); - Assertions.assertEquals("semwabnet", model.newPoolResourceId()); + Assertions.assertEquals("dxunkbebxmubyyn", 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 a9c58489e14c..116d6e23eb05 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\":6158704597688718378,\"qosType\":\"Manual\",\"coolAccess\":false,\"customThroughputMibps\":1678889630}") + "{\"size\":4149626385274914225,\"qosType\":\"Manual\",\"coolAccess\":false,\"customThroughputMibps\":1608821330}") .toObject(PoolPatchProperties.class); - Assertions.assertEquals(6158704597688718378L, model.size()); + Assertions.assertEquals(4149626385274914225L, model.size()); Assertions.assertEquals(QosType.MANUAL, model.qosType()); Assertions.assertFalse(model.coolAccess()); - Assertions.assertEquals(1678889630, model.customThroughputMibps()); + Assertions.assertEquals(1608821330, model.customThroughputMibps()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PoolPatchProperties model = new PoolPatchProperties().withSize(6158704597688718378L) + PoolPatchProperties model = new PoolPatchProperties().withSize(4149626385274914225L) .withQosType(QosType.MANUAL) .withCoolAccess(false) - .withCustomThroughputMibps(1678889630); + .withCustomThroughputMibps(1608821330); model = BinaryData.fromObject(model).toObject(PoolPatchProperties.class); - Assertions.assertEquals(6158704597688718378L, model.size()); + Assertions.assertEquals(4149626385274914225L, model.size()); Assertions.assertEquals(QosType.MANUAL, model.qosType()); Assertions.assertFalse(model.coolAccess()); - Assertions.assertEquals(1678889630, model.customThroughputMibps()); + Assertions.assertEquals(1608821330, 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 f62500298d73..5ccddf66dbef 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\":\"dxeclzedqbcvh\",\"size\":3554459404592540938,\"serviceLevel\":\"Premium\",\"provisioningState\":\"odqkdlwwqfb\",\"totalThroughputMibps\":19.944017,\"utilizedThroughputMibps\":43.051697,\"customThroughputMibps\":1934168431,\"qosType\":\"Manual\",\"coolAccess\":true,\"encryptionType\":\"Double\"}") + "{\"poolId\":\"sfxsf\",\"size\":8136872721696431839,\"serviceLevel\":\"Ultra\",\"provisioningState\":\"tmvag\",\"totalThroughputMibps\":37.694584,\"utilizedThroughputMibps\":22.453255,\"customThroughputMibps\":811583054,\"qosType\":\"Auto\",\"coolAccess\":true,\"encryptionType\":\"Single\"}") .toObject(PoolProperties.class); - Assertions.assertEquals(3554459404592540938L, model.size()); - Assertions.assertEquals(ServiceLevel.PREMIUM, model.serviceLevel()); - Assertions.assertEquals(1934168431, model.customThroughputMibps()); - Assertions.assertEquals(QosType.MANUAL, model.qosType()); + Assertions.assertEquals(8136872721696431839L, model.size()); + Assertions.assertEquals(ServiceLevel.ULTRA, model.serviceLevel()); + Assertions.assertEquals(811583054, model.customThroughputMibps()); + Assertions.assertEquals(QosType.AUTO, model.qosType()); Assertions.assertTrue(model.coolAccess()); - Assertions.assertEquals(EncryptionType.DOUBLE, model.encryptionType()); + Assertions.assertEquals(EncryptionType.SINGLE, model.encryptionType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PoolProperties model = new PoolProperties().withSize(3554459404592540938L) - .withServiceLevel(ServiceLevel.PREMIUM) - .withCustomThroughputMibps(1934168431) - .withQosType(QosType.MANUAL) + PoolProperties model = new PoolProperties().withSize(8136872721696431839L) + .withServiceLevel(ServiceLevel.ULTRA) + .withCustomThroughputMibps(811583054) + .withQosType(QosType.AUTO) .withCoolAccess(true) - .withEncryptionType(EncryptionType.DOUBLE); + .withEncryptionType(EncryptionType.SINGLE); model = BinaryData.fromObject(model).toObject(PoolProperties.class); - Assertions.assertEquals(3554459404592540938L, model.size()); - Assertions.assertEquals(ServiceLevel.PREMIUM, model.serviceLevel()); - Assertions.assertEquals(1934168431, model.customThroughputMibps()); - Assertions.assertEquals(QosType.MANUAL, model.qosType()); + Assertions.assertEquals(8136872721696431839L, model.size()); + Assertions.assertEquals(ServiceLevel.ULTRA, model.serviceLevel()); + Assertions.assertEquals(811583054, model.customThroughputMibps()); + Assertions.assertEquals(QosType.AUTO, model.qosType()); Assertions.assertTrue(model.coolAccess()); - Assertions.assertEquals(EncryptionType.DOUBLE, model.encryptionType()); + 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 5cb5cd661b04..8fad4640b017 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\":\"nsq\",\"size\":9179856154635151160,\"serviceLevel\":\"StandardZRS\",\"provisioningState\":\"Succeeded\",\"totalThroughputMibps\":70.34075,\"utilizedThroughputMibps\":40.122326,\"customThroughputMibps\":301976454,\"qosType\":\"Auto\",\"coolAccess\":false,\"encryptionType\":\"Single\"},\"etag\":\"jyfdvlv\",\"location\":\"wrnfxtgdd\",\"tags\":{\"kcoeqswank\":\"hehnmnaoya\"},\"id\":\"t\",\"name\":\"tmhdroznnhdr\",\"type\":\"ktgj\"}"; + = "{\"properties\":{\"poolId\":\"hkkyowltjouw\",\"size\":6146334947352208507,\"serviceLevel\":\"Standard\",\"provisioningState\":\"Succeeded\",\"totalThroughputMibps\":24.41163,\"utilizedThroughputMibps\":95.237206,\"customThroughputMibps\":1416952757,\"qosType\":\"Manual\",\"coolAccess\":true,\"encryptionType\":\"Single\"},\"etag\":\"itbfjtdy\",\"location\":\"nplfac\",\"tags\":{\"wetjtdrhutf\":\"cqrq\",\"gssz\":\"oadtxopgehpadkmd\",\"harls\":\"vctkbbx\"},\"id\":\"rncclabv\",\"name\":\"yngsuxxcz\",\"type\":\"myqjog\"}"; 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("sinuqtljqobbpih") - .withRegion("kmdyomkxfbvfbh") - .withExistingNetAppAccount("josovyrrl", "a") - .withSize(8601531135339154686L) + .define("atuwqkokbc") + .withRegion("khgvoogxkfnao") + .withExistingNetAppAccount("tvsnvl", "qdnzyza") + .withSize(3190234716778410225L) .withServiceLevel(ServiceLevel.PREMIUM) - .withTags(mapOf("gddeimaw", "rhpw")) - .withCustomThroughputMibps(2083123836) - .withQosType(QosType.MANUAL) + .withTags(mapOf("nskby", "mhcctopuowy", "jpxecxqnwhsco", "quhczygxvh", "pknpwirfljfewxq", "awmvgxs")) + .withCustomThroughputMibps(1519260317) + .withQosType(QosType.AUTO) .withCoolAccess(false) - .withEncryptionType(EncryptionType.SINGLE) + .withEncryptionType(EncryptionType.DOUBLE) .create(); - Assertions.assertEquals("wrnfxtgdd", response.location()); - Assertions.assertEquals("hehnmnaoya", response.tags().get("kcoeqswank")); - Assertions.assertEquals(9179856154635151160L, response.size()); - Assertions.assertEquals(ServiceLevel.STANDARD_ZRS, response.serviceLevel()); - Assertions.assertEquals(301976454, response.customThroughputMibps()); - Assertions.assertEquals(QosType.AUTO, response.qosType()); - Assertions.assertFalse(response.coolAccess()); + Assertions.assertEquals("nplfac", response.location()); + Assertions.assertEquals("cqrq", response.tags().get("wetjtdrhutf")); + Assertions.assertEquals(6146334947352208507L, response.size()); + Assertions.assertEquals(ServiceLevel.STANDARD, response.serviceLevel()); + Assertions.assertEquals(1416952757, response.customThroughputMibps()); + Assertions.assertEquals(QosType.MANUAL, response.qosType()); + Assertions.assertTrue(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 8edf08a5c761..8df8b27e8210 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\":\"hmoz\",\"size\":4571783407707453265,\"serviceLevel\":\"Standard\",\"provisioningState\":\"ln\",\"totalThroughputMibps\":9.580618,\"utilizedThroughputMibps\":96.16699,\"customThroughputMibps\":1586632226,\"qosType\":\"Manual\",\"coolAccess\":true,\"encryptionType\":\"Double\"},\"etag\":\"wamxqzrag\",\"location\":\"dphtv\",\"tags\":{\"vl\":\"a\"},\"id\":\"jchcsrlzknmzla\",\"name\":\"rupdwvnphcnzq\",\"type\":\"pjhmqrhvthl\"}"; + = "{\"properties\":{\"poolId\":\"yytfvpct\",\"size\":6192810519203521270,\"serviceLevel\":\"StandardZRS\",\"provisioningState\":\"ff\",\"totalThroughputMibps\":79.60702,\"utilizedThroughputMibps\":72.03645,\"customThroughputMibps\":1341232178,\"qosType\":\"Auto\",\"coolAccess\":false,\"encryptionType\":\"Double\"},\"etag\":\"kke\",\"location\":\"kj\",\"tags\":{\"zmxjqif\":\"wg\",\"cmlzaahz\":\"ujjs\",\"oolkolirhhm\":\"hu\"},\"id\":\"jusuzgfjzc\",\"name\":\"aaxoialahfxwcc\",\"type\":\"kdxkuk\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,17 +33,16 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - CapacityPool response = manager.pools() - .getWithResponse("okcdxfzzzwyjaf", "tlhguynuchl", "mltx", com.azure.core.util.Context.NONE) - .getValue(); + CapacityPool response + = manager.pools().getWithResponse("ujktzb", "imyfpqdo", "kpp", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals("dphtv", response.location()); - Assertions.assertEquals("a", response.tags().get("vl")); - Assertions.assertEquals(4571783407707453265L, response.size()); - Assertions.assertEquals(ServiceLevel.STANDARD, response.serviceLevel()); - Assertions.assertEquals(1586632226, response.customThroughputMibps()); - Assertions.assertEquals(QosType.MANUAL, response.qosType()); - Assertions.assertTrue(response.coolAccess()); + Assertions.assertEquals("kj", response.location()); + Assertions.assertEquals("wg", response.tags().get("zmxjqif")); + Assertions.assertEquals(6192810519203521270L, response.size()); + Assertions.assertEquals(ServiceLevel.STANDARD_ZRS, response.serviceLevel()); + Assertions.assertEquals(1341232178, response.customThroughputMibps()); + Assertions.assertEquals(QosType.AUTO, response.qosType()); + Assertions.assertFalse(response.coolAccess()); Assertions.assertEquals(EncryptionType.DOUBLE, response.encryptionType()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsListMockTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/PoolsListMockTests.java index 96c91793b73c..38b974eab454 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\":\"npxybafiq\",\"size\":8630165926695508112,\"serviceLevel\":\"Flexible\",\"provisioningState\":\"bgj\",\"totalThroughputMibps\":26.121838,\"utilizedThroughputMibps\":66.93982,\"customThroughputMibps\":768847582,\"qosType\":\"Auto\",\"coolAccess\":true,\"encryptionType\":\"Single\"},\"etag\":\"wvmzegjonfhjir\",\"location\":\"dnqzbrfkspzhzmt\",\"tags\":{\"igsxcdgljplk\":\"cit\",\"htomflrytswfp\":\"ua\",\"skw\":\"mdgycxn\",\"shhkvpedw\":\"qjjyslurl\"},\"id\":\"slsrhmpq\",\"name\":\"wwsko\",\"type\":\"dcbrwimuvq\"}]}"; + = "{\"value\":[{\"properties\":{\"poolId\":\"k\",\"size\":6606387189353667472,\"serviceLevel\":\"Ultra\",\"provisioningState\":\"lnthbbnkgzukwdrn\",\"totalThroughputMibps\":60.380737,\"utilizedThroughputMibps\":59.94145,\"customThroughputMibps\":1591848139,\"qosType\":\"Auto\",\"coolAccess\":true,\"encryptionType\":\"Double\"},\"etag\":\"lfuyfjbpfiddhlr\",\"location\":\"zcqy\",\"tags\":{\"k\":\"rfuiocusel\",\"sjmrkkhm\":\"sazrhxuddqmdtff\",\"jawh\":\"dmdlgyqixokw\"},\"id\":\"ag\",\"name\":\"qfqqdlcvmyolc\",\"type\":\"ymjc\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,15 +35,15 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.pools().list("iwdcxsmlzzhzd", "xetlgydlhqv", com.azure.core.util.Context.NONE); + = manager.pools().list("kczynuhhoqeqsh", "vl", com.azure.core.util.Context.NONE); - Assertions.assertEquals("dnqzbrfkspzhzmt", response.iterator().next().location()); - Assertions.assertEquals("cit", response.iterator().next().tags().get("igsxcdgljplk")); - Assertions.assertEquals(8630165926695508112L, response.iterator().next().size()); - Assertions.assertEquals(ServiceLevel.FLEXIBLE, response.iterator().next().serviceLevel()); - Assertions.assertEquals(768847582, response.iterator().next().customThroughputMibps()); + Assertions.assertEquals("zcqy", response.iterator().next().location()); + Assertions.assertEquals("rfuiocusel", response.iterator().next().tags().get("k")); + Assertions.assertEquals(6606387189353667472L, response.iterator().next().size()); + Assertions.assertEquals(ServiceLevel.ULTRA, response.iterator().next().serviceLevel()); + Assertions.assertEquals(1591848139, 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()); + Assertions.assertEquals(EncryptionType.DOUBLE, response.iterator().next().encryptionType()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QueryNetworkSiblingSetRequestTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QueryNetworkSiblingSetRequestTests.java index 8184750014a8..b9d8728fde63 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\":\"hezwwvaiq\",\"subnetId\":\"uvvfonkp\"}") + = BinaryData.fromString("{\"networkSiblingSetId\":\"czzydmxzjij\",\"subnetId\":\"vuaurk\"}") .toObject(QueryNetworkSiblingSetRequest.class); - Assertions.assertEquals("hezwwvaiq", model.networkSiblingSetId()); - Assertions.assertEquals("uvvfonkp", model.subnetId()); + Assertions.assertEquals("czzydmxzjij", model.networkSiblingSetId()); + Assertions.assertEquals("vuaurk", model.subnetId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { QueryNetworkSiblingSetRequest model - = new QueryNetworkSiblingSetRequest().withNetworkSiblingSetId("hezwwvaiq").withSubnetId("uvvfonkp"); + = new QueryNetworkSiblingSetRequest().withNetworkSiblingSetId("czzydmxzjij").withSubnetId("vuaurk"); model = BinaryData.fromObject(model).toObject(QueryNetworkSiblingSetRequest.class); - Assertions.assertEquals("hezwwvaiq", model.networkSiblingSetId()); - Assertions.assertEquals("uvvfonkp", model.subnetId()); + Assertions.assertEquals("czzydmxzjij", model.networkSiblingSetId()); + Assertions.assertEquals("vuaurk", 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 c326e4034561..cfa0dbdb0a5a 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 @@ -13,25 +13,25 @@ public final class QuotaAvailabilityRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { QuotaAvailabilityRequest model = BinaryData.fromString( - "{\"name\":\"dwdigumb\",\"type\":\"Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots\",\"resourceGroup\":\"aauzzptjazysd\"}") + "{\"name\":\"xuifmcsypobkdqz\",\"type\":\"Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots\",\"resourceGroup\":\"zsylollgt\"}") .toObject(QuotaAvailabilityRequest.class); - Assertions.assertEquals("dwdigumb", model.name()); + Assertions.assertEquals("xuifmcsypobkdqz", model.name()); Assertions.assertEquals( CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS, model.type()); - Assertions.assertEquals("aauzzptjazysd", model.resourceGroup()); + Assertions.assertEquals("zsylollgt", model.resourceGroup()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - QuotaAvailabilityRequest model = new QuotaAvailabilityRequest().withName("dwdigumb") + QuotaAvailabilityRequest model = new QuotaAvailabilityRequest().withName("xuifmcsypobkdqz") .withType(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS) - .withResourceGroup("aauzzptjazysd"); + .withResourceGroup("zsylollgt"); model = BinaryData.fromObject(model).toObject(QuotaAvailabilityRequest.class); - Assertions.assertEquals("dwdigumb", model.name()); + Assertions.assertEquals("xuifmcsypobkdqz", model.name()); Assertions.assertEquals( CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS, model.type()); - Assertions.assertEquals("aauzzptjazysd", model.resourceGroup()); + Assertions.assertEquals("zsylollgt", model.resourceGroup()); } } 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 new file mode 100644 index 000000000000..66887356a347 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/QuotaReportTests.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.QuotaReport; +import com.azure.resourcemanager.netapp.models.Type; +import org.junit.jupiter.api.Assertions; + +public final class QuotaReportTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + QuotaReport model = BinaryData.fromString( + "{\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"btbhjpglkfgohd\",\"quotaLimitUsedInKiBs\":3210432700680479776,\"quotaLimitTotalInKiBs\":8814902038888583315,\"percentageUsed\":91.37615,\"isDerivedQuota\":true}") + .toObject(QuotaReport.class); + Assertions.assertEquals(Type.DEFAULT_GROUP_QUOTA, model.quotaType()); + Assertions.assertEquals("btbhjpglkfgohd", model.quotaTarget()); + Assertions.assertEquals(3210432700680479776L, model.quotaLimitUsedInKiBs()); + Assertions.assertEquals(8814902038888583315L, model.quotaLimitTotalInKiBs()); + Assertions.assertEquals(91.37615F, model.percentageUsed()); + Assertions.assertTrue(model.isDerivedQuota()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareProtectionPatchSettingsTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareProtectionPatchSettingsTests.java new file mode 100644 index 000000000000..3388ef283e78 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareProtectionPatchSettingsTests.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.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.DesiredRansomwareProtectionState; +import com.azure.resourcemanager.netapp.models.RansomwareProtectionPatchSettings; +import org.junit.jupiter.api.Assertions; + +public final class RansomwareProtectionPatchSettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RansomwareProtectionPatchSettings model + = BinaryData.fromString("{\"desiredRansomwareProtectionState\":\"Enabled\"}") + .toObject(RansomwareProtectionPatchSettings.class); + Assertions.assertEquals(DesiredRansomwareProtectionState.ENABLED, model.desiredRansomwareProtectionState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RansomwareProtectionPatchSettings model = new RansomwareProtectionPatchSettings() + .withDesiredRansomwareProtectionState(DesiredRansomwareProtectionState.ENABLED); + model = BinaryData.fromObject(model).toObject(RansomwareProtectionPatchSettings.class); + Assertions.assertEquals(DesiredRansomwareProtectionState.ENABLED, model.desiredRansomwareProtectionState()); + } +} diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareProtectionSettingsTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareProtectionSettingsTests.java new file mode 100644 index 000000000000..1507a41835d1 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareProtectionSettingsTests.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.DesiredRansomwareProtectionState; +import com.azure.resourcemanager.netapp.models.RansomwareProtectionSettings; +import org.junit.jupiter.api.Assertions; + +public final class RansomwareProtectionSettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RansomwareProtectionSettings model = BinaryData + .fromString( + "{\"desiredRansomwareProtectionState\":\"Enabled\",\"actualRansomwareProtectionState\":\"Disabled\"}") + .toObject(RansomwareProtectionSettings.class); + Assertions.assertEquals(DesiredRansomwareProtectionState.ENABLED, model.desiredRansomwareProtectionState()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RansomwareProtectionSettings model = new RansomwareProtectionSettings() + .withDesiredRansomwareProtectionState(DesiredRansomwareProtectionState.ENABLED); + model = BinaryData.fromObject(model).toObject(RansomwareProtectionSettings.class); + Assertions.assertEquals(DesiredRansomwareProtectionState.ENABLED, model.desiredRansomwareProtectionState()); + } +} 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 new file mode 100644 index 000000000000..39ed291bd5ab --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportInnerTests.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.RansomwareReportInner; + +public final class RansomwareReportInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RansomwareReportInner model = BinaryData.fromString( + "{\"properties\":{\"eventTime\":\"2020-12-25T23:20:44Z\",\"state\":\"Active\",\"severity\":\"None\",\"clearedCount\":562718876,\"reportedCount\":1709728841,\"suspects\":[{\"extension\":\"phoszqz\",\"resolution\":\"FalsePositive\",\"fileCount\":2041043826,\"suspectFiles\":[{\"suspectFileName\":\"dkfw\",\"fileTimestamp\":\"2021-08-12T04:12:29Z\"}]},{\"extension\":\"vtbvkayh\",\"resolution\":\"PotentialThreat\",\"fileCount\":84977587,\"suspectFiles\":[{\"suspectFileName\":\"tkzwpcnpwzc\",\"fileTimestamp\":\"2021-05-22T23:16:36Z\"},{\"suspectFileName\":\"gvvs\",\"fileTimestamp\":\"2021-10-01T18:08:28Z\"},{\"suspectFileName\":\"jguq\",\"fileTimestamp\":\"2021-04-26T06:49:27Z\"}]}],\"provisioningState\":\"gzlvdnkfxu\"},\"id\":\"mdwzrmuhapfcqdps\",\"name\":\"xqv\",\"type\":\"svuo\"}") + .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 new file mode 100644 index 000000000000..133a800f7de0 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportPropertiesTests.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.RansomwareReportProperties; + +public final class RansomwareReportPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RansomwareReportProperties model = BinaryData.fromString( + "{\"eventTime\":\"2021-01-10T12:18:54Z\",\"state\":\"Active\",\"severity\":\"None\",\"clearedCount\":1724622267,\"reportedCount\":62275538,\"suspects\":[{\"extension\":\"lmfeokerq\",\"resolution\":\"PotentialThreat\",\"fileCount\":137094818,\"suspectFiles\":[{\"suspectFileName\":\"pg\",\"fileTimestamp\":\"2021-07-31T15:17:12Z\"},{\"suspectFileName\":\"owepbqpcrfkb\",\"fileTimestamp\":\"2021-10-14T17:11:50Z\"},{\"suspectFileName\":\"jvcdwxlpqekf\",\"fileTimestamp\":\"2021-08-06T20:29:45Z\"},{\"suspectFileName\":\"tjsyin\",\"fileTimestamp\":\"2021-09-11T08:24:22Z\"}]},{\"extension\":\"atmtdhtmdvy\",\"resolution\":\"FalsePositive\",\"fileCount\":1851759881,\"suspectFiles\":[{\"suspectFileName\":\"ywkbirryuzhlhkjo\",\"fileTimestamp\":\"2021-06-25T16:08:27Z\"},{\"suspectFileName\":\"qaatjinrv\",\"fileTimestamp\":\"2021-07-06T00:36:52Z\"},{\"suspectFileName\":\"mfiibfggj\",\"fileTimestamp\":\"2021-04-08T04:20:38Z\"}]}],\"provisioningState\":\"vrwxkv\"}") + .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 new file mode 100644 index 000000000000..4b40bbb33ad1 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsGetWithResponseMockTests.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.RansomwareReport; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class RansomwareReportsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"eventTime\":\"2021-09-27T22:08:27Z\",\"state\":\"Active\",\"severity\":\"Low\",\"clearedCount\":1684475673,\"reportedCount\":1140842141,\"suspects\":[{\"extension\":\"tlgflwfgz\",\"resolution\":\"PotentialThreat\",\"fileCount\":1455150949,\"suspectFiles\":[{},{},{},{}]},{\"extension\":\"eatlijjjrtvamcas\",\"resolution\":\"FalsePositive\",\"fileCount\":1639548790,\"suspectFiles\":[{},{},{}]}],\"provisioningState\":\"xetyvku\"},\"id\":\"ignohi\",\"name\":\"kgqogjw\",\"type\":\"indedvabbx\"}"; + + 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)); + + RansomwareReport response = manager.ransomwareReports() + .getWithResponse("wdfmmpzhzzwvywr", "yngydgrpxncaki", "aondjrkclamgg", "vlmfej", "oqeykglt", + 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 new file mode 100644 index 000000000000..4f5158773803 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListMockTests.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.RansomwareReport; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class RansomwareReportsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"eventTime\":\"2021-08-20T16:05:59Z\",\"state\":\"Active\",\"severity\":\"High\",\"clearedCount\":842328747,\"reportedCount\":766137540,\"suspects\":[{\"extension\":\"a\",\"resolution\":\"FalsePositive\",\"fileCount\":1448262455,\"suspectFiles\":[{},{},{},{}]},{\"extension\":\"mfczl\",\"resolution\":\"PotentialThreat\",\"fileCount\":1837335612,\"suspectFiles\":[{}]},{\"extension\":\"zgowox\",\"resolution\":\"PotentialThreat\",\"fileCount\":642254793,\"suspectFiles\":[{}]},{\"extension\":\"nyq\",\"resolution\":\"FalsePositive\",\"fileCount\":1232055835,\"suspectFiles\":[{},{},{},{}]}],\"provisioningState\":\"xisimjceagbj\"},\"id\":\"lsumywzashx\",\"name\":\"onoyjf\",\"type\":\"ipubyznclkfk\"}]}"; + + 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.ransomwareReports() + .list("hmedeilbjywfcfxz", "rzzihvwypus", "vjslczwcii", "jsllfryvd", 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 new file mode 100644 index 000000000000..eee8a0b1cce4 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareReportsListTests.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.RansomwareReportsList; +import org.junit.jupiter.api.Assertions; + +public final class RansomwareReportsListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RansomwareReportsList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"eventTime\":\"2021-02-05T15:31:44Z\",\"state\":\"Active\",\"severity\":\"High\",\"clearedCount\":283160638,\"reportedCount\":384819468,\"suspects\":[{\"extension\":\"ejvegrhbpnaixex\",\"resolution\":\"PotentialThreat\",\"fileCount\":314697275,\"suspectFiles\":[{}]},{\"extension\":\"hcexdrrvqa\",\"resolution\":\"FalsePositive\",\"fileCount\":1584778168,\"suspectFiles\":[{},{}]},{\"extension\":\"ijnhyjsvfycxzbf\",\"resolution\":\"FalsePositive\",\"fileCount\":1432039149,\"suspectFiles\":[{},{},{}]}],\"provisioningState\":\"t\"},\"id\":\"qp\",\"name\":\"y\",\"type\":\"s\"},{\"properties\":{\"eventTime\":\"2021-10-14T19:48:58Z\",\"state\":\"Resolved\",\"severity\":\"Moderate\",\"clearedCount\":1320458581,\"reportedCount\":779429709,\"suspects\":[{\"extension\":\"kmcwaekrrjreafx\",\"resolution\":\"FalsePositive\",\"fileCount\":1712554601,\"suspectFiles\":[{},{},{},{}]}],\"provisioningState\":\"lik\"},\"id\":\"wslolbqp\",\"name\":\"uzlm\",\"type\":\"felfktg\"},{\"properties\":{\"eventTime\":\"2021-01-08T03:48:52Z\",\"state\":\"Resolved\",\"severity\":\"Low\",\"clearedCount\":2026276313,\"reportedCount\":282428927,\"suspects\":[{\"extension\":\"rnjwmw\",\"resolution\":\"FalsePositive\",\"fileCount\":650056423,\"suspectFiles\":[{},{}]}],\"provisioningState\":\"jjoqkagf\"},\"id\":\"xttaugzxnfaaz\",\"name\":\"xdtnkdmkqjjlw\",\"type\":\"envrkpyouaibrebq\"},{\"properties\":{\"eventTime\":\"2021-10-23T15:53:30Z\",\"state\":\"Resolved\",\"severity\":\"Low\",\"clearedCount\":1662544736,\"reportedCount\":2018222858,\"suspects\":[{\"extension\":\"zlwfffiakp\",\"resolution\":\"FalsePositive\",\"fileCount\":39078864,\"suspectFiles\":[{},{},{},{}]},{\"extension\":\"ltmm\",\"resolution\":\"FalsePositive\",\"fileCount\":1482322760,\"suspectFiles\":[{}]}],\"provisioningState\":\"hvwauyqncy\"},\"id\":\"p\",\"name\":\"vipmdscwxqupevzh\",\"type\":\"stotxh\"}],\"nextLink\":\"ujbypelmcuvhixb\"}") + .toObject(RansomwareReportsList.class); + Assertions.assertEquals("ujbypelmcuvhixb", 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 new file mode 100644 index 000000000000..0fb40c7a717e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareSuspectsClearRequestTests.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.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.RansomwareSuspectResolution; +import com.azure.resourcemanager.netapp.models.RansomwareSuspectsClearRequest; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class RansomwareSuspectsClearRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RansomwareSuspectsClearRequest model + = BinaryData.fromString("{\"resolution\":\"FalsePositive\",\"extensions\":[\"fw\",\"yl\"]}") + .toObject(RansomwareSuspectsClearRequest.class); + Assertions.assertEquals(RansomwareSuspectResolution.FALSE_POSITIVE, model.resolution()); + Assertions.assertEquals("fw", 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("fw", "yl")); + model = BinaryData.fromObject(model).toObject(RansomwareSuspectsClearRequest.class); + Assertions.assertEquals(RansomwareSuspectResolution.FALSE_POSITIVE, model.resolution()); + Assertions.assertEquals("fw", 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 new file mode 100644 index 000000000000..c43fcf72cc7e --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RansomwareSuspectsTests.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.RansomwareSuspects; + +public final class RansomwareSuspectsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RansomwareSuspects model = BinaryData.fromString( + "{\"extension\":\"k\",\"resolution\":\"FalsePositive\",\"fileCount\":1852467405,\"suspectFiles\":[{\"suspectFileName\":\"vjayvblmhvkzu\",\"fileTimestamp\":\"2021-11-23T11:34:55Z\"},{\"suspectFileName\":\"vyhgs\",\"fileTimestamp\":\"2021-06-13T17:46:53Z\"},{\"suspectFileName\":\"rqufegxuvwz\",\"fileTimestamp\":\"2021-04-02T15:27:05Z\"}]}") + .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 7bc67d15bcc8..7518852c2219 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 @@ -11,15 +11,15 @@ public final class ReestablishReplicationRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ReestablishReplicationRequest model = BinaryData.fromString("{\"sourceVolumeId\":\"tjrybnwjewgdr\"}") - .toObject(ReestablishReplicationRequest.class); - Assertions.assertEquals("tjrybnwjewgdr", model.sourceVolumeId()); + ReestablishReplicationRequest model + = BinaryData.fromString("{\"sourceVolumeId\":\"ao\"}").toObject(ReestablishReplicationRequest.class); + Assertions.assertEquals("ao", model.sourceVolumeId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ReestablishReplicationRequest model = new ReestablishReplicationRequest().withSourceVolumeId("tjrybnwjewgdr"); + ReestablishReplicationRequest model = new ReestablishReplicationRequest().withSourceVolumeId("ao"); model = BinaryData.fromObject(model).toObject(ReestablishReplicationRequest.class); - Assertions.assertEquals("tjrybnwjewgdr", model.sourceVolumeId()); + Assertions.assertEquals("ao", 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 370f26030636..cdfd3312703c 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\":\"ddhcratizzr\",\"isAvailable\":false}") + = BinaryData.fromString("{\"availabilityZone\":\"oxaxm\",\"isAvailable\":false}") .toObject(RegionInfoAvailabilityZoneMappingsItem.class); - Assertions.assertEquals("ddhcratizzr", model.availabilityZone()); + Assertions.assertEquals("oxaxm", model.availabilityZone()); Assertions.assertFalse(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 aa85de3d3ce0..0c2d1cda1caf 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,10 +13,10 @@ public final class RegionInfoInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RegionInfoInner model = BinaryData.fromString( - "{\"storageToNetworkProximity\":\"T1AndT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"qfi\",\"isAvailable\":false},{\"availabilityZone\":\"knpirgnepttwq\",\"isAvailable\":true},{\"availabilityZone\":\"ffcdmqnrojl\",\"isAvailable\":false},{\"availabilityZone\":\"k\",\"isAvailable\":true}]}") + "{\"storageToNetworkProximity\":\"Default\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"wahzjmucftbyr\",\"isAvailable\":true},{\"availabilityZone\":\"hkpigqfusuckzmkw\",\"isAvailable\":true}]}") .toObject(RegionInfoInner.class); - Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2, model.storageToNetworkProximity()); - Assertions.assertEquals("qfi", model.availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertFalse(model.availabilityZoneMappings().get(0).isAvailable()); + Assertions.assertEquals(RegionStorageToNetworkProximity.DEFAULT, model.storageToNetworkProximity()); + Assertions.assertEquals("wahzjmucftbyr", 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 640c1037ce8e..5e5d23c55dbf 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\":\"ton\",\"isAvailable\":false}]},\"id\":\"uu\",\"name\":\"fdlwg\",\"type\":\"ytsbwtovv\"}") + "{\"properties\":{\"storageToNetworkProximity\":\"T1\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"ntsj\",\"isAvailable\":true},{\"availabilityZone\":\"xypruuuy\",\"isAvailable\":false},{\"availabilityZone\":\"r\",\"isAvailable\":true}]},\"id\":\"oyuelyetn\",\"name\":\"nb\",\"type\":\"qyggagfl\"}") .toObject(RegionInfoResourceInner.class); - Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2, model.storageToNetworkProximity()); - Assertions.assertEquals("ton", model.availabilityZoneMappings().get(0).availabilityZone()); - Assertions.assertFalse(model.availabilityZoneMappings().get(0).isAvailable()); + Assertions.assertEquals(RegionStorageToNetworkProximity.T1, model.storageToNetworkProximity()); + Assertions.assertEquals("ntsj", 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/RegionInfosListTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RegionInfosListTests.java index d689292d7858..7c67c9064e07 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\":\"Default\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"qyzhf\",\"isAvailable\":false},{\"availabilityZone\":\"gogczhonnxkrlgny\",\"isAvailable\":false}]},\"id\":\"sxkkg\",\"name\":\"h\",\"type\":\"rghxjb\"},{\"properties\":{\"storageToNetworkProximity\":\"T1AndT2AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"gf\",\"isAvailable\":true}]},\"id\":\"ofbshr\",\"name\":\"svbuswdvzyy\",\"type\":\"ycnunvjsrtk\"}],\"nextLink\":\"wnopqgikyzirtx\"}") + "{\"value\":[{\"properties\":{\"storageToNetworkProximity\":\"T1AndT2AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"gwydyy\",\"isAvailable\":false}]},\"id\":\"khgb\",\"name\":\"qtanarfdlpuk\",\"type\":\"py\"},{\"properties\":{\"storageToNetworkProximity\":\"AcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"pe\",\"isAvailable\":true},{\"availabilityZone\":\"nmg\",\"isAvailable\":true},{\"availabilityZone\":\"xddbhfhpfpaz\",\"isAvailable\":true}]},\"id\":\"wjxhpdulon\",\"name\":\"acn\",\"type\":\"qwtehtuevr\"},{\"properties\":{\"storageToNetworkProximity\":\"AcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"gwxhnsduugwbsreu\",\"isAvailable\":false},{\"availabilityZone\":\"fuarenlvhht\",\"isAvailable\":false},{\"availabilityZone\":\"nafvvkyfedev\",\"isAvailable\":false},{\"availabilityZone\":\"lcqxypokk\",\"isAvailable\":true}]},\"id\":\"q\",\"name\":\"ymc\",\"type\":\"ngnbdxxew\"},{\"properties\":{\"storageToNetworkProximity\":\"T1AndT2AndAcrossT2\",\"availabilityZoneMappings\":[{\"availabilityZone\":\"bchaqd\",\"isAvailable\":true},{\"availabilityZone\":\"crqctmxxdtddmflh\",\"isAvailable\":false},{\"availabilityZone\":\"zv\",\"isAvailable\":true}]},\"id\":\"pxbannovvoxc\",\"name\":\"ytprwnwvroev\",\"type\":\"tlyo\"}],\"nextLink\":\"rrouuxvnsasbcry\"}") .toObject(RegionInfosList.class); - Assertions.assertEquals(RegionStorageToNetworkProximity.DEFAULT, + Assertions.assertEquals(RegionStorageToNetworkProximity.T1AND_T2AND_ACROSS_T2, model.value().get(0).storageToNetworkProximity()); - Assertions.assertEquals("qyzhf", model.value().get(0).availabilityZoneMappings().get(0).availabilityZone()); + Assertions.assertEquals("gwydyy", model.value().get(0).availabilityZoneMappings().get(0).availabilityZone()); Assertions.assertFalse(model.value().get(0).availabilityZoneMappings().get(0).isAvailable()); - Assertions.assertEquals("wnopqgikyzirtx", model.nextLink()); + Assertions.assertEquals("rrouuxvnsasbcry", model.nextLink()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RemotePathTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RemotePathTests.java index 4842b06c1451..475d6e63e6dc 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RemotePathTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/RemotePathTests.java @@ -11,23 +11,20 @@ public final class RemotePathTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - RemotePath model = BinaryData - .fromString( - "{\"externalHostName\":\"cispnqzahmgkbr\",\"serverName\":\"yydhibnuqqk\",\"volumeName\":\"ik\"}") - .toObject(RemotePath.class); - Assertions.assertEquals("cispnqzahmgkbr", model.externalHostname()); - Assertions.assertEquals("yydhibnuqqk", model.serverName()); - Assertions.assertEquals("ik", model.volumeName()); + RemotePath model + = BinaryData.fromString("{\"externalHostName\":\"krbm\",\"serverName\":\"ukgri\",\"volumeName\":\"flz\"}") + .toObject(RemotePath.class); + Assertions.assertEquals("krbm", model.externalHostname()); + Assertions.assertEquals("ukgri", model.serverName()); + Assertions.assertEquals("flz", model.volumeName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RemotePath model = new RemotePath().withExternalHostname("cispnqzahmgkbr") - .withServerName("yydhibnuqqk") - .withVolumeName("ik"); + RemotePath model = new RemotePath().withExternalHostname("krbm").withServerName("ukgri").withVolumeName("flz"); model = BinaryData.fromObject(model).toObject(RemotePath.class); - Assertions.assertEquals("cispnqzahmgkbr", model.externalHostname()); - Assertions.assertEquals("yydhibnuqqk", model.serverName()); - Assertions.assertEquals("ik", model.volumeName()); + Assertions.assertEquals("krbm", model.externalHostname()); + Assertions.assertEquals("ukgri", model.serverName()); + Assertions.assertEquals("flz", model.volumeName()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationInnerTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationInnerTests.java index 3edc6bf7c4b1..63df1a9f8ee9 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\":\"dnbbglzps\",\"endpointType\":\"dst\",\"replicationSchedule\":\"_10minutely\",\"remoteVolumeResourceId\":\"cwyhzdxssa\",\"remoteVolumeRegion\":\"zmnvdfznudaod\",\"mirrorState\":\"Uninitialized\",\"replicationCreationTime\":\"2021-01-24T14:26:11Z\",\"replicationDeletionTime\":\"2021-10-12T01:30:58Z\"}") + "{\"replicationId\":\"tshhszhedp\",\"endpointType\":\"src\",\"replicationSchedule\":\"daily\",\"remoteVolumeResourceId\":\"ubmwmbesld\",\"remoteVolumeRegion\":\"wwtppj\",\"mirrorState\":\"Uninitialized\",\"replicationCreationTime\":\"2021-04-04T02:55:07Z\",\"replicationDeletionTime\":\"2021-06-10T22:36:54Z\"}") .toObject(ReplicationInner.class); - Assertions.assertEquals(EndpointType.DST, model.endpointType()); - Assertions.assertEquals(ReplicationSchedule.ONE_ZEROMINUTELY, model.replicationSchedule()); - Assertions.assertEquals("cwyhzdxssa", model.remoteVolumeResourceId()); - Assertions.assertEquals("zmnvdfznudaod", model.remoteVolumeRegion()); + Assertions.assertEquals(EndpointType.SRC, model.endpointType()); + Assertions.assertEquals(ReplicationSchedule.DAILY, model.replicationSchedule()); + Assertions.assertEquals("ubmwmbesld", model.remoteVolumeResourceId()); + Assertions.assertEquals("wwtppj", model.remoteVolumeRegion()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationObjectTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationObjectTests.java index 7a40e31b5163..b8f48b6fc9b8 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationObjectTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ReplicationObjectTests.java @@ -14,30 +14,30 @@ public final class ReplicationObjectTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ReplicationObject model = BinaryData.fromString( - "{\"replicationId\":\"jektcxsenh\",\"endpointType\":\"dst\",\"replicationSchedule\":\"daily\",\"remoteVolumeResourceId\":\"rzpwvlqdqgbiq\",\"remotePath\":{\"externalHostName\":\"ihkaetcktvfc\",\"serverName\":\"vf\",\"volumeName\":\"nkymuctqhjfbebrj\"},\"remoteVolumeRegion\":\"erfuwuttt\",\"destinationReplications\":[{\"resourceId\":\"rbirphxe\",\"replicationType\":\"CrossRegionReplication\",\"region\":\"ahfn\",\"zone\":\"kyqxjvuujqgidokg\"},{\"resourceId\":\"jyoxgvclt\",\"replicationType\":\"CrossZoneReplication\",\"region\":\"c\",\"zone\":\"kjeszz\"},{\"resourceId\":\"ijhtxf\",\"replicationType\":\"CrossRegionReplication\",\"region\":\"fsm\",\"zone\":\"eh\"},{\"resourceId\":\"vecxgodebfqkk\",\"replicationType\":\"CrossRegionReplication\",\"region\":\"ukgri\",\"zone\":\"lzlfbxzpuz\"}]}") + "{\"replicationId\":\"rzpwvlqdqgbiq\",\"endpointType\":\"dst\",\"replicationSchedule\":\"daily\",\"remoteVolumeResourceId\":\"etcktvfcivfsnk\",\"remotePath\":{\"externalHostName\":\"uctqhjfbe\",\"serverName\":\"rjcxerfuwu\",\"volumeName\":\"ttxfvjr\"},\"remoteVolumeRegion\":\"rp\",\"destinationReplications\":[{\"resourceId\":\"c\",\"replicationType\":\"CrossRegionReplication\",\"region\":\"fnljky\",\"zone\":\"j\"},{\"resourceId\":\"ujqgidok\",\"replicationType\":\"CrossZoneReplication\",\"region\":\"yoxgvcltbgsnc\",\"zone\":\"kjeszz\"},{\"resourceId\":\"ijhtxf\",\"replicationType\":\"CrossRegionReplication\",\"region\":\"fsm\",\"zone\":\"eh\"}],\"externalReplicationSetupStatus\":\"ClusterPeerRequired\",\"externalReplicationSetupInfo\":\"cxgod\",\"mirrorState\":\"Uninitialized\",\"relationshipStatus\":\"Idle\"}") .toObject(ReplicationObject.class); Assertions.assertEquals(ReplicationSchedule.DAILY, model.replicationSchedule()); - Assertions.assertEquals("rzpwvlqdqgbiq", model.remoteVolumeResourceId()); - Assertions.assertEquals("ihkaetcktvfc", model.remotePath().externalHostname()); - Assertions.assertEquals("vf", model.remotePath().serverName()); - Assertions.assertEquals("nkymuctqhjfbebrj", model.remotePath().volumeName()); - Assertions.assertEquals("erfuwuttt", model.remoteVolumeRegion()); + Assertions.assertEquals("etcktvfcivfsnk", model.remoteVolumeResourceId()); + Assertions.assertEquals("uctqhjfbe", model.remotePath().externalHostname()); + Assertions.assertEquals("rjcxerfuwu", model.remotePath().serverName()); + Assertions.assertEquals("ttxfvjr", model.remotePath().volumeName()); + Assertions.assertEquals("rp", model.remoteVolumeRegion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ReplicationObject model = new ReplicationObject().withReplicationSchedule(ReplicationSchedule.DAILY) - .withRemoteVolumeResourceId("rzpwvlqdqgbiq") - .withRemotePath(new RemotePath().withExternalHostname("ihkaetcktvfc") - .withServerName("vf") - .withVolumeName("nkymuctqhjfbebrj")) - .withRemoteVolumeRegion("erfuwuttt"); + .withRemoteVolumeResourceId("etcktvfcivfsnk") + .withRemotePath(new RemotePath().withExternalHostname("uctqhjfbe") + .withServerName("rjcxerfuwu") + .withVolumeName("ttxfvjr")) + .withRemoteVolumeRegion("rp"); model = BinaryData.fromObject(model).toObject(ReplicationObject.class); Assertions.assertEquals(ReplicationSchedule.DAILY, model.replicationSchedule()); - Assertions.assertEquals("rzpwvlqdqgbiq", model.remoteVolumeResourceId()); - Assertions.assertEquals("ihkaetcktvfc", model.remotePath().externalHostname()); - Assertions.assertEquals("vf", model.remotePath().serverName()); - Assertions.assertEquals("nkymuctqhjfbebrj", model.remotePath().volumeName()); - Assertions.assertEquals("erfuwuttt", model.remoteVolumeRegion()); + Assertions.assertEquals("etcktvfcivfsnk", model.remoteVolumeResourceId()); + Assertions.assertEquals("uctqhjfbe", model.remotePath().externalHostname()); + Assertions.assertEquals("rjcxerfuwu", model.remotePath().serverName()); + Assertions.assertEquals("ttxfvjr", model.remotePath().volumeName()); + Assertions.assertEquals("rp", 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 573ef90db96a..4906f75799a8 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\":true,\"relationshipStatus\":\"Transferring\",\"mirrorState\":\"Uninitialized\",\"totalProgress\":\"qp\",\"errorMessage\":\"indoygmifthnzd\"}") + "{\"healthy\":false,\"relationshipStatus\":\"Transferring\",\"mirrorState\":\"Uninitialized\",\"totalProgress\":\"lylpstdb\",\"errorMessage\":\"xsrz\"}") .toObject(ReplicationStatusInner.class); - Assertions.assertTrue(model.healthy()); + Assertions.assertFalse(model.healthy()); Assertions.assertEquals(VolumeReplicationRelationshipStatus.TRANSFERRING, model.relationshipStatus()); Assertions.assertEquals(MirrorState.UNINITIALIZED, model.mirrorState()); - Assertions.assertEquals("qp", model.totalProgress()); - Assertions.assertEquals("indoygmifthnzd", model.errorMessage()); + Assertions.assertEquals("lylpstdb", model.totalProgress()); + Assertions.assertEquals("xsrz", 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 4e5cec8298cf..db18cc621f69 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ResourceNameAvailabilityRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/ResourceNameAvailabilityRequestTests.java @@ -13,23 +13,23 @@ public final class ResourceNameAvailabilityRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ResourceNameAvailabilityRequest model = BinaryData.fromString( - "{\"name\":\"laecxndticok\",\"type\":\"Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots\",\"resourceGroup\":\"zmlqtmldgxo\"}") + "{\"name\":\"kgmnsghpxyc\",\"type\":\"Microsoft.NetApp/netAppAccounts/capacityPools/volumes/backups\",\"resourceGroup\":\"drwjjkhvyom\"}") .toObject(ResourceNameAvailabilityRequest.class); - Assertions.assertEquals("laecxndticok", model.name()); + Assertions.assertEquals("kgmnsghpxyc", model.name()); Assertions.assertEquals( - CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS, model.type()); - Assertions.assertEquals("zmlqtmldgxo", model.resourceGroup()); + CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_BACKUPS, model.type()); + Assertions.assertEquals("drwjjkhvyom", model.resourceGroup()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ResourceNameAvailabilityRequest model = new ResourceNameAvailabilityRequest().withName("laecxndticok") - .withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS) - .withResourceGroup("zmlqtmldgxo"); + ResourceNameAvailabilityRequest model = new ResourceNameAvailabilityRequest().withName("kgmnsghpxyc") + .withType(CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_BACKUPS) + .withResourceGroup("drwjjkhvyom"); model = BinaryData.fromObject(model).toObject(ResourceNameAvailabilityRequest.class); - Assertions.assertEquals("laecxndticok", model.name()); + Assertions.assertEquals("kgmnsghpxyc", model.name()); Assertions.assertEquals( - CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_SNAPSHOTS, model.type()); - Assertions.assertEquals("zmlqtmldgxo", model.resourceGroup()); + CheckNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS_VOLUMES_BACKUPS, model.type()); + Assertions.assertEquals("drwjjkhvyom", model.resourceGroup()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SecretPasswordIdentityTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SecretPasswordIdentityTests.java new file mode 100644 index 000000000000..64e530185ce7 --- /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\":\"sepdfgk\",\"userAssignedIdentity\":\"dherngbtcj\"}") + .toObject(SecretPasswordIdentity.class); + Assertions.assertEquals("dherngbtcj", model.userAssignedIdentity()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SecretPasswordIdentity model = new SecretPasswordIdentity().withUserAssignedIdentity("dherngbtcj"); + model = BinaryData.fromObject(model).toObject(SecretPasswordIdentity.class); + Assertions.assertEquals("dherngbtcj", model.userAssignedIdentity()); + } +} 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 new file mode 100644 index 000000000000..c37aeca37e64 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SmbSettingsTests.java @@ -0,0 +1,35 @@ +// Copyright (c) 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.SmbAccessBasedEnumeration; +import com.azure.resourcemanager.netapp.models.SmbEncryptionState; +import com.azure.resourcemanager.netapp.models.SmbNonBrowsable; +import com.azure.resourcemanager.netapp.models.SmbSettings; +import org.junit.jupiter.api.Assertions; + +public final class SmbSettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SmbSettings model = BinaryData.fromString( + "{\"smbEncryption\":\"Enabled\",\"smbAccessBasedEnumerations\":\"Disabled\",\"smbNonBrowsable\":\"Disabled\"}") + .toObject(SmbSettings.class); + Assertions.assertEquals(SmbEncryptionState.ENABLED, model.smbEncryption()); + Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumerations()); + Assertions.assertEquals(SmbNonBrowsable.DISABLED, model.smbNonBrowsable()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SmbSettings model = new SmbSettings().withSmbEncryption(SmbEncryptionState.ENABLED) + .withSmbAccessBasedEnumerations(SmbAccessBasedEnumeration.DISABLED) + .withSmbNonBrowsable(SmbNonBrowsable.DISABLED); + model = BinaryData.fromObject(model).toObject(SmbSettings.class); + Assertions.assertEquals(SmbEncryptionState.ENABLED, model.smbEncryption()); + Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumerations()); + Assertions.assertEquals(SmbNonBrowsable.DISABLED, model.smbNonBrowsable()); + } +} 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 0a4ad36b182a..76a91d5d672d 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\":\"mbes\",\"created\":\"2021-02-14T02:40:27Z\",\"provisioningState\":\"wwtppj\"},\"location\":\"lcxog\",\"id\":\"konzmnsik\",\"name\":\"mkqzeqqkdltfzxmh\",\"type\":\"v\"}") + "{\"properties\":{\"snapshotId\":\"ozfikdowwq\",\"created\":\"2021-11-16T12:15:10Z\",\"provisioningState\":\"zx\"},\"location\":\"lvithhqzonosgg\",\"id\":\"c\",\"name\":\"hfwdsjnkaljutiis\",\"type\":\"acffgdkzzewkfvhq\"}") .toObject(SnapshotInner.class); - Assertions.assertEquals("lcxog", model.location()); + Assertions.assertEquals("lvithhqzonosgg", model.location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SnapshotInner model = new SnapshotInner().withLocation("lcxog"); + SnapshotInner model = new SnapshotInner().withLocation("lvithhqzonosgg"); model = BinaryData.fromObject(model).toObject(SnapshotInner.class); - Assertions.assertEquals("lcxog", model.location()); + Assertions.assertEquals("lvithhqzonosgg", 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 1acd07e1fc7f..d42ad893093f 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\":139843072,\"minute\":184999250,\"usedBytes\":671480520917844064},\"dailySchedule\":{\"snapshotsToKeep\":1286205076,\"hour\":1685347257,\"minute\":1978421071,\"usedBytes\":5949517522965784982},\"weeklySchedule\":{\"snapshotsToKeep\":521658697,\"day\":\"sehaohdjhhflzok\",\"hour\":434777672,\"minute\":94741475,\"usedBytes\":947940587713808603},\"monthlySchedule\":{\"snapshotsToKeep\":699384305,\"daysOfMonth\":\"gltsxoat\",\"hour\":184618447,\"minute\":1097989023,\"usedBytes\":6123043499529132871},\"enabled\":true,\"provisioningState\":\"e\"},\"etag\":\"occsr\",\"location\":\"zihmipgawtxxpky\",\"tags\":{\"pcycilrmcaykg\":\"cjxgrytf\",\"pndfcpfnznt\":\"noxuztrksx\",\"xuzvoamktcqi\":\"jtwkjaos\",\"rtltla\":\"smgbzahgxqdl\"},\"id\":\"rltzkatbhjmz\",\"name\":\"nbsoqeqalarv\",\"type\":\"agunbtgfebw\"}"; + = "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":714277208,\"minute\":622272508,\"usedBytes\":2403994955777432154},\"dailySchedule\":{\"snapshotsToKeep\":564386734,\"hour\":1267237600,\"minute\":1625638430,\"usedBytes\":207550429091909014},\"weeklySchedule\":{\"snapshotsToKeep\":24741758,\"day\":\"elqkaadlkn\",\"hour\":1051135474,\"minute\":367362868,\"usedBytes\":3729881925907988469},\"monthlySchedule\":{\"snapshotsToKeep\":1473891126,\"daysOfMonth\":\"xivcnrlyxnu\",\"hour\":1798343745,\"minute\":1007156651,\"usedBytes\":4412368381761510262},\"enabled\":false,\"provisioningState\":\"atv\"},\"etag\":\"sdtcjbctvivuzqym\",\"location\":\"owog\",\"tags\":{\"zndscxmxeatkdbmw\":\"tsqhzvbrzcdban\"},\"id\":\"rdjyibqb\",\"name\":\"aomhjrmkuhmaxl\",\"type\":\"alfihcjmobcancd\"}"; 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("yinljqe") - .withRegion("tbxqmuluxlxq") - .withExistingNetAppAccount("mxswvruunzz", "gehkfkimrtixokff") - .withTags(mapOf("ycucrwnamikzeb", "ers", "ziqgfuh", "qbsms")) - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(400692388) - .withMinute(117552544) - .withUsedBytes(4999588293339147648L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(927727255) - .withHour(171287650) - .withMinute(2112276373) - .withUsedBytes(8975179932311001443L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(1153037194) - .withDay("du") - .withHour(1806892496) - .withMinute(667519337) - .withUsedBytes(3451295234524077317L)) - .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(1949096000) - .withDaysOfMonth("b") - .withHour(1840305152) - .withMinute(1547135133) - .withUsedBytes(8260240583130824742L)) + .define("pxgzdyimsfayor") + .withRegion("maupxvpi") + .withExistingNetAppAccount("mevuafpwzy", "frkgwltxeq") + .withTags(mapOf("l", "aifyzyzeyuubeids")) + .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(450350421) + .withMinute(2060156121) + .withUsedBytes(1995086181838707776L)) + .withDailySchedule(new DailySchedule().withSnapshotsToKeep(1435976070) + .withHour(1686367778) + .withMinute(1716765996) + .withUsedBytes(290033450377892729L)) + .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(513653819) + .withDay("aekqsykvwj") + .withHour(2097396893) + .withMinute(1546006196) + .withUsedBytes(5248553620424406152L)) + .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(1972305206) + .withDaysOfMonth("rspxklur") + .withHour(617853812) + .withMinute(1958943934) + .withUsedBytes(6367262895956775037L)) .withEnabled(true) .create(); - Assertions.assertEquals("zihmipgawtxxpky", response.location()); - Assertions.assertEquals("cjxgrytf", response.tags().get("pcycilrmcaykg")); - Assertions.assertEquals(139843072, response.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(184999250, response.hourlySchedule().minute()); - Assertions.assertEquals(671480520917844064L, response.hourlySchedule().usedBytes()); - Assertions.assertEquals(1286205076, response.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(1685347257, response.dailySchedule().hour()); - Assertions.assertEquals(1978421071, response.dailySchedule().minute()); - Assertions.assertEquals(5949517522965784982L, response.dailySchedule().usedBytes()); - Assertions.assertEquals(521658697, response.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("sehaohdjhhflzok", response.weeklySchedule().day()); - Assertions.assertEquals(434777672, response.weeklySchedule().hour()); - Assertions.assertEquals(94741475, response.weeklySchedule().minute()); - Assertions.assertEquals(947940587713808603L, response.weeklySchedule().usedBytes()); - Assertions.assertEquals(699384305, response.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("gltsxoat", response.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(184618447, response.monthlySchedule().hour()); - Assertions.assertEquals(1097989023, response.monthlySchedule().minute()); - Assertions.assertEquals(6123043499529132871L, response.monthlySchedule().usedBytes()); - Assertions.assertTrue(response.enabled()); + Assertions.assertEquals("owog", response.location()); + Assertions.assertEquals("tsqhzvbrzcdban", response.tags().get("zndscxmxeatkdbmw")); + Assertions.assertEquals(714277208, response.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(622272508, response.hourlySchedule().minute()); + Assertions.assertEquals(2403994955777432154L, response.hourlySchedule().usedBytes()); + Assertions.assertEquals(564386734, response.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(1267237600, response.dailySchedule().hour()); + Assertions.assertEquals(1625638430, response.dailySchedule().minute()); + Assertions.assertEquals(207550429091909014L, response.dailySchedule().usedBytes()); + Assertions.assertEquals(24741758, response.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("elqkaadlkn", response.weeklySchedule().day()); + Assertions.assertEquals(1051135474, response.weeklySchedule().hour()); + Assertions.assertEquals(367362868, response.weeklySchedule().minute()); + Assertions.assertEquals(3729881925907988469L, response.weeklySchedule().usedBytes()); + Assertions.assertEquals(1473891126, response.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("xivcnrlyxnu", response.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(1798343745, response.monthlySchedule().hour()); + Assertions.assertEquals(1007156651, response.monthlySchedule().minute()); + Assertions.assertEquals(4412368381761510262L, 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 c43c7b3bf24d..3123f44cfeb5 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("m", "dmspof", "pv", com.azure.core.util.Context.NONE); + manager.snapshotPolicies().delete("jb", "xjeaoqaqbzgyh", "w", 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 f62e1920429d..5b6bbc82c4ce 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\":122939434,\"minute\":107099927,\"usedBytes\":284285859613384184},\"dailySchedule\":{\"snapshotsToKeep\":1504701395,\"hour\":494637597,\"minute\":1759230509,\"usedBytes\":3362274562531904097},\"weeklySchedule\":{\"snapshotsToKeep\":669649169,\"day\":\"xmvwfg\",\"hour\":1895835136,\"minute\":414360047,\"usedBytes\":4367486194556700788},\"monthlySchedule\":{\"snapshotsToKeep\":1417437720,\"daysOfMonth\":\"lzqnhcvs\",\"hour\":1417564823,\"minute\":1936009218,\"usedBytes\":2855783179854311369},\"enabled\":false,\"provisioningState\":\"gnxf\"},\"etag\":\"onmpqoxwdof\",\"location\":\"xiqxeiiqbimh\",\"tags\":{\"vwbcblembnkbwv\":\"winhehfqpo\",\"uwfmduragegizvc\":\"vxkdivqihebwtswb\"},\"id\":\"felisdjub\",\"name\":\"gbqi\",\"type\":\"kxkbsazgakgacyr\"}"; + = "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1672875845,\"minute\":1764547970,\"usedBytes\":4382532019057936776},\"dailySchedule\":{\"snapshotsToKeep\":1188527137,\"hour\":915705696,\"minute\":206743911,\"usedBytes\":8062040036037126303},\"weeklySchedule\":{\"snapshotsToKeep\":222537578,\"day\":\"syhzlwx\",\"hour\":1732227521,\"minute\":1277865813,\"usedBytes\":399098464049615690},\"monthlySchedule\":{\"snapshotsToKeep\":1504170570,\"daysOfMonth\":\"sbdweaderzmwnt\",\"hour\":1329621883,\"minute\":2094320372,\"usedBytes\":6613131527266315501},\"enabled\":true,\"provisioningState\":\"goaqylkjztj\"},\"etag\":\"azjcgmxitpfin\",\"location\":\"pdltkrlg\",\"tags\":{\"vcqguefzh\":\"bd\",\"lyujlfyoump\":\"mpheqdur\",\"brzmqxucycijoclx\":\"kyeclcdigpta\"},\"id\":\"utgjcyz\",\"name\":\"zjd\",\"type\":\"r\"}"; 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("aivmxyasflvgs", "zwywako", "hknsmjbl", com.azure.core.util.Context.NONE) + .getWithResponse("urnpnuhzafccnuh", "i", "byl", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("xiqxeiiqbimh", response.location()); - Assertions.assertEquals("winhehfqpo", response.tags().get("vwbcblembnkbwv")); - Assertions.assertEquals(122939434, response.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(107099927, response.hourlySchedule().minute()); - Assertions.assertEquals(284285859613384184L, response.hourlySchedule().usedBytes()); - Assertions.assertEquals(1504701395, response.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(494637597, response.dailySchedule().hour()); - Assertions.assertEquals(1759230509, response.dailySchedule().minute()); - Assertions.assertEquals(3362274562531904097L, response.dailySchedule().usedBytes()); - Assertions.assertEquals(669649169, response.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("xmvwfg", response.weeklySchedule().day()); - Assertions.assertEquals(1895835136, response.weeklySchedule().hour()); - Assertions.assertEquals(414360047, response.weeklySchedule().minute()); - Assertions.assertEquals(4367486194556700788L, response.weeklySchedule().usedBytes()); - Assertions.assertEquals(1417437720, response.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("lzqnhcvs", response.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1417564823, response.monthlySchedule().hour()); - Assertions.assertEquals(1936009218, response.monthlySchedule().minute()); - Assertions.assertEquals(2855783179854311369L, response.monthlySchedule().usedBytes()); - Assertions.assertFalse(response.enabled()); + Assertions.assertEquals("pdltkrlg", response.location()); + Assertions.assertEquals("bd", response.tags().get("vcqguefzh")); + Assertions.assertEquals(1672875845, response.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1764547970, response.hourlySchedule().minute()); + Assertions.assertEquals(4382532019057936776L, response.hourlySchedule().usedBytes()); + Assertions.assertEquals(1188527137, response.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(915705696, response.dailySchedule().hour()); + Assertions.assertEquals(206743911, response.dailySchedule().minute()); + Assertions.assertEquals(8062040036037126303L, response.dailySchedule().usedBytes()); + Assertions.assertEquals(222537578, response.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("syhzlwx", response.weeklySchedule().day()); + Assertions.assertEquals(1732227521, response.weeklySchedule().hour()); + Assertions.assertEquals(1277865813, response.weeklySchedule().minute()); + Assertions.assertEquals(399098464049615690L, response.weeklySchedule().usedBytes()); + Assertions.assertEquals(1504170570, response.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("sbdweaderzmwnt", response.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(1329621883, response.monthlySchedule().hour()); + Assertions.assertEquals(2094320372, response.monthlySchedule().minute()); + Assertions.assertEquals(6613131527266315501L, 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 fcbf91f0d1e5..99011eb4802e 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\":162758827,\"minute\":1553181859,\"usedBytes\":9014985599249156768},\"dailySchedule\":{\"snapshotsToKeep\":2051570067,\"hour\":1363158856,\"minute\":140033236,\"usedBytes\":6172562275136277207},\"weeklySchedule\":{\"snapshotsToKeep\":1720434943,\"day\":\"ibmikostbzb\",\"hour\":1151685721,\"minute\":775922838,\"usedBytes\":201396794516817899},\"monthlySchedule\":{\"snapshotsToKeep\":1310458507,\"daysOfMonth\":\"fy\",\"hour\":200835193,\"minute\":362710224,\"usedBytes\":8706735414371355551},\"enabled\":false,\"provisioningState\":\"ezzcez\"},\"etag\":\"fwyfwlwxjwet\",\"location\":\"sihclafzvaylp\",\"tags\":{\"mwqkchcxwaxf\":\"qqwzt\"},\"id\":\"w\",\"name\":\"jkjexf\",\"type\":\"eqvhpsylkk\"}]}"; + = "{\"value\":[{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":869743096,\"minute\":235713184,\"usedBytes\":5798834273726815282},\"dailySchedule\":{\"snapshotsToKeep\":501482624,\"hour\":23215841,\"minute\":1419691,\"usedBytes\":2849565274995751402},\"weeklySchedule\":{\"snapshotsToKeep\":601850943,\"day\":\"wbormcqmi\",\"hour\":1617268424,\"minute\":1772197279,\"usedBytes\":6303018001687291973},\"monthlySchedule\":{\"snapshotsToKeep\":1276736582,\"daysOfMonth\":\"xjmcsmyqwixvcpw\",\"hour\":517976128,\"minute\":1321154301,\"usedBytes\":6290615994078463009},\"enabled\":true,\"provisioningState\":\"ickduoiqta\"},\"etag\":\"yvsk\",\"location\":\"rwzawnvs\",\"tags\":{\"zregzgyufutrwpw\":\"hzagxnvhycvdimw\",\"meottawj\":\"ryekzkd\"},\"id\":\"osxw\",\"name\":\"hnhjtfvpndpmi\",\"type\":\"jpnwynudql\"}]}"; 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("hryl", "iofrzgbzjedmstk", com.azure.core.util.Context.NONE); + = manager.snapshotPolicies().list("v", "atbwbqam", com.azure.core.util.Context.NONE); - Assertions.assertEquals("sihclafzvaylp", response.iterator().next().location()); - Assertions.assertEquals("qqwzt", response.iterator().next().tags().get("mwqkchcxwaxf")); - Assertions.assertEquals(162758827, response.iterator().next().hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1553181859, response.iterator().next().hourlySchedule().minute()); - Assertions.assertEquals(9014985599249156768L, response.iterator().next().hourlySchedule().usedBytes()); - Assertions.assertEquals(2051570067, response.iterator().next().dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(1363158856, response.iterator().next().dailySchedule().hour()); - Assertions.assertEquals(140033236, response.iterator().next().dailySchedule().minute()); - Assertions.assertEquals(6172562275136277207L, response.iterator().next().dailySchedule().usedBytes()); - Assertions.assertEquals(1720434943, response.iterator().next().weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("ibmikostbzb", response.iterator().next().weeklySchedule().day()); - Assertions.assertEquals(1151685721, response.iterator().next().weeklySchedule().hour()); - Assertions.assertEquals(775922838, response.iterator().next().weeklySchedule().minute()); - Assertions.assertEquals(201396794516817899L, response.iterator().next().weeklySchedule().usedBytes()); - Assertions.assertEquals(1310458507, response.iterator().next().monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("fy", response.iterator().next().monthlySchedule().daysOfMonth()); - Assertions.assertEquals(200835193, response.iterator().next().monthlySchedule().hour()); - Assertions.assertEquals(362710224, response.iterator().next().monthlySchedule().minute()); - Assertions.assertEquals(8706735414371355551L, response.iterator().next().monthlySchedule().usedBytes()); - Assertions.assertFalse(response.iterator().next().enabled()); + Assertions.assertEquals("rwzawnvs", response.iterator().next().location()); + Assertions.assertEquals("hzagxnvhycvdimw", response.iterator().next().tags().get("zregzgyufutrwpw")); + Assertions.assertEquals(869743096, response.iterator().next().hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(235713184, response.iterator().next().hourlySchedule().minute()); + Assertions.assertEquals(5798834273726815282L, response.iterator().next().hourlySchedule().usedBytes()); + Assertions.assertEquals(501482624, response.iterator().next().dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(23215841, response.iterator().next().dailySchedule().hour()); + Assertions.assertEquals(1419691, response.iterator().next().dailySchedule().minute()); + Assertions.assertEquals(2849565274995751402L, response.iterator().next().dailySchedule().usedBytes()); + Assertions.assertEquals(601850943, response.iterator().next().weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("wbormcqmi", response.iterator().next().weeklySchedule().day()); + Assertions.assertEquals(1617268424, response.iterator().next().weeklySchedule().hour()); + Assertions.assertEquals(1772197279, response.iterator().next().weeklySchedule().minute()); + Assertions.assertEquals(6303018001687291973L, response.iterator().next().weeklySchedule().usedBytes()); + Assertions.assertEquals(1276736582, response.iterator().next().monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("xjmcsmyqwixvcpw", response.iterator().next().monthlySchedule().daysOfMonth()); + Assertions.assertEquals(517976128, response.iterator().next().monthlySchedule().hour()); + Assertions.assertEquals(1321154301, response.iterator().next().monthlySchedule().minute()); + Assertions.assertEquals(6290615994078463009L, 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 377a26ca1754..b34c46f1de35 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\":1525827841,\"minute\":984158144,\"usedBytes\":8989578588874797078},\"dailySchedule\":{\"snapshotsToKeep\":1343129600,\"hour\":533630159,\"minute\":761467477,\"usedBytes\":6830630218833714201},\"weeklySchedule\":{\"snapshotsToKeep\":1512461872,\"day\":\"qiiobyuqer\",\"hour\":270206644,\"minute\":2131221175,\"usedBytes\":5523285325646920804},\"monthlySchedule\":{\"snapshotsToKeep\":1945025825,\"daysOfMonth\":\"bdbutauvf\",\"hour\":1152975758,\"minute\":468710648,\"usedBytes\":436852010695338274},\"enabled\":true,\"provisioningState\":\"ojoxafnndlp\"},\"etag\":\"hkoymkcdyhbp\",\"location\":\"pwdreqnovvqf\",\"tags\":{\"rsndsytgadgvra\":\"jxywsuws\",\"uu\":\"aeneqnzarrwl\"},\"id\":\"jfqka\",\"name\":\"e\",\"type\":\"iipfpubj\"},{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1113434704,\"minute\":254804801,\"usedBytes\":6753222489346190909},\"dailySchedule\":{\"snapshotsToKeep\":1368625669,\"hour\":2128432962,\"minute\":1615767806,\"usedBytes\":2110068594447415749},\"weeklySchedule\":{\"snapshotsToKeep\":1931540064,\"day\":\"nynfsynljphuo\",\"hour\":415163187,\"minute\":951463794,\"usedBytes\":3252607462843621148},\"monthlySchedule\":{\"snapshotsToKeep\":1759738487,\"daysOfMonth\":\"zihleosjswsr\",\"hour\":2109654936,\"minute\":1326847440,\"usedBytes\":6943996810549393659},\"enabled\":false,\"provisioningState\":\"ckqqzqioxiysui\"},\"etag\":\"ynkedyatrwyhqmib\",\"location\":\"hwit\",\"tags\":{\"pcdpumnz\":\"pyy\",\"abikns\":\"mwzn\",\"dtlwwrlkd\":\"rgjhxb\",\"lxdy\":\"tncvokot\"},\"id\":\"gsyocogj\",\"name\":\"tdtbnnhadooc\",\"type\":\"kvci\"}],\"nextLink\":\"nvpamq\"}") + "{\"value\":[{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1326847440,\"minute\":1616775247,\"usedBytes\":2883275669882488195},\"dailySchedule\":{\"snapshotsToKeep\":922265533,\"hour\":1433491809,\"minute\":1237691415,\"usedBytes\":1485781333279221800},\"weeklySchedule\":{\"snapshotsToKeep\":1168629825,\"day\":\"iizynkedyatrwyh\",\"hour\":963712309,\"minute\":556092423,\"usedBytes\":3831030822063036154},\"monthlySchedule\":{\"snapshotsToKeep\":159300714,\"daysOfMonth\":\"ypyynpcdpumnzg\",\"hour\":83591449,\"minute\":1443914942,\"usedBytes\":6753075814486696287},\"enabled\":true,\"provisioningState\":\"orgjhxbldt\"},\"etag\":\"wrlkdmtn\",\"location\":\"ok\",\"tags\":{\"gsyocogj\":\"lxdy\",\"kvci\":\"tdtbnnhadooc\"},\"id\":\"hnvpamqgxq\",\"name\":\"u\",\"type\":\"zikywgg\"},{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":798268380,\"minute\":1927044883,\"usedBytes\":3546472897541130769},\"dailySchedule\":{\"snapshotsToKeep\":142716776,\"hour\":908050565,\"minute\":555730544,\"usedBytes\":5147167923805665994},\"weeklySchedule\":{\"snapshotsToKeep\":1929078891,\"day\":\"gvvcnayrhyr\",\"hour\":1580005747,\"minute\":385897981,\"usedBytes\":4856871253065990581},\"monthlySchedule\":{\"snapshotsToKeep\":877361195,\"daysOfMonth\":\"v\",\"hour\":928139019,\"minute\":1199547484,\"usedBytes\":8818442989358220619},\"enabled\":true,\"provisioningState\":\"lmfmtdaay\"},\"etag\":\"v\",\"location\":\"gpiohgwxrtfudxe\",\"tags\":{\"pkukghi\":\"yqagvrvm\",\"wi\":\"dblx\",\"rey\":\"fnjhfjxwmszkkfo\",\"elpcirelsfeaenwa\":\"kzikfjawneaivxwc\"},\"id\":\"fatkld\",\"name\":\"xbjhwuaanozjosph\",\"type\":\"oulpjrv\"},{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":114988444,\"minute\":1846305847,\"usedBytes\":9109732338673548989},\"dailySchedule\":{\"snapshotsToKeep\":1951928736,\"hour\":357706125,\"minute\":559166654,\"usedBytes\":6069894619608430777},\"weeklySchedule\":{\"snapshotsToKeep\":1365275067,\"day\":\"tq\",\"hour\":1686364184,\"minute\":2056764824,\"usedBytes\":1480057858076827624},\"monthlySchedule\":{\"snapshotsToKeep\":885439585,\"daysOfMonth\":\"ly\",\"hour\":1943663819,\"minute\":1081755723,\"usedBytes\":2422688696917876077},\"enabled\":true,\"provisioningState\":\"unygaeqid\"},\"etag\":\"fatpxllrxcyjmoa\",\"location\":\"uvarmywdmjsjq\",\"tags\":{\"kgymareqnajxqug\":\"hyxxrwlycoduhpk\",\"ubeddg\":\"hky\"},\"id\":\"sofwqmzqalkrmnji\",\"name\":\"pxacqqudfn\",\"type\":\"yxbaaabjyvayf\"},{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":936751244,\"minute\":1942204263,\"usedBytes\":4327719867716518141},\"dailySchedule\":{\"snapshotsToKeep\":1575788840,\"hour\":605445397,\"minute\":1754113707,\"usedBytes\":9125066610031127083},\"weeklySchedule\":{\"snapshotsToKeep\":2105512839,\"day\":\"wmewzsyy\",\"hour\":1091496648,\"minute\":723426938,\"usedBytes\":893213064865433061},\"monthlySchedule\":{\"snapshotsToKeep\":2135802257,\"daysOfMonth\":\"frxtrthzvaytdwk\",\"hour\":1322383691,\"minute\":1729344688,\"usedBytes\":4145471517526414946},\"enabled\":false,\"provisioningState\":\"xiilivpdtiirqt\"},\"etag\":\"oaxoruzfgsqu\",\"location\":\"xrxxlep\",\"tags\":{\"wxuqlcvydypatdoo\":\"mxjezwlw\",\"kooebwnu\":\"ojknio\",\"vdkcrodtj\":\"hemms\"},\"id\":\"nfwjlfltkacjvefk\",\"name\":\"lfoakg\",\"type\":\"kfpagao\"}],\"nextLink\":\"ulpqblylsyxkqjn\"}") .toObject(SnapshotPoliciesList.class); - Assertions.assertEquals("pwdreqnovvqf", model.value().get(0).location()); - Assertions.assertEquals("jxywsuws", model.value().get(0).tags().get("rsndsytgadgvra")); - Assertions.assertEquals(1525827841, model.value().get(0).hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(984158144, model.value().get(0).hourlySchedule().minute()); - Assertions.assertEquals(8989578588874797078L, model.value().get(0).hourlySchedule().usedBytes()); - Assertions.assertEquals(1343129600, model.value().get(0).dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(533630159, model.value().get(0).dailySchedule().hour()); - Assertions.assertEquals(761467477, model.value().get(0).dailySchedule().minute()); - Assertions.assertEquals(6830630218833714201L, model.value().get(0).dailySchedule().usedBytes()); - Assertions.assertEquals(1512461872, model.value().get(0).weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("qiiobyuqer", model.value().get(0).weeklySchedule().day()); - Assertions.assertEquals(270206644, model.value().get(0).weeklySchedule().hour()); - Assertions.assertEquals(2131221175, model.value().get(0).weeklySchedule().minute()); - Assertions.assertEquals(5523285325646920804L, model.value().get(0).weeklySchedule().usedBytes()); - Assertions.assertEquals(1945025825, model.value().get(0).monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("bdbutauvf", model.value().get(0).monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1152975758, model.value().get(0).monthlySchedule().hour()); - Assertions.assertEquals(468710648, model.value().get(0).monthlySchedule().minute()); - Assertions.assertEquals(436852010695338274L, model.value().get(0).monthlySchedule().usedBytes()); + Assertions.assertEquals("ok", model.value().get(0).location()); + Assertions.assertEquals("lxdy", model.value().get(0).tags().get("gsyocogj")); + Assertions.assertEquals(1326847440, model.value().get(0).hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1616775247, model.value().get(0).hourlySchedule().minute()); + Assertions.assertEquals(2883275669882488195L, model.value().get(0).hourlySchedule().usedBytes()); + Assertions.assertEquals(922265533, model.value().get(0).dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(1433491809, model.value().get(0).dailySchedule().hour()); + Assertions.assertEquals(1237691415, model.value().get(0).dailySchedule().minute()); + Assertions.assertEquals(1485781333279221800L, model.value().get(0).dailySchedule().usedBytes()); + Assertions.assertEquals(1168629825, model.value().get(0).weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("iizynkedyatrwyh", model.value().get(0).weeklySchedule().day()); + Assertions.assertEquals(963712309, model.value().get(0).weeklySchedule().hour()); + Assertions.assertEquals(556092423, model.value().get(0).weeklySchedule().minute()); + Assertions.assertEquals(3831030822063036154L, model.value().get(0).weeklySchedule().usedBytes()); + Assertions.assertEquals(159300714, model.value().get(0).monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("ypyynpcdpumnzg", model.value().get(0).monthlySchedule().daysOfMonth()); + Assertions.assertEquals(83591449, model.value().get(0).monthlySchedule().hour()); + Assertions.assertEquals(1443914942, model.value().get(0).monthlySchedule().minute()); + Assertions.assertEquals(6753075814486696287L, model.value().get(0).monthlySchedule().usedBytes()); Assertions.assertTrue(model.value().get(0).enabled()); - Assertions.assertEquals("nvpamq", model.nextLink()); + Assertions.assertEquals("ulpqblylsyxkqjn", 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 bca83d9d7fe3..b8ff67dbb495 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,73 @@ public final class SnapshotPolicyInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SnapshotPolicyInner model = BinaryData.fromString( - "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1036395530,\"minute\":834040298,\"usedBytes\":1971349718738257268},\"dailySchedule\":{\"snapshotsToKeep\":571890155,\"hour\":2019789161,\"minute\":314213768,\"usedBytes\":1796224915838134100},\"weeklySchedule\":{\"snapshotsToKeep\":369872117,\"day\":\"owwquuvxz\",\"hour\":1447033048,\"minute\":2116821034,\"usedBytes\":2045084080849688226},\"monthlySchedule\":{\"snapshotsToKeep\":176578322,\"daysOfMonth\":\"osggbhc\",\"hour\":1150860999,\"minute\":1492751876,\"usedBytes\":8361434893170853179},\"enabled\":true,\"provisioningState\":\"jutiiswacff\"},\"etag\":\"k\",\"location\":\"ewkfvhqcrai\",\"tags\":{\"pfuflrw\":\"n\",\"lxyjr\":\"mh\"},\"id\":\"sag\",\"name\":\"fcnihgwq\",\"type\":\"pnedgf\"}") + "{\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1288756278,\"minute\":1216827134,\"usedBytes\":7141166949546611504},\"dailySchedule\":{\"snapshotsToKeep\":22897042,\"hour\":192759077,\"minute\":1120299710,\"usedBytes\":4031326214587068225},\"weeklySchedule\":{\"snapshotsToKeep\":1662588727,\"day\":\"yzvqt\",\"hour\":876098210,\"minute\":1500004458,\"usedBytes\":3901581715856749689},\"monthlySchedule\":{\"snapshotsToKeep\":1254452597,\"daysOfMonth\":\"ondjmq\",\"hour\":1083170526,\"minute\":1371154692,\"usedBytes\":1404344423312280860},\"enabled\":false,\"provisioningState\":\"kwhojvpaj\"},\"etag\":\"xysmoc\",\"location\":\"qfqvmkc\",\"tags\":{\"tddckcb\":\"apvhelxprgly\",\"qibrhosxsdqrhzoy\":\"uejrjxgc\"},\"id\":\"i\",\"name\":\"m\",\"type\":\"qyib\"}") .toObject(SnapshotPolicyInner.class); - Assertions.assertEquals("ewkfvhqcrai", model.location()); - Assertions.assertEquals("n", model.tags().get("pfuflrw")); - Assertions.assertEquals(1036395530, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(834040298, model.hourlySchedule().minute()); - Assertions.assertEquals(1971349718738257268L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(571890155, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(2019789161, model.dailySchedule().hour()); - Assertions.assertEquals(314213768, model.dailySchedule().minute()); - Assertions.assertEquals(1796224915838134100L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(369872117, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("owwquuvxz", model.weeklySchedule().day()); - Assertions.assertEquals(1447033048, model.weeklySchedule().hour()); - Assertions.assertEquals(2116821034, model.weeklySchedule().minute()); - Assertions.assertEquals(2045084080849688226L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(176578322, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("osggbhc", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1150860999, model.monthlySchedule().hour()); - Assertions.assertEquals(1492751876, model.monthlySchedule().minute()); - Assertions.assertEquals(8361434893170853179L, model.monthlySchedule().usedBytes()); - Assertions.assertTrue(model.enabled()); + Assertions.assertEquals("qfqvmkc", model.location()); + Assertions.assertEquals("apvhelxprgly", model.tags().get("tddckcb")); + Assertions.assertEquals(1288756278, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1216827134, model.hourlySchedule().minute()); + Assertions.assertEquals(7141166949546611504L, model.hourlySchedule().usedBytes()); + Assertions.assertEquals(22897042, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(192759077, model.dailySchedule().hour()); + Assertions.assertEquals(1120299710, model.dailySchedule().minute()); + Assertions.assertEquals(4031326214587068225L, model.dailySchedule().usedBytes()); + Assertions.assertEquals(1662588727, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("yzvqt", model.weeklySchedule().day()); + Assertions.assertEquals(876098210, model.weeklySchedule().hour()); + Assertions.assertEquals(1500004458, model.weeklySchedule().minute()); + Assertions.assertEquals(3901581715856749689L, model.weeklySchedule().usedBytes()); + Assertions.assertEquals(1254452597, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("ondjmq", model.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(1083170526, model.monthlySchedule().hour()); + Assertions.assertEquals(1371154692, model.monthlySchedule().minute()); + Assertions.assertEquals(1404344423312280860L, model.monthlySchedule().usedBytes()); + Assertions.assertFalse(model.enabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SnapshotPolicyInner model = new SnapshotPolicyInner().withLocation("ewkfvhqcrai") - .withTags(mapOf("pfuflrw", "n", "lxyjr", "mh")) - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(1036395530) - .withMinute(834040298) - .withUsedBytes(1971349718738257268L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(571890155) - .withHour(2019789161) - .withMinute(314213768) - .withUsedBytes(1796224915838134100L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(369872117) - .withDay("owwquuvxz") - .withHour(1447033048) - .withMinute(2116821034) - .withUsedBytes(2045084080849688226L)) - .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(176578322) - .withDaysOfMonth("osggbhc") - .withHour(1150860999) - .withMinute(1492751876) - .withUsedBytes(8361434893170853179L)) - .withEnabled(true); + SnapshotPolicyInner model = new SnapshotPolicyInner().withLocation("qfqvmkc") + .withTags(mapOf("tddckcb", "apvhelxprgly", "qibrhosxsdqrhzoy", "uejrjxgc")) + .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(1288756278) + .withMinute(1216827134) + .withUsedBytes(7141166949546611504L)) + .withDailySchedule(new DailySchedule().withSnapshotsToKeep(22897042) + .withHour(192759077) + .withMinute(1120299710) + .withUsedBytes(4031326214587068225L)) + .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(1662588727) + .withDay("yzvqt") + .withHour(876098210) + .withMinute(1500004458) + .withUsedBytes(3901581715856749689L)) + .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(1254452597) + .withDaysOfMonth("ondjmq") + .withHour(1083170526) + .withMinute(1371154692) + .withUsedBytes(1404344423312280860L)) + .withEnabled(false); model = BinaryData.fromObject(model).toObject(SnapshotPolicyInner.class); - Assertions.assertEquals("ewkfvhqcrai", model.location()); - Assertions.assertEquals("n", model.tags().get("pfuflrw")); - Assertions.assertEquals(1036395530, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(834040298, model.hourlySchedule().minute()); - Assertions.assertEquals(1971349718738257268L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(571890155, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(2019789161, model.dailySchedule().hour()); - Assertions.assertEquals(314213768, model.dailySchedule().minute()); - Assertions.assertEquals(1796224915838134100L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(369872117, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("owwquuvxz", model.weeklySchedule().day()); - Assertions.assertEquals(1447033048, model.weeklySchedule().hour()); - Assertions.assertEquals(2116821034, model.weeklySchedule().minute()); - Assertions.assertEquals(2045084080849688226L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(176578322, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("osggbhc", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(1150860999, model.monthlySchedule().hour()); - Assertions.assertEquals(1492751876, model.monthlySchedule().minute()); - Assertions.assertEquals(8361434893170853179L, model.monthlySchedule().usedBytes()); - Assertions.assertTrue(model.enabled()); + Assertions.assertEquals("qfqvmkc", model.location()); + Assertions.assertEquals("apvhelxprgly", model.tags().get("tddckcb")); + Assertions.assertEquals(1288756278, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(1216827134, model.hourlySchedule().minute()); + Assertions.assertEquals(7141166949546611504L, model.hourlySchedule().usedBytes()); + Assertions.assertEquals(22897042, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(192759077, model.dailySchedule().hour()); + Assertions.assertEquals(1120299710, model.dailySchedule().minute()); + Assertions.assertEquals(4031326214587068225L, model.dailySchedule().usedBytes()); + Assertions.assertEquals(1662588727, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("yzvqt", model.weeklySchedule().day()); + Assertions.assertEquals(876098210, model.weeklySchedule().hour()); + Assertions.assertEquals(1500004458, model.weeklySchedule().minute()); + Assertions.assertEquals(3901581715856749689L, model.weeklySchedule().usedBytes()); + Assertions.assertEquals(1254452597, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("ondjmq", model.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(1083170526, model.monthlySchedule().hour()); + Assertions.assertEquals(1371154692, model.monthlySchedule().minute()); + Assertions.assertEquals(1404344423312280860L, model.monthlySchedule().usedBytes()); + Assertions.assertFalse(model.enabled()); } // Use "Map.of" if available 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 641dd6a1acb1..a667c8791683 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,73 +18,73 @@ public final class SnapshotPolicyPatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SnapshotPolicyPatch model = BinaryData.fromString( - "{\"location\":\"bexkpzksmondj\",\"id\":\"uxvypomgkopkwh\",\"name\":\"v\",\"type\":\"jqg\",\"tags\":{\"xozap\":\"mocmbqfqvmk\",\"dd\":\"helxprglya\"},\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":373907539,\"minute\":1344502344,\"usedBytes\":179498978109269734},\"dailySchedule\":{\"snapshotsToKeep\":374378513,\"hour\":2014016933,\"minute\":792920613,\"usedBytes\":2792970654371570691},\"weeklySchedule\":{\"snapshotsToKeep\":1487162894,\"day\":\"qrhzoymibmrqyib\",\"hour\":1988324847,\"minute\":1263635295,\"usedBytes\":2799974459561219489},\"monthlySchedule\":{\"snapshotsToKeep\":1796967394,\"daysOfMonth\":\"rkwofyyvoqa\",\"hour\":848769798,\"minute\":339045288,\"usedBytes\":5359591244102758807},\"enabled\":true,\"provisioningState\":\"bwoenwashrt\"}}") + "{\"location\":\"fnndl\",\"id\":\"chkoymkcdyh\",\"name\":\"kkpwdreqnovvq\",\"type\":\"vljxywsu\",\"tags\":{\"aeneqnzarrwl\":\"rsndsytgadgvra\"},\"properties\":{\"hourlySchedule\":{\"snapshotsToKeep\":1309534736,\"minute\":2001921074,\"usedBytes\":7831439414407354845},\"dailySchedule\":{\"snapshotsToKeep\":2115532997,\"hour\":288092317,\"minute\":1703781779,\"usedBytes\":4275294117153207447},\"weeklySchedule\":{\"snapshotsToKeep\":1307066310,\"day\":\"iftohqkvpu\",\"hour\":2123821408,\"minute\":2143222213,\"usedBytes\":2213751776230831712},\"monthlySchedule\":{\"snapshotsToKeep\":931393503,\"daysOfMonth\":\"fsynljphuop\",\"hour\":1015065537,\"minute\":596393327,\"usedBytes\":2347535510676514797},\"enabled\":false,\"provisioningState\":\"zihleosjswsr\"}}") .toObject(SnapshotPolicyPatch.class); - Assertions.assertEquals("bexkpzksmondj", model.location()); - Assertions.assertEquals("mocmbqfqvmk", model.tags().get("xozap")); - Assertions.assertEquals(373907539, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1344502344, model.hourlySchedule().minute()); - Assertions.assertEquals(179498978109269734L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(374378513, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(2014016933, model.dailySchedule().hour()); - Assertions.assertEquals(792920613, model.dailySchedule().minute()); - Assertions.assertEquals(2792970654371570691L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(1487162894, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("qrhzoymibmrqyib", model.weeklySchedule().day()); - Assertions.assertEquals(1988324847, model.weeklySchedule().hour()); - Assertions.assertEquals(1263635295, model.weeklySchedule().minute()); - Assertions.assertEquals(2799974459561219489L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(1796967394, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("rkwofyyvoqa", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(848769798, model.monthlySchedule().hour()); - Assertions.assertEquals(339045288, model.monthlySchedule().minute()); - Assertions.assertEquals(5359591244102758807L, model.monthlySchedule().usedBytes()); - Assertions.assertTrue(model.enabled()); + Assertions.assertEquals("fnndl", model.location()); + Assertions.assertEquals("rsndsytgadgvra", model.tags().get("aeneqnzarrwl")); + Assertions.assertEquals(1309534736, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(2001921074, model.hourlySchedule().minute()); + Assertions.assertEquals(7831439414407354845L, model.hourlySchedule().usedBytes()); + Assertions.assertEquals(2115532997, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(288092317, model.dailySchedule().hour()); + Assertions.assertEquals(1703781779, model.dailySchedule().minute()); + Assertions.assertEquals(4275294117153207447L, model.dailySchedule().usedBytes()); + Assertions.assertEquals(1307066310, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("iftohqkvpu", model.weeklySchedule().day()); + Assertions.assertEquals(2123821408, model.weeklySchedule().hour()); + Assertions.assertEquals(2143222213, model.weeklySchedule().minute()); + Assertions.assertEquals(2213751776230831712L, model.weeklySchedule().usedBytes()); + Assertions.assertEquals(931393503, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("fsynljphuop", model.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(1015065537, model.monthlySchedule().hour()); + Assertions.assertEquals(596393327, model.monthlySchedule().minute()); + Assertions.assertEquals(2347535510676514797L, model.monthlySchedule().usedBytes()); + Assertions.assertFalse(model.enabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SnapshotPolicyPatch model = new SnapshotPolicyPatch().withLocation("bexkpzksmondj") - .withTags(mapOf("xozap", "mocmbqfqvmk", "dd", "helxprglya")) - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(373907539) - .withMinute(1344502344) - .withUsedBytes(179498978109269734L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(374378513) - .withHour(2014016933) - .withMinute(792920613) - .withUsedBytes(2792970654371570691L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(1487162894) - .withDay("qrhzoymibmrqyib") - .withHour(1988324847) - .withMinute(1263635295) - .withUsedBytes(2799974459561219489L)) - .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(1796967394) - .withDaysOfMonth("rkwofyyvoqa") - .withHour(848769798) - .withMinute(339045288) - .withUsedBytes(5359591244102758807L)) - .withEnabled(true); + SnapshotPolicyPatch model = new SnapshotPolicyPatch().withLocation("fnndl") + .withTags(mapOf("aeneqnzarrwl", "rsndsytgadgvra")) + .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(1309534736) + .withMinute(2001921074) + .withUsedBytes(7831439414407354845L)) + .withDailySchedule(new DailySchedule().withSnapshotsToKeep(2115532997) + .withHour(288092317) + .withMinute(1703781779) + .withUsedBytes(4275294117153207447L)) + .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(1307066310) + .withDay("iftohqkvpu") + .withHour(2123821408) + .withMinute(2143222213) + .withUsedBytes(2213751776230831712L)) + .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(931393503) + .withDaysOfMonth("fsynljphuop") + .withHour(1015065537) + .withMinute(596393327) + .withUsedBytes(2347535510676514797L)) + .withEnabled(false); model = BinaryData.fromObject(model).toObject(SnapshotPolicyPatch.class); - Assertions.assertEquals("bexkpzksmondj", model.location()); - Assertions.assertEquals("mocmbqfqvmk", model.tags().get("xozap")); - Assertions.assertEquals(373907539, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(1344502344, model.hourlySchedule().minute()); - Assertions.assertEquals(179498978109269734L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(374378513, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(2014016933, model.dailySchedule().hour()); - Assertions.assertEquals(792920613, model.dailySchedule().minute()); - Assertions.assertEquals(2792970654371570691L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(1487162894, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("qrhzoymibmrqyib", model.weeklySchedule().day()); - Assertions.assertEquals(1988324847, model.weeklySchedule().hour()); - Assertions.assertEquals(1263635295, model.weeklySchedule().minute()); - Assertions.assertEquals(2799974459561219489L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(1796967394, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("rkwofyyvoqa", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(848769798, model.monthlySchedule().hour()); - Assertions.assertEquals(339045288, model.monthlySchedule().minute()); - Assertions.assertEquals(5359591244102758807L, model.monthlySchedule().usedBytes()); - Assertions.assertTrue(model.enabled()); + Assertions.assertEquals("fnndl", model.location()); + Assertions.assertEquals("rsndsytgadgvra", model.tags().get("aeneqnzarrwl")); + Assertions.assertEquals(1309534736, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(2001921074, model.hourlySchedule().minute()); + Assertions.assertEquals(7831439414407354845L, model.hourlySchedule().usedBytes()); + Assertions.assertEquals(2115532997, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(288092317, model.dailySchedule().hour()); + Assertions.assertEquals(1703781779, model.dailySchedule().minute()); + Assertions.assertEquals(4275294117153207447L, model.dailySchedule().usedBytes()); + Assertions.assertEquals(1307066310, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("iftohqkvpu", model.weeklySchedule().day()); + Assertions.assertEquals(2123821408, model.weeklySchedule().hour()); + Assertions.assertEquals(2143222213, model.weeklySchedule().minute()); + Assertions.assertEquals(2213751776230831712L, model.weeklySchedule().usedBytes()); + Assertions.assertEquals(931393503, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("fsynljphuop", model.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(1015065537, model.monthlySchedule().hour()); + Assertions.assertEquals(596393327, model.monthlySchedule().minute()); + Assertions.assertEquals(2347535510676514797L, model.monthlySchedule().usedBytes()); + Assertions.assertFalse(model.enabled()); } // Use "Map.of" if available 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 15158f56585e..7fcb04b40858 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\":2005026599,\"minute\":532672509,\"usedBytes\":3312819565675205010},\"dailySchedule\":{\"snapshotsToKeep\":346770564,\"hour\":914097739,\"minute\":978047634,\"usedBytes\":5404644626428061791},\"weeklySchedule\":{\"snapshotsToKeep\":60814629,\"day\":\"otbobzdopcj\",\"hour\":546984067,\"minute\":2011097883,\"usedBytes\":453808776382149422},\"monthlySchedule\":{\"snapshotsToKeep\":1518598912,\"daysOfMonth\":\"xrslpm\",\"hour\":2107317095,\"minute\":306696017,\"usedBytes\":4150565343365520377},\"enabled\":false,\"provisioningState\":\"jw\"}") + "{\"hourlySchedule\":{\"snapshotsToKeep\":2064087160,\"minute\":898647722,\"usedBytes\":2472499976183839734},\"dailySchedule\":{\"snapshotsToKeep\":1319201753,\"hour\":24536782,\"minute\":608767660,\"usedBytes\":2987898428568388720},\"weeklySchedule\":{\"snapshotsToKeep\":1655642589,\"day\":\"cpi\",\"hour\":837458643,\"minute\":369750423,\"usedBytes\":8544252603637411760},\"monthlySchedule\":{\"snapshotsToKeep\":1911820344,\"daysOfMonth\":\"nwashrtd\",\"hour\":1226493160,\"minute\":822004718,\"usedBytes\":8545363856594134553},\"enabled\":true,\"provisioningState\":\"ulpiuj\"}") .toObject(SnapshotPolicyProperties.class); - Assertions.assertEquals(2005026599, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(532672509, model.hourlySchedule().minute()); - Assertions.assertEquals(3312819565675205010L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(346770564, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(914097739, model.dailySchedule().hour()); - Assertions.assertEquals(978047634, model.dailySchedule().minute()); - Assertions.assertEquals(5404644626428061791L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(60814629, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("otbobzdopcj", model.weeklySchedule().day()); - Assertions.assertEquals(546984067, model.weeklySchedule().hour()); - Assertions.assertEquals(2011097883, model.weeklySchedule().minute()); - Assertions.assertEquals(453808776382149422L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(1518598912, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("xrslpm", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(2107317095, model.monthlySchedule().hour()); - Assertions.assertEquals(306696017, model.monthlySchedule().minute()); - Assertions.assertEquals(4150565343365520377L, model.monthlySchedule().usedBytes()); - Assertions.assertFalse(model.enabled()); + Assertions.assertEquals(2064087160, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(898647722, model.hourlySchedule().minute()); + Assertions.assertEquals(2472499976183839734L, model.hourlySchedule().usedBytes()); + Assertions.assertEquals(1319201753, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(24536782, model.dailySchedule().hour()); + Assertions.assertEquals(608767660, model.dailySchedule().minute()); + Assertions.assertEquals(2987898428568388720L, model.dailySchedule().usedBytes()); + Assertions.assertEquals(1655642589, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("cpi", model.weeklySchedule().day()); + Assertions.assertEquals(837458643, model.weeklySchedule().hour()); + Assertions.assertEquals(369750423, model.weeklySchedule().minute()); + Assertions.assertEquals(8544252603637411760L, model.weeklySchedule().usedBytes()); + Assertions.assertEquals(1911820344, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("nwashrtd", model.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(1226493160, model.monthlySchedule().hour()); + Assertions.assertEquals(822004718, model.monthlySchedule().minute()); + Assertions.assertEquals(8545363856594134553L, model.monthlySchedule().usedBytes()); + Assertions.assertTrue(model.enabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SnapshotPolicyProperties model = new SnapshotPolicyProperties() - .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(2005026599) - .withMinute(532672509) - .withUsedBytes(3312819565675205010L)) - .withDailySchedule(new DailySchedule().withSnapshotsToKeep(346770564) - .withHour(914097739) - .withMinute(978047634) - .withUsedBytes(5404644626428061791L)) - .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(60814629) - .withDay("otbobzdopcj") - .withHour(546984067) - .withMinute(2011097883) - .withUsedBytes(453808776382149422L)) - .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(1518598912) - .withDaysOfMonth("xrslpm") - .withHour(2107317095) - .withMinute(306696017) - .withUsedBytes(4150565343365520377L)) - .withEnabled(false); + .withHourlySchedule(new HourlySchedule().withSnapshotsToKeep(2064087160) + .withMinute(898647722) + .withUsedBytes(2472499976183839734L)) + .withDailySchedule(new DailySchedule().withSnapshotsToKeep(1319201753) + .withHour(24536782) + .withMinute(608767660) + .withUsedBytes(2987898428568388720L)) + .withWeeklySchedule(new WeeklySchedule().withSnapshotsToKeep(1655642589) + .withDay("cpi") + .withHour(837458643) + .withMinute(369750423) + .withUsedBytes(8544252603637411760L)) + .withMonthlySchedule(new MonthlySchedule().withSnapshotsToKeep(1911820344) + .withDaysOfMonth("nwashrtd") + .withHour(1226493160) + .withMinute(822004718) + .withUsedBytes(8545363856594134553L)) + .withEnabled(true); model = BinaryData.fromObject(model).toObject(SnapshotPolicyProperties.class); - Assertions.assertEquals(2005026599, model.hourlySchedule().snapshotsToKeep()); - Assertions.assertEquals(532672509, model.hourlySchedule().minute()); - Assertions.assertEquals(3312819565675205010L, model.hourlySchedule().usedBytes()); - Assertions.assertEquals(346770564, model.dailySchedule().snapshotsToKeep()); - Assertions.assertEquals(914097739, model.dailySchedule().hour()); - Assertions.assertEquals(978047634, model.dailySchedule().minute()); - Assertions.assertEquals(5404644626428061791L, model.dailySchedule().usedBytes()); - Assertions.assertEquals(60814629, model.weeklySchedule().snapshotsToKeep()); - Assertions.assertEquals("otbobzdopcj", model.weeklySchedule().day()); - Assertions.assertEquals(546984067, model.weeklySchedule().hour()); - Assertions.assertEquals(2011097883, model.weeklySchedule().minute()); - Assertions.assertEquals(453808776382149422L, model.weeklySchedule().usedBytes()); - Assertions.assertEquals(1518598912, model.monthlySchedule().snapshotsToKeep()); - Assertions.assertEquals("xrslpm", model.monthlySchedule().daysOfMonth()); - Assertions.assertEquals(2107317095, model.monthlySchedule().hour()); - Assertions.assertEquals(306696017, model.monthlySchedule().minute()); - Assertions.assertEquals(4150565343365520377L, model.monthlySchedule().usedBytes()); - Assertions.assertFalse(model.enabled()); + Assertions.assertEquals(2064087160, model.hourlySchedule().snapshotsToKeep()); + Assertions.assertEquals(898647722, model.hourlySchedule().minute()); + Assertions.assertEquals(2472499976183839734L, model.hourlySchedule().usedBytes()); + Assertions.assertEquals(1319201753, model.dailySchedule().snapshotsToKeep()); + Assertions.assertEquals(24536782, model.dailySchedule().hour()); + Assertions.assertEquals(608767660, model.dailySchedule().minute()); + Assertions.assertEquals(2987898428568388720L, model.dailySchedule().usedBytes()); + Assertions.assertEquals(1655642589, model.weeklySchedule().snapshotsToKeep()); + Assertions.assertEquals("cpi", model.weeklySchedule().day()); + Assertions.assertEquals(837458643, model.weeklySchedule().hour()); + Assertions.assertEquals(369750423, model.weeklySchedule().minute()); + Assertions.assertEquals(8544252603637411760L, model.weeklySchedule().usedBytes()); + Assertions.assertEquals(1911820344, model.monthlySchedule().snapshotsToKeep()); + Assertions.assertEquals("nwashrtd", model.monthlySchedule().daysOfMonth()); + Assertions.assertEquals(1226493160, model.monthlySchedule().hour()); + Assertions.assertEquals(822004718, model.monthlySchedule().minute()); + Assertions.assertEquals(8545363856594134553L, model.monthlySchedule().usedBytes()); + Assertions.assertTrue(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 2e6f38763cc5..065bfa3912f9 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 @@ -11,8 +11,7 @@ public final class SnapshotPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SnapshotProperties model = BinaryData - .fromString( - "{\"snapshotId\":\"ur\",\"created\":\"2020-12-25T12:19:04Z\",\"provisioningState\":\"wobdagxtibqdx\"}") + .fromString("{\"snapshotId\":\"a\",\"created\":\"2021-05-13T02:02:39Z\",\"provisioningState\":\"n\"}") .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 4c58a08c6467..56f0856a770d 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\":[\"tdum\",\"rp\",\"xe\",\"mnzb\"],\"destinationPath\":\"hjpglkf\"}") + = BinaryData.fromString("{\"filePaths\":[\"kzzlvmbmpaxmodf\"],\"destinationPath\":\"efyw\"}") .toObject(SnapshotRestoreFiles.class); - Assertions.assertEquals("tdum", model.filePaths().get(0)); - Assertions.assertEquals("hjpglkf", model.destinationPath()); + Assertions.assertEquals("kzzlvmbmpaxmodf", model.filePaths().get(0)); + Assertions.assertEquals("efyw", model.destinationPath()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SnapshotRestoreFiles model = new SnapshotRestoreFiles().withFilePaths(Arrays.asList("tdum", "rp", "xe", "mnzb")) - .withDestinationPath("hjpglkf"); + SnapshotRestoreFiles model + = new SnapshotRestoreFiles().withFilePaths(Arrays.asList("kzzlvmbmpaxmodf")).withDestinationPath("efyw"); model = BinaryData.fromObject(model).toObject(SnapshotRestoreFiles.class); - Assertions.assertEquals("tdum", model.filePaths().get(0)); - Assertions.assertEquals("hjpglkf", model.destinationPath()); + Assertions.assertEquals("kzzlvmbmpaxmodf", model.filePaths().get(0)); + Assertions.assertEquals("efyw", 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 fc6bde307ac4..2b3f5532ed5a 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,7 +27,9 @@ 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("qdqx", "bjwgnyfus", "zsvtuikzhajqgl", "fh", "l", com.azure.core.util.Context.NONE); + manager.snapshots() + .delete("ykgsangpszng", "fpgylkve", "jujcngoad", "edmzrgjfoknub", "oitpkpztrgdgx", + 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 b44c3c107468..92de3bea4c1a 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\":\"exaoguya\",\"created\":\"2021-11-04T08:52:55Z\",\"provisioningState\":\"sdaultxij\"},\"location\":\"um\",\"id\":\"waz\",\"name\":\"nqnm\",\"type\":\"jng\"}"; + = "{\"properties\":{\"snapshotId\":\"rftb\",\"created\":\"2021-09-19T09:08:43Z\",\"provisioningState\":\"reuquowtljvf\"},\"location\":\"hreagk\",\"id\":\"xv\",\"name\":\"qtvbczsu\",\"type\":\"mdgglmepjpfs\"}"; 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("aqtferr", "wexjkmfxapjwogq", "nobpudcdabtqwpw", "awbzasqb", "clj", + .getWithResponse("mgzvyfi", "dkz", "qnwsithuqolyah", "uqwqulsutrjbhxyk", "hyqezvqq", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("um", response.location()); + Assertions.assertEquals("hreagk", 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 eab7a07111d4..e455bd08c57d 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\":\"kvntjlrigjkskyri\",\"created\":\"2020-12-31T15:34:24Z\",\"provisioningState\":\"idsxwaabzmifry\"},\"location\":\"znmmaxrizkzobgo\",\"id\":\"lhslnelxieixyn\",\"name\":\"lxecwcrojphslh\",\"type\":\"awjutifd\"}]}"; + = "{\"value\":[{\"properties\":{\"snapshotId\":\"wvskbuhzacaqtylt\",\"created\":\"2021-11-08T08:38:48Z\",\"provisioningState\":\"ujpdsxzak\"},\"location\":\"ejkm\",\"id\":\"iztjof\",\"name\":\"cvovjufyc\",\"type\":\"jmlbemyejiriux\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,8 +32,8 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.snapshots().list("qryxyn", "nzrdpsovwxz", "ptgoeiybbabp", "hv", com.azure.core.util.Context.NONE); + = manager.snapshots().list("coqra", "wugyx", "qi", "we", com.azure.core.util.Context.NONE); - Assertions.assertEquals("znmmaxrizkzobgo", response.iterator().next().location()); + Assertions.assertEquals("ejkm", 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 56d697ba5405..768042a78678 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\":\"kbogqxndlkzgx\",\"created\":\"2021-10-18T16:27:54Z\",\"provisioningState\":\"plbpodxun\"},\"location\":\"bebxmubyyntwl\",\"id\":\"qtkoievs\",\"name\":\"otgqrlltmu\",\"type\":\"lauwzizxbmpgcjef\"}],\"nextLink\":\"muvp\"}") + "{\"value\":[{\"properties\":{\"snapshotId\":\"flrwd\",\"created\":\"2021-03-11T09:23:13Z\",\"provisioningState\":\"xyjrxsagafcnih\"},\"location\":\"wqapnedgfbcvk\",\"id\":\"q\",\"name\":\"pkeqdcvdrhvoo\",\"type\":\"sotbob\"},{\"properties\":{\"snapshotId\":\"pcjwv\",\"created\":\"2021-08-23T07:09:01Z\",\"provisioningState\":\"d\"},\"location\":\"mgxcxrslpm\",\"id\":\"wuoegrpk\",\"name\":\"jw\",\"type\":\"iyq\"}],\"nextLink\":\"uicpd\"}") .toObject(SnapshotsList.class); - Assertions.assertEquals("bebxmubyyntwl", model.value().get(0).location()); - Assertions.assertEquals("muvp", model.nextLink()); + Assertions.assertEquals("wqapnedgfbcvk", model.value().get(0).location()); + Assertions.assertEquals("uicpd", 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 1411bbfe8134..14c7c4ad3f8e 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SnapshotsRestoreFilesMockTests.java @@ -30,9 +30,9 @@ public void testRestoreFiles() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.snapshots() - .restoreFiles("fmvigorqjbttzh", "aglkafhon", "juj", "ickpz", "cpopmxel", - new SnapshotRestoreFiles().withFilePaths(Arrays.asList("clt", "jedexxmlf", "kqscazuawxtzx")) - .withDestinationPath("amwabzxrvxcushsp"), + .restoreFiles("gthortudaw", "pjfe", "qerpptcbgqnzm", "h", "ilialwcjgc", + new SnapshotRestoreFiles().withFilePaths(Arrays.asList("bcccgzpra", "xnyuffatsgftipwc")) + .withDestinationPath("yubhiqdx"), 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 3bcd62c9cbd1..7554e9fd6dfe 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeInfoInnerTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumeInfoInnerTests.java @@ -12,20 +12,20 @@ public final class SubvolumeInfoInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubvolumeInfoInner model = BinaryData.fromString( - "{\"properties\":{\"path\":\"dilmyww\",\"size\":2257431826333496773,\"parentPath\":\"nye\",\"provisioningState\":\"b\"},\"id\":\"vudtjuewbcihx\",\"name\":\"uwhcjyxccybv\",\"type\":\"ayakkudzpx\"}") + "{\"properties\":{\"path\":\"xvgpiude\",\"size\":7118323422467212243,\"parentPath\":\"zec\",\"provisioningState\":\"xw\"},\"id\":\"fykhvuhxepmru\",\"name\":\"znabaobns\",\"type\":\"ujdjltymkmvg\"}") .toObject(SubvolumeInfoInner.class); - Assertions.assertEquals("dilmyww", model.path()); - Assertions.assertEquals(2257431826333496773L, model.size()); - Assertions.assertEquals("nye", model.parentPath()); + Assertions.assertEquals("xvgpiude", model.path()); + Assertions.assertEquals(7118323422467212243L, model.size()); + Assertions.assertEquals("zec", model.parentPath()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SubvolumeInfoInner model - = new SubvolumeInfoInner().withPath("dilmyww").withSize(2257431826333496773L).withParentPath("nye"); + = new SubvolumeInfoInner().withPath("xvgpiude").withSize(7118323422467212243L).withParentPath("zec"); model = BinaryData.fromObject(model).toObject(SubvolumeInfoInner.class); - Assertions.assertEquals("dilmyww", model.path()); - Assertions.assertEquals(2257431826333496773L, model.size()); - Assertions.assertEquals("nye", model.parentPath()); + Assertions.assertEquals("xvgpiude", model.path()); + Assertions.assertEquals(7118323422467212243L, model.size()); + Assertions.assertEquals("zec", 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 20f9f9cece00..268fb898e91b 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\":\"eqvldspast\",\"name\":\"kkdmfl\",\"type\":\"stmjlxrri\",\"properties\":{\"path\":\"apeewchpxlkt\",\"parentPath\":\"uziycsl\",\"size\":5713719406274088628,\"bytesUsed\":7273800949722293579,\"permissions\":\"ktyhjt\",\"creationTimeStamp\":\"2021-04-16T04:24:08Z\",\"accessedTimeStamp\":\"2021-03-02T18:17:10Z\",\"modifiedTimeStamp\":\"2021-05-27T00:20:23Z\",\"changedTimeStamp\":\"2021-06-12T16:16:37Z\",\"provisioningState\":\"mrqzzrrjvpgl\"}}") + "{\"id\":\"qwcabvnui\",\"name\":\"ey\",\"type\":\"wlpaugmrmfjlrxwt\",\"properties\":{\"path\":\"khfkvcisi\",\"parentPath\":\"oaedsxjwuivedwcg\",\"size\":1315574857206700916,\"bytesUsed\":1846640547424370909,\"permissions\":\"bp\",\"creationTimeStamp\":\"2021-08-02T13:45:24Z\",\"accessedTimeStamp\":\"2021-11-26T04:59:44Z\",\"modifiedTimeStamp\":\"2021-02-13T11:33:46Z\",\"changedTimeStamp\":\"2021-11-14T16:38:14Z\",\"provisioningState\":\"jdlrgmsplzgaufc\"}}") .toObject(SubvolumeModelInner.class); - Assertions.assertEquals("apeewchpxlkt", model.path()); - Assertions.assertEquals("uziycsl", model.parentPath()); - Assertions.assertEquals(5713719406274088628L, model.size()); - Assertions.assertEquals(7273800949722293579L, model.bytesUsed()); - Assertions.assertEquals("ktyhjt", model.permissions()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-16T04:24:08Z"), model.creationTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-02T18:17:10Z"), model.accessedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-27T00:20:23Z"), model.modifiedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-12T16:16:37Z"), model.changedTimestamp()); - Assertions.assertEquals("mrqzzrrjvpgl", model.provisioningState()); + Assertions.assertEquals("khfkvcisi", model.path()); + Assertions.assertEquals("oaedsxjwuivedwcg", model.parentPath()); + Assertions.assertEquals(1315574857206700916L, model.size()); + Assertions.assertEquals(1846640547424370909L, model.bytesUsed()); + Assertions.assertEquals("bp", model.permissions()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-02T13:45:24Z"), model.creationTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-26T04:59:44Z"), model.accessedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-13T11:33:46Z"), model.modifiedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-14T16:38:14Z"), model.changedTimestamp()); + Assertions.assertEquals("jdlrgmsplzgaufc", 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 4ecdc8f95c23..e61536b5b4c7 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\":\"zgkrvqe\",\"parentPath\":\"toepryu\",\"size\":2061235851967739080,\"bytesUsed\":4251085007035253174,\"permissions\":\"mov\",\"creationTimeStamp\":\"2021-08-21T09:22:41Z\",\"accessedTimeStamp\":\"2021-05-20T20:20:31Z\",\"modifiedTimeStamp\":\"2021-06-08T04:09:14Z\",\"changedTimeStamp\":\"2021-05-12T09:22:23Z\",\"provisioningState\":\"dflgzuri\"}") + "{\"path\":\"hvn\",\"parentPath\":\"gnxkympqan\",\"size\":2106740942363678235,\"bytesUsed\":6324383483233283447,\"permissions\":\"bta\",\"creationTimeStamp\":\"2021-01-08T15:47:12Z\",\"accessedTimeStamp\":\"2021-03-10T10:02:03Z\",\"modifiedTimeStamp\":\"2021-08-21T15:38:38Z\",\"changedTimeStamp\":\"2021-01-25T20:15:02Z\",\"provisioningState\":\"cyl\"}") .toObject(SubvolumeModelProperties.class); - Assertions.assertEquals("zgkrvqe", model.path()); - Assertions.assertEquals("toepryu", model.parentPath()); - Assertions.assertEquals(2061235851967739080L, model.size()); - Assertions.assertEquals(4251085007035253174L, model.bytesUsed()); - Assertions.assertEquals("mov", model.permissions()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-21T09:22:41Z"), model.creationTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-20T20:20:31Z"), model.accessedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-08T04:09:14Z"), model.modifiedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-12T09:22:23Z"), model.changedTimestamp()); - Assertions.assertEquals("dflgzuri", model.provisioningState()); + Assertions.assertEquals("hvn", model.path()); + Assertions.assertEquals("gnxkympqan", model.parentPath()); + Assertions.assertEquals(2106740942363678235L, model.size()); + Assertions.assertEquals(6324383483233283447L, model.bytesUsed()); + Assertions.assertEquals("bta", model.permissions()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-08T15:47:12Z"), model.creationTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-10T10:02:03Z"), model.accessedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-21T15:38:38Z"), model.modifiedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-25T20:15:02Z"), model.changedTimestamp()); + Assertions.assertEquals("cyl", 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 05228e7af580..b8cf4ca730dc 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\":6255514138294758231,\"path\":\"vbalxlllc\"}") + SubvolumePatchParams model = BinaryData.fromString("{\"size\":7464315318202646424,\"path\":\"xuugqkc\"}") .toObject(SubvolumePatchParams.class); - Assertions.assertEquals(6255514138294758231L, model.size()); - Assertions.assertEquals("vbalxlllc", model.path()); + Assertions.assertEquals(7464315318202646424L, model.size()); + Assertions.assertEquals("xuugqkc", model.path()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SubvolumePatchParams model = new SubvolumePatchParams().withSize(6255514138294758231L).withPath("vbalxlllc"); + SubvolumePatchParams model = new SubvolumePatchParams().withSize(7464315318202646424L).withPath("xuugqkc"); model = BinaryData.fromObject(model).toObject(SubvolumePatchParams.class); - Assertions.assertEquals(6255514138294758231L, model.size()); - Assertions.assertEquals("vbalxlllc", model.path()); + Assertions.assertEquals(7464315318202646424L, model.size()); + Assertions.assertEquals("xuugqkc", 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 1b7df02591f7..c6f43fd90188 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\":472851699764261013,\"path\":\"egfnmntfpmvmemfn\"}}") + = BinaryData.fromString("{\"properties\":{\"size\":5842475212910239296,\"path\":\"riswslmiiio\"}}") .toObject(SubvolumePatchRequest.class); - Assertions.assertEquals(472851699764261013L, model.size()); - Assertions.assertEquals("egfnmntfpmvmemfn", model.path()); + Assertions.assertEquals(5842475212910239296L, model.size()); + Assertions.assertEquals("riswslmiiio", model.path()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SubvolumePatchRequest model - = new SubvolumePatchRequest().withSize(472851699764261013L).withPath("egfnmntfpmvmemfn"); + = new SubvolumePatchRequest().withSize(5842475212910239296L).withPath("riswslmiiio"); model = BinaryData.fromObject(model).toObject(SubvolumePatchRequest.class); - Assertions.assertEquals(472851699764261013L, model.size()); - Assertions.assertEquals("egfnmntfpmvmemfn", model.path()); + Assertions.assertEquals(5842475212910239296L, model.size()); + Assertions.assertEquals("riswslmiiio", 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 2b974cf26bba..d728c8fd6ec5 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,21 @@ public final class SubvolumePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SubvolumeProperties model = BinaryData.fromString( - "{\"path\":\"jplmagstcy\",\"size\":7553431900772779958,\"parentPath\":\"yrkdbdgiogsjkmn\",\"provisioningState\":\"jnobaiyh\"}") + "{\"path\":\"hywartspph\",\"size\":1820358533637729770,\"parentPath\":\"kxdssjpemmucfxh\",\"provisioningState\":\"kflrmymy\"}") .toObject(SubvolumeProperties.class); - Assertions.assertEquals("jplmagstcy", model.path()); - Assertions.assertEquals(7553431900772779958L, model.size()); - Assertions.assertEquals("yrkdbdgiogsjkmn", model.parentPath()); + Assertions.assertEquals("hywartspph", model.path()); + Assertions.assertEquals(1820358533637729770L, model.size()); + Assertions.assertEquals("kxdssjpemmucfxh", model.parentPath()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SubvolumeProperties model = new SubvolumeProperties().withPath("jplmagstcy") - .withSize(7553431900772779958L) - .withParentPath("yrkdbdgiogsjkmn"); + SubvolumeProperties model = new SubvolumeProperties().withPath("hywartspph") + .withSize(1820358533637729770L) + .withParentPath("kxdssjpemmucfxh"); model = BinaryData.fromObject(model).toObject(SubvolumeProperties.class); - Assertions.assertEquals("jplmagstcy", model.path()); - Assertions.assertEquals(7553431900772779958L, model.size()); - Assertions.assertEquals("yrkdbdgiogsjkmn", model.parentPath()); + Assertions.assertEquals("hywartspph", model.path()); + Assertions.assertEquals(1820358533637729770L, model.size()); + Assertions.assertEquals("kxdssjpemmucfxh", 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 d1c3f469a2e1..a8c134f29fb7 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\":\"kympqanxrjkixtw\",\"size\":6067956593612748016,\"parentPath\":\"pnyghs\",\"provisioningState\":\"Succeeded\"},\"id\":\"gmnsghpxy\",\"name\":\"phdrw\",\"type\":\"jkhvyomacluzvxnq\"}"; + = "{\"properties\":{\"path\":\"azz\",\"size\":612372614461236984,\"parentPath\":\"ydjufbnklbl\",\"provisioningState\":\"Succeeded\"},\"id\":\"dabalfdxaglzfytl\",\"name\":\"tlqh\",\"type\":\"pxouvmr\"}"; 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("sx") - .withExistingVolume("ey", "swlpaugmrmfj", "rxwtoaukhfkvc", "sizmoae") - .withPath("ive") - .withSize(5184898420559023748L) - .withParentPath("eewxeiqbpsmg") + .define("sy") + .withExistingVolume("gcwx", "ec", "bwjtrdx", "izagbbgiar") + .withPath("dqxwabzrwiqrxhac") + .withSize(2095551908307218647L) + .withParentPath("qkp") .create(); - Assertions.assertEquals("kympqanxrjkixtw", response.path()); - Assertions.assertEquals(6067956593612748016L, response.size()); - Assertions.assertEquals("pnyghs", response.parentPath()); + Assertions.assertEquals("azz", response.path()); + Assertions.assertEquals(612372614461236984L, response.size()); + Assertions.assertEquals("ydjufbnklbl", 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 1ed8ccb9140e..ca86feab92df 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SubvolumesDeleteMockTests.java @@ -27,8 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.subvolumes() - .delete("ujdjltymkmvg", "ihywartspph", "ixkykxd", "sj", "emmucfxh", com.azure.core.util.Context.NONE); + manager.subvolumes().delete("qwm", "q", "moxsa", "uxejgwecywnfyszz", "czs", 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 0e884953c7f9..be25808a2afb 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\":\"dfrdbi\",\"name\":\"rjgeih\",\"type\":\"lg\",\"properties\":{\"path\":\"iwzcxmjpbyeph\",\"parentPath\":\"t\",\"size\":971495123431334459,\"bytesUsed\":5030460959235510617,\"permissions\":\"fqip\",\"creationTimeStamp\":\"2020-12-22T02:20:11Z\",\"accessedTimeStamp\":\"2021-09-18T18:40:03Z\",\"modifiedTimeStamp\":\"2021-04-01T06:59Z\",\"changedTimeStamp\":\"2021-03-13T21:07:38Z\",\"provisioningState\":\"Succeeded\"}}"; + = "{\"id\":\"p\",\"name\":\"qggweeiwdh\",\"type\":\"n\",\"properties\":{\"path\":\"fzuscstun\",\"parentPath\":\"hxdfbkl\",\"size\":2959052302255831085,\"bytesUsed\":8359403093552012112,\"permissions\":\"ysmvxodgwxf\",\"creationTimeStamp\":\"2021-01-18T02:37:15Z\",\"accessedTimeStamp\":\"2021-05-31T12:02:06Z\",\"modifiedTimeStamp\":\"2021-07-21T22:05Z\",\"changedTimeStamp\":\"2021-01-26T12:06:53Z\",\"provisioningState\":\"Succeeded\"}}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,18 +31,17 @@ public void testGetMetadata() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SubvolumeModel response = manager.subvolumes() - .getMetadata("wzdufypivlsbb", "pmcubkmifoxxkub", "phavpmhbrb", "gvgovpbbttefjo", "nssqyzqed", - com.azure.core.util.Context.NONE); + .getMetadata("b", "iatwfaujegqdtadr", "kgd", "hjkrukizyhgs", "tnqsktx", com.azure.core.util.Context.NONE); - Assertions.assertEquals("iwzcxmjpbyeph", response.path()); - Assertions.assertEquals("t", response.parentPath()); - Assertions.assertEquals(971495123431334459L, response.size()); - Assertions.assertEquals(5030460959235510617L, response.bytesUsed()); - Assertions.assertEquals("fqip", response.permissions()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-22T02:20:11Z"), response.creationTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-18T18:40:03Z"), response.accessedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-01T06:59Z"), response.modifiedTimestamp()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-13T21:07:38Z"), response.changedTimestamp()); + Assertions.assertEquals("fzuscstun", response.path()); + Assertions.assertEquals("hxdfbkl", response.parentPath()); + Assertions.assertEquals(2959052302255831085L, response.size()); + Assertions.assertEquals(8359403093552012112L, response.bytesUsed()); + Assertions.assertEquals("ysmvxodgwxf", response.permissions()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-18T02:37:15Z"), response.creationTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-31T12:02:06Z"), response.accessedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-21T22:05Z"), response.modifiedTimestamp()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-26T12:06:53Z"), 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 e69d132426be..19ee3cf10a4e 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\":\"desqplpvmjcdo\",\"size\":5553919179908601818,\"parentPath\":\"yvteowxvgpiudeu\",\"provisioningState\":\"sxze\"},\"id\":\"axwk\",\"name\":\"fykhvuhxepmru\",\"type\":\"znabaobns\"}"; + = "{\"properties\":{\"path\":\"jue\",\"size\":1238922014101083662,\"parentPath\":\"tsl\",\"provisioningState\":\"tv\"},\"id\":\"nxvgjb\",\"name\":\"iobpnjodf\",\"type\":\"bj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,12 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SubvolumeInfo response = manager.subvolumes() - .getWithResponse("sggux", "eml", "ywaeeczgf", "ukklelss", "blycsxzujksr", com.azure.core.util.Context.NONE) + .getWithResponse("dsaidjanormovdxx", "rntu", "moil", "nwemhdeeljslkyo", "d", + com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("desqplpvmjcdo", response.path()); - Assertions.assertEquals(5553919179908601818L, response.size()); - Assertions.assertEquals("yvteowxvgpiudeu", response.parentPath()); + Assertions.assertEquals("jue", response.path()); + Assertions.assertEquals(1238922014101083662L, response.size()); + Assertions.assertEquals("tsl", 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 f3a6cc0ded64..21d561f36a13 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\":\"otiowlxteqd\",\"size\":5387588961314601515,\"parentPath\":\"dtguk\",\"provisioningState\":\"nblwphqlkcc\"},\"id\":\"gygqwah\",\"name\":\"iul\",\"type\":\"gniiprglvaw\"}]}"; + = "{\"value\":[{\"properties\":{\"path\":\"pmnoejhqlf\",\"size\":2361912450250234564,\"parentPath\":\"oyrfgxk\",\"provisioningState\":\"pmypgfq\"},\"id\":\"tyw\",\"name\":\"lakxpejpewp\",\"type\":\"jlfxampqcrzgeuq\"}]}"; 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("kkflrmymyincqlhr", "s", "sl", "iiiovgqcgxuugq", com.azure.core.util.Context.NONE); + .listByVolume("nqbdnddbboz", "yvrmkjm", "it", "chwudlxee", com.azure.core.util.Context.NONE); - Assertions.assertEquals("otiowlxteqd", response.iterator().next().path()); - Assertions.assertEquals(5387588961314601515L, response.iterator().next().size()); - Assertions.assertEquals("dtguk", response.iterator().next().parentPath()); + Assertions.assertEquals("pmnoejhqlf", response.iterator().next().path()); + Assertions.assertEquals(2361912450250234564L, response.iterator().next().size()); + Assertions.assertEquals("oyrfgxk", 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 206207858e81..49d4896a668c 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\":\"bzevwrd\",\"size\":9209137872063887003,\"parentPath\":\"uvsj\",\"provisioningState\":\"wsmystuluqypf\"},\"id\":\"lerchpq\",\"name\":\"mfpjbabw\",\"type\":\"dfc\"},{\"properties\":{\"path\":\"puunnoxyhkxgqd\",\"size\":944157000221842248,\"parentPath\":\"fhoqca\",\"provisioningState\":\"wdaomdjvlpjxxkzb\"},\"id\":\"sgeivsiy\",\"name\":\"zkdnc\",\"type\":\"dxonbzoggculap\"},{\"properties\":{\"path\":\"rpgogtqxep\",\"size\":4258812781218679511,\"parentPath\":\"uajlyj\",\"provisioningState\":\"vofqzhvfc\"},\"id\":\"yfm\",\"name\":\"wuxrkjpvdwxfzwi\",\"type\":\"vwzjbhyz\"}],\"nextLink\":\"jrkambtrnegvmnv\"}") + "{\"value\":[{\"properties\":{\"path\":\"owlxte\",\"size\":8012734549357722139,\"parentPath\":\"gwdtgukran\",\"provisioningState\":\"wphqlkccuzgygqw\"},\"id\":\"oiulwgniipr\",\"name\":\"lvawuwzdufypivls\",\"type\":\"bjpmcubk\"},{\"properties\":{\"path\":\"oxxkubvp\",\"size\":868428421844201391,\"parentPath\":\"h\",\"provisioningState\":\"bqgvgovpbbtte\"},\"id\":\"oknssqyzqedikdf\",\"name\":\"db\",\"type\":\"qmrjg\"},{\"properties\":{\"path\":\"fqlggw\",\"size\":7547159227117863936,\"parentPath\":\"xmjpbyep\",\"provisioningState\":\"gt\"},\"id\":\"j\",\"name\":\"rc\",\"type\":\"yfqi\"}],\"nextLink\":\"xhnpo\"}") .toObject(SubvolumesList.class); - Assertions.assertEquals("bzevwrd", model.value().get(0).path()); - Assertions.assertEquals(9209137872063887003L, model.value().get(0).size()); - Assertions.assertEquals("uvsj", model.value().get(0).parentPath()); - Assertions.assertEquals("jrkambtrnegvmnv", model.nextLink()); + Assertions.assertEquals("owlxte", model.value().get(0).path()); + Assertions.assertEquals(8012734549357722139L, model.value().get(0).size()); + Assertions.assertEquals("gwdtgukran", model.value().get(0).parentPath()); + Assertions.assertEquals("xhnpo", 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 new file mode 100644 index 000000000000..a3e331f5f54a --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/SuspectFileTests.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.SuspectFile; + +public final class SuspectFileTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SuspectFile model + = BinaryData.fromString("{\"suspectFileName\":\"lmctlpd\",\"fileTimestamp\":\"2021-05-25T04:36:04Z\"}") + .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 9766fbf16b75..28d941483b35 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,8 +11,8 @@ public final class SvmPeerCommandResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SvmPeerCommandResponseInner model = BinaryData.fromString("{\"svmPeeringCommand\":\"mweriofzpy\"}") + SvmPeerCommandResponseInner model = BinaryData.fromString("{\"svmPeeringCommand\":\"lkzgxhuriplbp\"}") .toObject(SvmPeerCommandResponseInner.class); - Assertions.assertEquals("mweriofzpy", model.svmPeeringCommand()); + Assertions.assertEquals("lkzgxhuriplbp", model.svmPeeringCommand()); } } 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 82a42eb4f2bc..fb238ecda0d9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UpdateNetworkSiblingSetRequestTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/UpdateNetworkSiblingSetRequestTests.java @@ -13,24 +13,25 @@ public final class UpdateNetworkSiblingSetRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpdateNetworkSiblingSetRequest model = BinaryData.fromString( - "{\"networkSiblingSetId\":\"m\",\"subnetId\":\"rafwgckhocxvdf\",\"networkSiblingSetStateId\":\"fwafqrouda\",\"networkFeatures\":\"Standard\"}") + "{\"networkSiblingSetId\":\"jelaqacigele\",\"subnetId\":\"hdbvqvwzkjop\",\"networkSiblingSetStateId\":\"beonrlkwzdq\",\"networkFeatures\":\"Standard\"}") .toObject(UpdateNetworkSiblingSetRequest.class); - Assertions.assertEquals("m", model.networkSiblingSetId()); - Assertions.assertEquals("rafwgckhocxvdf", model.subnetId()); - Assertions.assertEquals("fwafqrouda", model.networkSiblingSetStateId()); + Assertions.assertEquals("jelaqacigele", model.networkSiblingSetId()); + Assertions.assertEquals("hdbvqvwzkjop", model.subnetId()); + Assertions.assertEquals("beonrlkwzdq", model.networkSiblingSetStateId()); Assertions.assertEquals(NetworkFeatures.STANDARD, model.networkFeatures()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UpdateNetworkSiblingSetRequest model = new UpdateNetworkSiblingSetRequest().withNetworkSiblingSetId("m") - .withSubnetId("rafwgckhocxvdf") - .withNetworkSiblingSetStateId("fwafqrouda") - .withNetworkFeatures(NetworkFeatures.STANDARD); + UpdateNetworkSiblingSetRequest model + = new UpdateNetworkSiblingSetRequest().withNetworkSiblingSetId("jelaqacigele") + .withSubnetId("hdbvqvwzkjop") + .withNetworkSiblingSetStateId("beonrlkwzdq") + .withNetworkFeatures(NetworkFeatures.STANDARD); model = BinaryData.fromObject(model).toObject(UpdateNetworkSiblingSetRequest.class); - Assertions.assertEquals("m", model.networkSiblingSetId()); - Assertions.assertEquals("rafwgckhocxvdf", model.subnetId()); - Assertions.assertEquals("fwafqrouda", model.networkSiblingSetStateId()); + Assertions.assertEquals("jelaqacigele", model.networkSiblingSetId()); + Assertions.assertEquals("hdbvqvwzkjop", model.subnetId()); + Assertions.assertEquals("beonrlkwzdq", 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 2cc0b06a6022..9708a6f18a28 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\":\"cp\",\"localizedValue\":\"wkhihihlhzdsqt\"}") + UsageName model = BinaryData.fromString("{\"value\":\"cawetzqddt\",\"localizedValue\":\"fljhznamtua\"}") .toObject(UsageName.class); - Assertions.assertEquals("cp", model.value()); - Assertions.assertEquals("wkhihihlhzdsqt", model.localizedValue()); + Assertions.assertEquals("cawetzqddt", model.value()); + Assertions.assertEquals("fljhznamtua", 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 e020d4ad97ac..b471fe40deb3 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 @@ -10,7 +10,8 @@ public final class UsagePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UsageProperties model = BinaryData.fromString("{\"currentValue\":19838939,\"limit\":1553526894,\"unit\":\"o\"}") - .toObject(UsageProperties.class); + UsageProperties model + = BinaryData.fromString("{\"currentValue\":510933333,\"limit\":1222277856,\"unit\":\"jncqtjzmi\"}") + .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 145324dd1fad..2e185a89c038 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\":\"pysownbt\",\"name\":{\"value\":\"u\",\"localizedValue\":\"jqctojcmisofie\"},\"properties\":{\"currentValue\":697365196,\"limit\":419692653,\"unit\":\"qdhcu\"}}") + "{\"id\":\"nzxojpslsvjgpli\",\"name\":{\"value\":\"qwoyxqvapco\",\"localizedValue\":\"oucqpqojx\"},\"properties\":{\"currentValue\":2079376859,\"limit\":1211058395,\"unit\":\"gdzbenr\"}}") .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 ab069030b2e2..fcfcc88e5740 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\":\"ehhr\",\"name\":{\"value\":\"unzo\",\"localizedValue\":\"dhcxgkmoy\"},\"properties\":{\"currentValue\":1357025963,\"limit\":1627365000,\"unit\":\"hmfdnbzydvfvfcj\"}},{\"id\":\"eoisrvhmgor\",\"name\":{\"value\":\"kiscvwmzhwpl\",\"localizedValue\":\"a\"},\"properties\":{\"currentValue\":1880007503,\"limit\":1897852291,\"unit\":\"tg\"}},{\"id\":\"nzeyqxtjj\",\"name\":{\"value\":\"lqhy\",\"localizedValue\":\"vodggxdbee\"},\"properties\":{\"currentValue\":1362863960,\"limit\":1356434972,\"unit\":\"ra\"}},{\"id\":\"aawiuagydwqfb\",\"name\":{\"value\":\"rfgi\",\"localizedValue\":\"tcojocqwo\"},\"properties\":{\"currentValue\":681423135,\"limit\":1685240406,\"unit\":\"sfzldmoz\"}}],\"nextLink\":\"ylfsbtk\"}") + "{\"value\":[{\"id\":\"eakxcptsoqfyi\",\"name\":{\"value\":\"qc\",\"localizedValue\":\"rttzrazisgykiu\"},\"properties\":{\"currentValue\":1740485415,\"limit\":920951306,\"unit\":\"zohmnrxxbs\"}}],\"nextLink\":\"klinhmdptysprq\"}") .toObject(UsagesListResult.class); - Assertions.assertEquals("ylfsbtk", model.nextLink()); + Assertions.assertEquals("klinhmdptysprq", 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 cc4a3aaea029..a41185f0b463 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\":\"1f1bce88-51a7-49df-8c34-f102fc2a3b7b\",\"clientId\":\"ad68af57-215c-4c2c-ae08-21dfc156ffce\"}") + "{\"principalId\":\"2cae6c54-b9c9-412f-b379-dff135caac60\",\"clientId\":\"2cffc504-afaf-42a9-a6b8-c3e0d55fc353\"}") .toObject(UserAssignedIdentity.class); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupPropertiesTests.java index 6654ab2c2e12..71188d4776fe 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupPropertiesTests.java @@ -12,21 +12,21 @@ public final class VolumeBackupPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeBackupProperties model = BinaryData - .fromString("{\"backupPolicyId\":\"onuq\",\"policyEnforced\":false,\"backupVaultId\":\"beypewrmjmw\"}") + .fromString("{\"backupPolicyId\":\"ektcxsen\",\"policyEnforced\":false,\"backupVaultId\":\"s\"}") .toObject(VolumeBackupProperties.class); - Assertions.assertEquals("onuq", model.backupPolicyId()); + Assertions.assertEquals("ektcxsen", model.backupPolicyId()); Assertions.assertFalse(model.policyEnforced()); - Assertions.assertEquals("beypewrmjmw", model.backupVaultId()); + Assertions.assertEquals("s", model.backupVaultId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumeBackupProperties model = new VolumeBackupProperties().withBackupPolicyId("onuq") + VolumeBackupProperties model = new VolumeBackupProperties().withBackupPolicyId("ektcxsen") .withPolicyEnforced(false) - .withBackupVaultId("beypewrmjmw"); + .withBackupVaultId("s"); model = BinaryData.fromObject(model).toObject(VolumeBackupProperties.class); - Assertions.assertEquals("onuq", model.backupPolicyId()); + Assertions.assertEquals("ektcxsen", model.backupPolicyId()); Assertions.assertFalse(model.policyEnforced()); - Assertions.assertEquals("beypewrmjmw", model.backupVaultId()); + Assertions.assertEquals("s", model.backupVaultId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupsTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeBackupsTests.java index 83903dcc5279..a7f5f8c06dca 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\":\"fatpxllrxcyjmoa\",\"volumeResourceId\":\"uvarmywdmjsjq\",\"backupsCount\":1756269391,\"policyEnabled\":true}") + "{\"volumeName\":\"kojvd\",\"volumeResourceId\":\"zfoqouicybxar\",\"backupsCount\":1685402148,\"policyEnabled\":false}") .toObject(VolumeBackups.class); - Assertions.assertEquals("fatpxllrxcyjmoa", model.volumeName()); - Assertions.assertEquals("uvarmywdmjsjq", model.volumeResourceId()); - Assertions.assertEquals(1756269391, model.backupsCount()); - Assertions.assertTrue(model.policyEnabled()); + Assertions.assertEquals("kojvd", model.volumeName()); + Assertions.assertEquals("zfoqouicybxar", model.volumeResourceId()); + Assertions.assertEquals(1685402148, 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 4d9421247178..37c44d915f6f 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeGroupsDeleteMockTests.java @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.volumeGroups().delete("vmm", "npqfrtqlkzmeg", "itgvkx", com.azure.core.util.Context.NONE); + manager.volumeGroups().delete("ewdogiyetesy", "vidbztjhqtfb", "vnynkb", com.azure.core.util.Context.NONE); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesDataProtectionTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesDataProtectionTests.java index 4e2f4b3db7b9..e4954078d175 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesDataProtectionTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesDataProtectionTests.java @@ -5,6 +5,8 @@ package com.azure.resourcemanager.netapp.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.DesiredRansomwareProtectionState; +import com.azure.resourcemanager.netapp.models.RansomwareProtectionPatchSettings; import com.azure.resourcemanager.netapp.models.VolumeBackupProperties; import com.azure.resourcemanager.netapp.models.VolumePatchPropertiesDataProtection; import com.azure.resourcemanager.netapp.models.VolumeSnapshotProperties; @@ -14,25 +16,31 @@ public final class VolumePatchPropertiesDataProtectionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumePatchPropertiesDataProtection model = BinaryData.fromString( - "{\"backup\":{\"backupPolicyId\":\"vxysl\",\"policyEnforced\":true,\"backupVaultId\":\"fxoblytkb\"},\"snapshot\":{\"snapshotPolicyId\":\"ewwwfbkrvrnsv\"}}") + "{\"backup\":{\"backupPolicyId\":\"hin\",\"policyEnforced\":false,\"backupVaultId\":\"mifthnzdnd\"},\"snapshot\":{\"snapshotPolicyId\":\"nayqi\"},\"ransomwareProtection\":{\"desiredRansomwareProtectionState\":\"Enabled\"}}") .toObject(VolumePatchPropertiesDataProtection.class); - Assertions.assertEquals("vxysl", model.backup().backupPolicyId()); - Assertions.assertTrue(model.backup().policyEnforced()); - Assertions.assertEquals("fxoblytkb", model.backup().backupVaultId()); - Assertions.assertEquals("ewwwfbkrvrnsv", model.snapshot().snapshotPolicyId()); + Assertions.assertEquals("hin", model.backup().backupPolicyId()); + Assertions.assertFalse(model.backup().policyEnforced()); + Assertions.assertEquals("mifthnzdnd", model.backup().backupVaultId()); + Assertions.assertEquals("nayqi", model.snapshot().snapshotPolicyId()); + Assertions.assertEquals(DesiredRansomwareProtectionState.ENABLED, + model.ransomwareProtection().desiredRansomwareProtectionState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VolumePatchPropertiesDataProtection model = new VolumePatchPropertiesDataProtection() - .withBackup(new VolumeBackupProperties().withBackupPolicyId("vxysl") - .withPolicyEnforced(true) - .withBackupVaultId("fxoblytkb")) - .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("ewwwfbkrvrnsv")); + .withBackup(new VolumeBackupProperties().withBackupPolicyId("hin") + .withPolicyEnforced(false) + .withBackupVaultId("mifthnzdnd")) + .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("nayqi")) + .withRansomwareProtection(new RansomwareProtectionPatchSettings() + .withDesiredRansomwareProtectionState(DesiredRansomwareProtectionState.ENABLED)); model = BinaryData.fromObject(model).toObject(VolumePatchPropertiesDataProtection.class); - Assertions.assertEquals("vxysl", model.backup().backupPolicyId()); - Assertions.assertTrue(model.backup().policyEnforced()); - Assertions.assertEquals("fxoblytkb", model.backup().backupVaultId()); - Assertions.assertEquals("ewwwfbkrvrnsv", model.snapshot().snapshotPolicyId()); + Assertions.assertEquals("hin", model.backup().backupPolicyId()); + Assertions.assertFalse(model.backup().policyEnforced()); + Assertions.assertEquals("mifthnzdnd", model.backup().backupVaultId()); + Assertions.assertEquals("nayqi", model.snapshot().snapshotPolicyId()); + Assertions.assertEquals(DesiredRansomwareProtectionState.ENABLED, + 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 496d66640c74..ae03a5d6509c 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,88 +15,103 @@ public final class VolumePatchPropertiesExportPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumePatchPropertiesExportPolicy model = BinaryData.fromString( - "{\"rules\":[{\"ruleIndex\":1990032205,\"unixReadOnly\":true,\"unixReadWrite\":false,\"kerberos5ReadOnly\":false,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":true,\"cifs\":true,\"nfsv3\":false,\"nfsv41\":true,\"allowedClients\":\"grcfb\",\"hasRootAccess\":true,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":1710295425,\"unixReadOnly\":false,\"unixReadWrite\":true,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":false,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":true,\"kerberos5pReadWrite\":false,\"cifs\":true,\"nfsv3\":false,\"nfsv41\":false,\"allowedClients\":\"r\",\"hasRootAccess\":true,\"chownMode\":\"Unrestricted\"},{\"ruleIndex\":1314959549,\"unixReadOnly\":true,\"unixReadWrite\":true,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":false,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":false,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"tdo\",\"hasRootAccess\":true,\"chownMode\":\"Restricted\"}]}") + "{\"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\"}]}") .toObject(VolumePatchPropertiesExportPolicy.class); - Assertions.assertEquals(1990032205, model.rules().get(0).ruleIndex()); + Assertions.assertEquals(928990245, model.rules().get(0).ruleIndex()); Assertions.assertTrue(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).unixReadWrite()); + Assertions.assertTrue(model.rules().get(0).kerberos5ReadOnly()); Assertions.assertFalse(model.rules().get(0).kerberos5ReadWrite()); - Assertions.assertTrue(model.rules().get(0).kerberos5IReadOnly()); + Assertions.assertFalse(model.rules().get(0).kerberos5IReadOnly()); Assertions.assertFalse(model.rules().get(0).kerberos5IReadWrite()); - Assertions.assertTrue(model.rules().get(0).kerberos5PReadOnly()); + Assertions.assertFalse(model.rules().get(0).kerberos5PReadOnly()); Assertions.assertTrue(model.rules().get(0).kerberos5PReadWrite()); Assertions.assertTrue(model.rules().get(0).cifs()); - Assertions.assertFalse(model.rules().get(0).nfsv3()); - Assertions.assertTrue(model.rules().get(0).nfsv41()); - Assertions.assertEquals("grcfb", model.rules().get(0).allowedClients()); + Assertions.assertTrue(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.UNRESTRICTED, model.rules().get(0).chownMode()); + Assertions.assertEquals(ChownMode.RESTRICTED, model.rules().get(0).chownMode()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VolumePatchPropertiesExportPolicy model = new VolumePatchPropertiesExportPolicy().withRules(Arrays.asList( - new ExportPolicyRule().withRuleIndex(1990032205) + new ExportPolicyRule().withRuleIndex(928990245) .withUnixReadOnly(true) - .withUnixReadWrite(false) - .withKerberos5ReadOnly(false) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(true) .withKerberos5ReadWrite(false) - .withKerberos5IReadOnly(true) + .withKerberos5IReadOnly(false) .withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(true) + .withKerberos5PReadOnly(false) .withKerberos5PReadWrite(true) .withCifs(true) - .withNfsv3(false) - .withNfsv41(true) - .withAllowedClients("grcfb") + .withNfsv3(true) + .withNfsv41(false) + .withAllowedClients("lyt") .withHasRootAccess(true) - .withChownMode(ChownMode.UNRESTRICTED), - new ExportPolicyRule().withRuleIndex(1710295425) - .withUnixReadOnly(false) + .withChownMode(ChownMode.RESTRICTED), + new ExportPolicyRule().withRuleIndex(1854550992) + .withUnixReadOnly(true) .withUnixReadWrite(true) .withKerberos5ReadOnly(true) .withKerberos5ReadWrite(false) - .withKerberos5IReadOnly(false) + .withKerberos5IReadOnly(true) + .withKerberos5IReadWrite(true) + .withKerberos5PReadOnly(false) + .withKerberos5PReadWrite(true) + .withCifs(false) + .withNfsv3(true) + .withNfsv41(true) + .withAllowedClients("ovasrruvwbhsqfsu") + .withHasRootAccess(false) + .withChownMode(ChownMode.RESTRICTED), + new ExportPolicyRule().withRuleIndex(1379318840) + .withUnixReadOnly(true) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(true) + .withKerberos5ReadWrite(true) + .withKerberos5IReadOnly(true) .withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(true) + .withKerberos5PReadOnly(false) .withKerberos5PReadWrite(false) - .withCifs(true) - .withNfsv3(false) + .withCifs(false) + .withNfsv3(true) .withNfsv41(false) - .withAllowedClients("r") + .withAllowedClients("zbexilzznfqqnvw") .withHasRootAccess(true) .withChownMode(ChownMode.UNRESTRICTED), - new ExportPolicyRule().withRuleIndex(1314959549) + new ExportPolicyRule().withRuleIndex(930552751) .withUnixReadOnly(true) .withUnixReadWrite(true) - .withKerberos5ReadOnly(true) + .withKerberos5ReadOnly(false) .withKerberos5ReadWrite(false) .withKerberos5IReadOnly(true) - .withKerberos5IReadWrite(false) + .withKerberos5IReadWrite(true) .withKerberos5PReadOnly(false) .withKerberos5PReadWrite(false) - .withCifs(true) + .withCifs(false) .withNfsv3(true) .withNfsv41(true) - .withAllowedClients("tdo") - .withHasRootAccess(true) + .withAllowedClients("rjerv") + .withHasRootAccess(false) .withChownMode(ChownMode.RESTRICTED))); model = BinaryData.fromObject(model).toObject(VolumePatchPropertiesExportPolicy.class); - Assertions.assertEquals(1990032205, model.rules().get(0).ruleIndex()); + Assertions.assertEquals(928990245, model.rules().get(0).ruleIndex()); Assertions.assertTrue(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).unixReadWrite()); + Assertions.assertTrue(model.rules().get(0).kerberos5ReadOnly()); Assertions.assertFalse(model.rules().get(0).kerberos5ReadWrite()); - Assertions.assertTrue(model.rules().get(0).kerberos5IReadOnly()); + Assertions.assertFalse(model.rules().get(0).kerberos5IReadOnly()); Assertions.assertFalse(model.rules().get(0).kerberos5IReadWrite()); - Assertions.assertTrue(model.rules().get(0).kerberos5PReadOnly()); + Assertions.assertFalse(model.rules().get(0).kerberos5PReadOnly()); Assertions.assertTrue(model.rules().get(0).kerberos5PReadWrite()); Assertions.assertTrue(model.rules().get(0).cifs()); - Assertions.assertFalse(model.rules().get(0).nfsv3()); - Assertions.assertTrue(model.rules().get(0).nfsv41()); - Assertions.assertEquals("grcfb", model.rules().get(0).allowedClients()); + Assertions.assertTrue(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.UNRESTRICTED, model.rules().get(0).chownMode()); + Assertions.assertEquals(ChownMode.RESTRICTED, model.rules().get(0).chownMode()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchPropertiesTests.java index 69616e9cef5b..35c4d2e7b9c1 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 @@ -9,7 +9,9 @@ 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.RansomwareProtectionPatchSettings; import com.azure.resourcemanager.netapp.models.ServiceLevel; import com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration; import com.azure.resourcemanager.netapp.models.SmbNonBrowsable; @@ -24,115 +26,151 @@ public final class VolumePatchPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumePatchProperties model = BinaryData.fromString( - "{\"serviceLevel\":\"Standard\",\"usageThreshold\":8523587026698323408,\"exportPolicy\":{\"rules\":[{\"ruleIndex\":2120108327,\"unixReadOnly\":false,\"unixReadWrite\":false,\"kerberos5ReadOnly\":true,\"kerberos5ReadWrite\":true,\"kerberos5iReadOnly\":true,\"kerberos5iReadWrite\":false,\"kerberos5pReadOnly\":false,\"kerberos5pReadWrite\":false,\"cifs\":true,\"nfsv3\":true,\"nfsv41\":true,\"allowedClients\":\"pnyiropuhp\",\"hasRootAccess\":true,\"chownMode\":\"Unrestricted\"}]},\"protocolTypes\":[\"gqgitxmedjvcsl\"],\"throughputMibps\":31.70938,\"dataProtection\":{\"backup\":{\"backupPolicyId\":\"cwzzhxgktr\",\"policyEnforced\":true,\"backupVaultId\":\"napkteoellw\"},\"snapshot\":{\"snapshotPolicyId\":\"d\"}},\"isDefaultQuotaEnabled\":true,\"defaultUserQuotaInKiBs\":4189677250965468268,\"defaultGroupQuotaInKiBs\":1621994351674627524,\"unixPermissions\":\"op\",\"coolAccess\":false,\"coolnessPeriod\":1219903446,\"coolAccessRetrievalPolicy\":\"OnRead\",\"coolAccessTieringPolicy\":\"Auto\",\"snapshotDirectoryVisible\":true,\"smbAccessBasedEnumeration\":\"Disabled\",\"smbNonBrowsable\":\"Disabled\"}") + "{\"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\"}") .toObject(VolumePatchProperties.class); - Assertions.assertEquals(ServiceLevel.STANDARD, model.serviceLevel()); - Assertions.assertEquals(8523587026698323408L, model.usageThreshold()); - Assertions.assertEquals(2120108327, model.exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ServiceLevel.STANDARD_ZRS, model.serviceLevel()); + Assertions.assertEquals(1865985112447305959L, model.usageThreshold()); + Assertions.assertEquals(2006567111, model.exportPolicy().rules().get(0).ruleIndex()); Assertions.assertFalse(model.exportPolicy().rules().get(0).unixReadOnly()); Assertions.assertFalse(model.exportPolicy().rules().get(0).unixReadWrite()); - Assertions.assertTrue(model.exportPolicy().rules().get(0).kerberos5ReadOnly()); + 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.assertFalse(model.exportPolicy().rules().get(0).kerberos5IReadWrite()); - Assertions.assertFalse(model.exportPolicy().rules().get(0).kerberos5PReadOnly()); + 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.assertTrue(model.exportPolicy().rules().get(0).cifs()); - Assertions.assertTrue(model.exportPolicy().rules().get(0).nfsv3()); - Assertions.assertTrue(model.exportPolicy().rules().get(0).nfsv41()); - Assertions.assertEquals("pnyiropuhp", model.exportPolicy().rules().get(0).allowedClients()); + Assertions.assertFalse(model.exportPolicy().rules().get(0).nfsv3()); + Assertions.assertFalse(model.exportPolicy().rules().get(0).nfsv41()); + Assertions.assertEquals("igvpgylg", 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("gqgitxmedjvcsl", model.protocolTypes().get(0)); - Assertions.assertEquals(31.70938F, model.throughputMibps()); - Assertions.assertEquals("cwzzhxgktr", model.dataProtection().backup().backupPolicyId()); + Assertions.assertEquals("ctobg", model.protocolTypes().get(0)); + Assertions.assertEquals(62.614918F, model.throughputMibps()); + Assertions.assertEquals("zpostmgrcfbu", model.dataProtection().backup().backupPolicyId()); Assertions.assertTrue(model.dataProtection().backup().policyEnforced()); - Assertions.assertEquals("napkteoellw", model.dataProtection().backup().backupVaultId()); - Assertions.assertEquals("d", model.dataProtection().snapshot().snapshotPolicyId()); + Assertions.assertEquals("qjhhkxbpv", model.dataProtection().backup().backupVaultId()); + Assertions.assertEquals("jhxxjyn", model.dataProtection().snapshot().snapshotPolicyId()); + Assertions.assertEquals(DesiredRansomwareProtectionState.DISABLED, + model.dataProtection().ransomwareProtection().desiredRansomwareProtectionState()); Assertions.assertTrue(model.isDefaultQuotaEnabled()); - Assertions.assertEquals(4189677250965468268L, model.defaultUserQuotaInKiBs()); - Assertions.assertEquals(1621994351674627524L, model.defaultGroupQuotaInKiBs()); - Assertions.assertEquals("op", model.unixPermissions()); - Assertions.assertFalse(model.coolAccess()); - Assertions.assertEquals(1219903446, model.coolnessPeriod()); - Assertions.assertEquals(CoolAccessRetrievalPolicy.ON_READ, model.coolAccessRetrievalPolicy()); + Assertions.assertEquals(4307954737438243119L, model.defaultUserQuotaInKiBs()); + Assertions.assertEquals(4478371279557844955L, model.defaultGroupQuotaInKiBs()); + Assertions.assertEquals("zvszj", model.unixPermissions()); + Assertions.assertTrue(model.coolAccess()); + Assertions.assertEquals(34322019, model.coolnessPeriod()); + Assertions.assertEquals(CoolAccessRetrievalPolicy.DEFAULT, model.coolAccessRetrievalPolicy()); Assertions.assertEquals(CoolAccessTieringPolicy.AUTO, model.coolAccessTieringPolicy()); - Assertions.assertTrue(model.snapshotDirectoryVisible()); + Assertions.assertFalse(model.snapshotDirectoryVisible()); Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumeration()); Assertions.assertEquals(SmbNonBrowsable.DISABLED, model.smbNonBrowsable()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumePatchProperties model = new VolumePatchProperties().withServiceLevel(ServiceLevel.STANDARD) - .withUsageThreshold(8523587026698323408L) - .withExportPolicy(new VolumePatchPropertiesExportPolicy() - .withRules(Arrays.asList(new ExportPolicyRule().withRuleIndex(2120108327) + VolumePatchProperties model = new VolumePatchProperties().withServiceLevel(ServiceLevel.STANDARD_ZRS) + .withUsageThreshold(1865985112447305959L) + .withExportPolicy(new VolumePatchPropertiesExportPolicy().withRules(Arrays.asList( + new ExportPolicyRule().withRuleIndex(2006567111) .withUnixReadOnly(false) .withUnixReadWrite(false) - .withKerberos5ReadOnly(true) + .withKerberos5ReadOnly(false) .withKerberos5ReadWrite(true) .withKerberos5IReadOnly(true) - .withKerberos5IReadWrite(false) - .withKerberos5PReadOnly(false) + .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) .withNfsv3(true) - .withNfsv41(true) - .withAllowedClients("pnyiropuhp") + .withNfsv41(false) + .withAllowedClients("gucnapkte") + .withHasRootAccess(false) + .withChownMode(ChownMode.RESTRICTED), + new ExportPolicyRule().withRuleIndex(207287294) + .withUnixReadOnly(false) + .withUnixReadWrite(true) + .withKerberos5ReadOnly(true) + .withKerberos5ReadWrite(false) + .withKerberos5IReadOnly(false) + .withKerberos5IReadWrite(true) + .withKerberos5PReadOnly(true) + .withKerberos5PReadWrite(true) + .withCifs(true) + .withNfsv3(false) + .withNfsv41(false) + .withAllowedClients("pppcqeqxo") .withHasRootAccess(true) - .withChownMode(ChownMode.UNRESTRICTED)))) - .withProtocolTypes(Arrays.asList("gqgitxmedjvcsl")) - .withThroughputMibps(31.70938F) + .withChownMode(ChownMode.RESTRICTED)))) + .withProtocolTypes(Arrays.asList("ctobg")) + .withThroughputMibps(62.614918F) .withDataProtection(new VolumePatchPropertiesDataProtection() - .withBackup(new VolumeBackupProperties().withBackupPolicyId("cwzzhxgktr") + .withBackup(new VolumeBackupProperties().withBackupPolicyId("zpostmgrcfbu") .withPolicyEnforced(true) - .withBackupVaultId("napkteoellw")) - .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("d"))) + .withBackupVaultId("qjhhkxbpv")) + .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("jhxxjyn")) + .withRansomwareProtection(new RansomwareProtectionPatchSettings() + .withDesiredRansomwareProtectionState(DesiredRansomwareProtectionState.DISABLED))) .withIsDefaultQuotaEnabled(true) - .withDefaultUserQuotaInKiBs(4189677250965468268L) - .withDefaultGroupQuotaInKiBs(1621994351674627524L) - .withUnixPermissions("op") - .withCoolAccess(false) - .withCoolnessPeriod(1219903446) - .withCoolAccessRetrievalPolicy(CoolAccessRetrievalPolicy.ON_READ) + .withDefaultUserQuotaInKiBs(4307954737438243119L) + .withDefaultGroupQuotaInKiBs(4478371279557844955L) + .withUnixPermissions("zvszj") + .withCoolAccess(true) + .withCoolnessPeriod(34322019) + .withCoolAccessRetrievalPolicy(CoolAccessRetrievalPolicy.DEFAULT) .withCoolAccessTieringPolicy(CoolAccessTieringPolicy.AUTO) - .withSnapshotDirectoryVisible(true) + .withSnapshotDirectoryVisible(false) .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) .withSmbNonBrowsable(SmbNonBrowsable.DISABLED); model = BinaryData.fromObject(model).toObject(VolumePatchProperties.class); - Assertions.assertEquals(ServiceLevel.STANDARD, model.serviceLevel()); - Assertions.assertEquals(8523587026698323408L, model.usageThreshold()); - Assertions.assertEquals(2120108327, model.exportPolicy().rules().get(0).ruleIndex()); + Assertions.assertEquals(ServiceLevel.STANDARD_ZRS, model.serviceLevel()); + Assertions.assertEquals(1865985112447305959L, model.usageThreshold()); + Assertions.assertEquals(2006567111, model.exportPolicy().rules().get(0).ruleIndex()); Assertions.assertFalse(model.exportPolicy().rules().get(0).unixReadOnly()); Assertions.assertFalse(model.exportPolicy().rules().get(0).unixReadWrite()); - Assertions.assertTrue(model.exportPolicy().rules().get(0).kerberos5ReadOnly()); + 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.assertFalse(model.exportPolicy().rules().get(0).kerberos5IReadWrite()); - Assertions.assertFalse(model.exportPolicy().rules().get(0).kerberos5PReadOnly()); + 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.assertTrue(model.exportPolicy().rules().get(0).cifs()); - Assertions.assertTrue(model.exportPolicy().rules().get(0).nfsv3()); - Assertions.assertTrue(model.exportPolicy().rules().get(0).nfsv41()); - Assertions.assertEquals("pnyiropuhp", model.exportPolicy().rules().get(0).allowedClients()); + Assertions.assertFalse(model.exportPolicy().rules().get(0).nfsv3()); + Assertions.assertFalse(model.exportPolicy().rules().get(0).nfsv41()); + Assertions.assertEquals("igvpgylg", 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("gqgitxmedjvcsl", model.protocolTypes().get(0)); - Assertions.assertEquals(31.70938F, model.throughputMibps()); - Assertions.assertEquals("cwzzhxgktr", model.dataProtection().backup().backupPolicyId()); + Assertions.assertEquals("ctobg", model.protocolTypes().get(0)); + Assertions.assertEquals(62.614918F, model.throughputMibps()); + Assertions.assertEquals("zpostmgrcfbu", model.dataProtection().backup().backupPolicyId()); Assertions.assertTrue(model.dataProtection().backup().policyEnforced()); - Assertions.assertEquals("napkteoellw", model.dataProtection().backup().backupVaultId()); - Assertions.assertEquals("d", model.dataProtection().snapshot().snapshotPolicyId()); + Assertions.assertEquals("qjhhkxbpv", model.dataProtection().backup().backupVaultId()); + Assertions.assertEquals("jhxxjyn", model.dataProtection().snapshot().snapshotPolicyId()); + Assertions.assertEquals(DesiredRansomwareProtectionState.DISABLED, + model.dataProtection().ransomwareProtection().desiredRansomwareProtectionState()); Assertions.assertTrue(model.isDefaultQuotaEnabled()); - Assertions.assertEquals(4189677250965468268L, model.defaultUserQuotaInKiBs()); - Assertions.assertEquals(1621994351674627524L, model.defaultGroupQuotaInKiBs()); - Assertions.assertEquals("op", model.unixPermissions()); - Assertions.assertFalse(model.coolAccess()); - Assertions.assertEquals(1219903446, model.coolnessPeriod()); - Assertions.assertEquals(CoolAccessRetrievalPolicy.ON_READ, model.coolAccessRetrievalPolicy()); + Assertions.assertEquals(4307954737438243119L, model.defaultUserQuotaInKiBs()); + Assertions.assertEquals(4478371279557844955L, model.defaultGroupQuotaInKiBs()); + Assertions.assertEquals("zvszj", model.unixPermissions()); + Assertions.assertTrue(model.coolAccess()); + Assertions.assertEquals(34322019, model.coolnessPeriod()); + Assertions.assertEquals(CoolAccessRetrievalPolicy.DEFAULT, model.coolAccessRetrievalPolicy()); Assertions.assertEquals(CoolAccessTieringPolicy.AUTO, model.coolAccessTieringPolicy()); - Assertions.assertTrue(model.snapshotDirectoryVisible()); + Assertions.assertFalse(model.snapshotDirectoryVisible()); Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumeration()); Assertions.assertEquals(SmbNonBrowsable.DISABLED, model.smbNonBrowsable()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePatchTests.java index d0c4765b70e2..55db1f82bb00 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 @@ -8,7 +8,9 @@ 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.RansomwareProtectionPatchSettings; import com.azure.resourcemanager.netapp.models.ServiceLevel; import com.azure.resourcemanager.netapp.models.SmbAccessBasedEnumeration; import com.azure.resourcemanager.netapp.models.SmbNonBrowsable; @@ -26,7 +28,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\"}},\"isDefaultQuotaEnabled\":true,\"defaultUserQuotaInKiBs\":2531128431130049580,\"defaultGroupQuotaInKiBs\":4035973624859613630,\"unixPermissions\":\"aq\",\"coolAccess\":false,\"coolnessPeriod\":2113030944,\"coolAccessRetrievalPolicy\":\"Default\",\"coolAccessTieringPolicy\":\"SnapshotOnly\",\"snapshotDirectoryVisible\":false,\"smbAccessBasedEnumeration\":\"Enabled\",\"smbNonBrowsable\":\"Enabled\"}}") + "{\"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\"}}") .toObject(VolumePatch.class); Assertions.assertEquals("ow", model.location()); Assertions.assertEquals("riplrbpbewtg", model.tags().get("fgb")); @@ -53,17 +55,19 @@ public void testDeserialize() throws Exception { Assertions.assertFalse(model.dataProtection().backup().policyEnforced()); Assertions.assertEquals("smv", model.dataProtection().backup().backupVaultId()); Assertions.assertEquals("yjsflhhcaalnji", model.dataProtection().snapshot().snapshotPolicyId()); + Assertions.assertEquals(DesiredRansomwareProtectionState.DISABLED, + model.dataProtection().ransomwareProtection().desiredRansomwareProtectionState()); Assertions.assertTrue(model.isDefaultQuotaEnabled()); - Assertions.assertEquals(2531128431130049580L, model.defaultUserQuotaInKiBs()); - Assertions.assertEquals(4035973624859613630L, model.defaultGroupQuotaInKiBs()); - Assertions.assertEquals("aq", model.unixPermissions()); - Assertions.assertFalse(model.coolAccess()); - Assertions.assertEquals(2113030944, model.coolnessPeriod()); + Assertions.assertEquals(4035973624859613630L, model.defaultUserQuotaInKiBs()); + Assertions.assertEquals(1491917692598460988L, model.defaultGroupQuotaInKiBs()); + Assertions.assertEquals("slyjpkiid", model.unixPermissions()); + Assertions.assertTrue(model.coolAccess()); + Assertions.assertEquals(1841035114, model.coolnessPeriod()); Assertions.assertEquals(CoolAccessRetrievalPolicy.DEFAULT, model.coolAccessRetrievalPolicy()); - Assertions.assertEquals(CoolAccessTieringPolicy.SNAPSHOT_ONLY, model.coolAccessTieringPolicy()); + Assertions.assertEquals(CoolAccessTieringPolicy.AUTO, model.coolAccessTieringPolicy()); Assertions.assertFalse(model.snapshotDirectoryVisible()); - Assertions.assertEquals(SmbAccessBasedEnumeration.ENABLED, model.smbAccessBasedEnumeration()); - Assertions.assertEquals(SmbNonBrowsable.ENABLED, model.smbNonBrowsable()); + Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumeration()); + Assertions.assertEquals(SmbNonBrowsable.DISABLED, model.smbNonBrowsable()); } @org.junit.jupiter.api.Test @@ -139,18 +143,20 @@ public void testSerialize() throws Exception { .withBackup(new VolumeBackupProperties().withBackupPolicyId("touwaboekqv") .withPolicyEnforced(false) .withBackupVaultId("smv")) - .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("yjsflhhcaalnji"))) + .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("yjsflhhcaalnji")) + .withRansomwareProtection(new RansomwareProtectionPatchSettings() + .withDesiredRansomwareProtectionState(DesiredRansomwareProtectionState.DISABLED))) .withIsDefaultQuotaEnabled(true) - .withDefaultUserQuotaInKiBs(2531128431130049580L) - .withDefaultGroupQuotaInKiBs(4035973624859613630L) - .withUnixPermissions("aq") - .withCoolAccess(false) - .withCoolnessPeriod(2113030944) + .withDefaultUserQuotaInKiBs(4035973624859613630L) + .withDefaultGroupQuotaInKiBs(1491917692598460988L) + .withUnixPermissions("slyjpkiid") + .withCoolAccess(true) + .withCoolnessPeriod(1841035114) .withCoolAccessRetrievalPolicy(CoolAccessRetrievalPolicy.DEFAULT) - .withCoolAccessTieringPolicy(CoolAccessTieringPolicy.SNAPSHOT_ONLY) + .withCoolAccessTieringPolicy(CoolAccessTieringPolicy.AUTO) .withSnapshotDirectoryVisible(false) - .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.ENABLED) - .withSmbNonBrowsable(SmbNonBrowsable.ENABLED); + .withSmbAccessBasedEnumeration(SmbAccessBasedEnumeration.DISABLED) + .withSmbNonBrowsable(SmbNonBrowsable.DISABLED); model = BinaryData.fromObject(model).toObject(VolumePatch.class); Assertions.assertEquals("ow", model.location()); Assertions.assertEquals("riplrbpbewtg", model.tags().get("fgb")); @@ -177,17 +183,19 @@ public void testSerialize() throws Exception { Assertions.assertFalse(model.dataProtection().backup().policyEnforced()); Assertions.assertEquals("smv", model.dataProtection().backup().backupVaultId()); Assertions.assertEquals("yjsflhhcaalnji", model.dataProtection().snapshot().snapshotPolicyId()); + Assertions.assertEquals(DesiredRansomwareProtectionState.DISABLED, + model.dataProtection().ransomwareProtection().desiredRansomwareProtectionState()); Assertions.assertTrue(model.isDefaultQuotaEnabled()); - Assertions.assertEquals(2531128431130049580L, model.defaultUserQuotaInKiBs()); - Assertions.assertEquals(4035973624859613630L, model.defaultGroupQuotaInKiBs()); - Assertions.assertEquals("aq", model.unixPermissions()); - Assertions.assertFalse(model.coolAccess()); - Assertions.assertEquals(2113030944, model.coolnessPeriod()); + Assertions.assertEquals(4035973624859613630L, model.defaultUserQuotaInKiBs()); + Assertions.assertEquals(1491917692598460988L, model.defaultGroupQuotaInKiBs()); + Assertions.assertEquals("slyjpkiid", model.unixPermissions()); + Assertions.assertTrue(model.coolAccess()); + Assertions.assertEquals(1841035114, model.coolnessPeriod()); Assertions.assertEquals(CoolAccessRetrievalPolicy.DEFAULT, model.coolAccessRetrievalPolicy()); - Assertions.assertEquals(CoolAccessTieringPolicy.SNAPSHOT_ONLY, model.coolAccessTieringPolicy()); + Assertions.assertEquals(CoolAccessTieringPolicy.AUTO, model.coolAccessTieringPolicy()); Assertions.assertFalse(model.snapshotDirectoryVisible()); - Assertions.assertEquals(SmbAccessBasedEnumeration.ENABLED, model.smbAccessBasedEnumeration()); - Assertions.assertEquals(SmbNonBrowsable.ENABLED, model.smbNonBrowsable()); + Assertions.assertEquals(SmbAccessBasedEnumeration.DISABLED, model.smbAccessBasedEnumeration()); + Assertions.assertEquals(SmbNonBrowsable.DISABLED, model.smbNonBrowsable()); } // Use "Map.of" if available diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePropertiesDataProtectionTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePropertiesDataProtectionTests.java index c5cb2e26de4e..ee47ea5212ad 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePropertiesDataProtectionTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumePropertiesDataProtectionTests.java @@ -5,6 +5,8 @@ package com.azure.resourcemanager.netapp.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.netapp.models.DesiredRansomwareProtectionState; +import com.azure.resourcemanager.netapp.models.RansomwareProtectionSettings; import com.azure.resourcemanager.netapp.models.RemotePath; import com.azure.resourcemanager.netapp.models.ReplicationObject; import com.azure.resourcemanager.netapp.models.ReplicationSchedule; @@ -18,7 +20,7 @@ public final class VolumePropertiesDataProtectionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumePropertiesDataProtection model = BinaryData.fromString( - "{\"backup\":{\"backupPolicyId\":\"rvjx\",\"policyEnforced\":true,\"backupVaultId\":\"pydptko\"},\"replication\":{\"replicationId\":\"ou\",\"endpointType\":\"dst\",\"replicationSchedule\":\"daily\",\"remoteVolumeResourceId\":\"tiukbldngkpoci\",\"remotePath\":{\"externalHostName\":\"z\",\"serverName\":\"xoegukgjnpiucgy\",\"volumeName\":\"evqzntypmrbp\"},\"remoteVolumeRegion\":\"c\",\"destinationReplications\":[{\"resourceId\":\"sdpydnfyhxdeoejz\",\"replicationType\":\"CrossRegionReplication\",\"region\":\"fsj\",\"zone\":\"gzfbishcbk\"},{\"resourceId\":\"jdeyeamdpha\",\"replicationType\":\"CrossZoneReplication\",\"region\":\"buxwgip\",\"zone\":\"onowk\"},{\"resourceId\":\"hwankixzbinjepu\",\"replicationType\":\"CrossRegionReplication\",\"region\":\"ywnuzoq\",\"zone\":\"iyqzrnk\"},{\"resourceId\":\"vyxlwhzlsicohoqq\",\"replicationType\":\"CrossZoneReplication\",\"region\":\"ryavwhheunmmqh\",\"zone\":\"xzko\"}]},\"snapshot\":{\"snapshotPolicyId\":\"uko\"},\"volumeRelocation\":{\"relocationRequested\":false,\"readyToBeFinalized\":true}}") + "{\"backup\":{\"backupPolicyId\":\"rvjx\",\"policyEnforced\":true,\"backupVaultId\":\"pydptko\"},\"replication\":{\"replicationId\":\"ou\",\"endpointType\":\"dst\",\"replicationSchedule\":\"daily\",\"remoteVolumeResourceId\":\"tiukbldngkpoci\",\"remotePath\":{\"externalHostName\":\"z\",\"serverName\":\"xoegukgjnpiucgy\",\"volumeName\":\"evqzntypmrbp\"},\"remoteVolumeRegion\":\"c\",\"destinationReplications\":[{\"resourceId\":\"sdpydnfyhxdeoejz\",\"replicationType\":\"CrossRegionReplication\",\"region\":\"fsj\",\"zone\":\"gzfbishcbk\"},{\"resourceId\":\"jdeyeamdpha\",\"replicationType\":\"CrossZoneReplication\",\"region\":\"buxwgip\",\"zone\":\"onowk\"},{\"resourceId\":\"hwankixzbinjepu\",\"replicationType\":\"CrossRegionReplication\",\"region\":\"ywnuzoq\",\"zone\":\"iyqzrnk\"},{\"resourceId\":\"vyxlwhzlsicohoqq\",\"replicationType\":\"CrossZoneReplication\",\"region\":\"ryavwhheunmmqh\",\"zone\":\"xzko\"}],\"externalReplicationSetupStatus\":\"VServerPeerRequired\",\"externalReplicationSetupInfo\":\"koklya\",\"mirrorState\":\"Broken\",\"relationshipStatus\":\"Transferring\"},\"snapshot\":{\"snapshotPolicyId\":\"szfkbe\"},\"volumeRelocation\":{\"relocationRequested\":true,\"readyToBeFinalized\":true},\"ransomwareProtection\":{\"desiredRansomwareProtectionState\":\"Disabled\",\"actualRansomwareProtectionState\":\"Learning\"}}") .toObject(VolumePropertiesDataProtection.class); Assertions.assertEquals("rvjx", model.backup().backupPolicyId()); Assertions.assertTrue(model.backup().policyEnforced()); @@ -29,8 +31,10 @@ public void testDeserialize() throws Exception { Assertions.assertEquals("xoegukgjnpiucgy", model.replication().remotePath().serverName()); Assertions.assertEquals("evqzntypmrbp", model.replication().remotePath().volumeName()); Assertions.assertEquals("c", model.replication().remoteVolumeRegion()); - Assertions.assertEquals("uko", model.snapshot().snapshotPolicyId()); - Assertions.assertFalse(model.volumeRelocation().relocationRequested()); + Assertions.assertEquals("szfkbe", model.snapshot().snapshotPolicyId()); + Assertions.assertTrue(model.volumeRelocation().relocationRequested()); + Assertions.assertEquals(DesiredRansomwareProtectionState.DISABLED, + model.ransomwareProtection().desiredRansomwareProtectionState()); } @org.junit.jupiter.api.Test @@ -45,8 +49,10 @@ public void testSerialize() throws Exception { .withServerName("xoegukgjnpiucgy") .withVolumeName("evqzntypmrbp")) .withRemoteVolumeRegion("c")) - .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("uko")) - .withVolumeRelocation(new VolumeRelocationProperties().withRelocationRequested(false)); + .withSnapshot(new VolumeSnapshotProperties().withSnapshotPolicyId("szfkbe")) + .withVolumeRelocation(new VolumeRelocationProperties().withRelocationRequested(true)) + .withRansomwareProtection(new RansomwareProtectionSettings() + .withDesiredRansomwareProtectionState(DesiredRansomwareProtectionState.DISABLED)); model = BinaryData.fromObject(model).toObject(VolumePropertiesDataProtection.class); Assertions.assertEquals("rvjx", model.backup().backupPolicyId()); Assertions.assertTrue(model.backup().policyEnforced()); @@ -57,7 +63,9 @@ public void testSerialize() throws Exception { Assertions.assertEquals("xoegukgjnpiucgy", model.replication().remotePath().serverName()); Assertions.assertEquals("evqzntypmrbp", model.replication().remotePath().volumeName()); Assertions.assertEquals("c", model.replication().remoteVolumeRegion()); - Assertions.assertEquals("uko", model.snapshot().snapshotPolicyId()); - Assertions.assertFalse(model.volumeRelocation().relocationRequested()); + Assertions.assertEquals("szfkbe", model.snapshot().snapshotPolicyId()); + Assertions.assertTrue(model.volumeRelocation().relocationRequested()); + Assertions.assertEquals(DesiredRansomwareProtectionState.DISABLED, + model.ransomwareProtection().desiredRansomwareProtectionState()); } } 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 120bb373cecf..bd3744a4710e 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,29 +15,28 @@ public final class VolumeQuotaRuleInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeQuotaRuleInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Updating\",\"quotaSizeInKiBs\":3593253472995446368,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"unyowxwl\"},\"location\":\"jrkvfgbvfvpdbo\",\"tags\":{\"bdeibqipqk\":\"izsjqlhkrr\",\"rwkq\":\"hvxndzwmkrefajpj\",\"sjabibs\":\"yhgbijtjivfx\",\"bjxbkzbzk\":\"stawfsdjpvkv\"},\"id\":\"vncjabudurgk\",\"name\":\"kmokz\",\"type\":\"jjklff\"}") + "{\"properties\":{\"provisioningState\":\"Deleting\",\"quotaSizeInKiBs\":8747326600288664838,\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"cizsjqlhkrribdei\"},\"location\":\"ipqkghvxndzwm\",\"tags\":{\"nyhgbijtji\":\"fajpjorwk\",\"wfsdjpvkvpbj\":\"fxzsjabibsyst\"},\"id\":\"bkzbzkd\",\"name\":\"ncj\",\"type\":\"budurgkakmo\"}") .toObject(VolumeQuotaRuleInner.class); - Assertions.assertEquals("jrkvfgbvfvpdbo", model.location()); - Assertions.assertEquals("izsjqlhkrr", model.tags().get("bdeibqipqk")); - Assertions.assertEquals(3593253472995446368L, model.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, model.quotaType()); - Assertions.assertEquals("unyowxwl", model.quotaTarget()); + Assertions.assertEquals("ipqkghvxndzwm", model.location()); + Assertions.assertEquals("fajpjorwk", model.tags().get("nyhgbijtji")); + Assertions.assertEquals(8747326600288664838L, model.quotaSizeInKiBs()); + Assertions.assertEquals(Type.DEFAULT_GROUP_QUOTA, model.quotaType()); + Assertions.assertEquals("cizsjqlhkrribdei", model.quotaTarget()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumeQuotaRuleInner model = new VolumeQuotaRuleInner().withLocation("jrkvfgbvfvpdbo") - .withTags(mapOf("bdeibqipqk", "izsjqlhkrr", "rwkq", "hvxndzwmkrefajpj", "sjabibs", "yhgbijtjivfx", - "bjxbkzbzk", "stawfsdjpvkv")) - .withQuotaSizeInKiBs(3593253472995446368L) - .withQuotaType(Type.DEFAULT_USER_QUOTA) - .withQuotaTarget("unyowxwl"); + VolumeQuotaRuleInner model = new VolumeQuotaRuleInner().withLocation("ipqkghvxndzwm") + .withTags(mapOf("nyhgbijtji", "fajpjorwk", "wfsdjpvkvpbj", "fxzsjabibsyst")) + .withQuotaSizeInKiBs(8747326600288664838L) + .withQuotaType(Type.DEFAULT_GROUP_QUOTA) + .withQuotaTarget("cizsjqlhkrribdei"); model = BinaryData.fromObject(model).toObject(VolumeQuotaRuleInner.class); - Assertions.assertEquals("jrkvfgbvfvpdbo", model.location()); - Assertions.assertEquals("izsjqlhkrr", model.tags().get("bdeibqipqk")); - Assertions.assertEquals(3593253472995446368L, model.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, model.quotaType()); - Assertions.assertEquals("unyowxwl", model.quotaTarget()); + Assertions.assertEquals("ipqkghvxndzwm", model.location()); + Assertions.assertEquals("fajpjorwk", model.tags().get("nyhgbijtji")); + Assertions.assertEquals(8747326600288664838L, model.quotaSizeInKiBs()); + Assertions.assertEquals(Type.DEFAULT_GROUP_QUOTA, model.quotaType()); + Assertions.assertEquals("cizsjqlhkrribdei", 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 dc2e8a1d88ae..533f745628ae 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,26 +15,26 @@ public final class VolumeQuotaRulePatchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeQuotaRulePatch model = BinaryData.fromString( - "{\"tags\":{\"ayuhqlbjbsy\":\"zi\",\"pgvmpipaslthaqfx\":\"bqwrvtldgm\",\"hneuyowqkd\":\"smwutwbdsrezpd\"},\"properties\":{\"provisioningState\":\"Accepted\",\"quotaSizeInKiBs\":1598919022248600128,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"gpikpzimejza\"}}") + "{\"tags\":{\"bjbsybb\":\"bizikayuhq\",\"ldgmfpgvmpip\":\"wrv\",\"x\":\"slthaq\"},\"properties\":{\"provisioningState\":\"Deleting\",\"quotaSizeInKiBs\":5146168087971383539,\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"rezpdr\"}}") .toObject(VolumeQuotaRulePatch.class); - Assertions.assertEquals("zi", model.tags().get("ayuhqlbjbsy")); - Assertions.assertEquals(1598919022248600128L, model.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, model.quotaType()); - Assertions.assertEquals("gpikpzimejza", model.quotaTarget()); + Assertions.assertEquals("bizikayuhq", model.tags().get("bjbsybb")); + Assertions.assertEquals(5146168087971383539L, model.quotaSizeInKiBs()); + Assertions.assertEquals(Type.INDIVIDUAL_GROUP_QUOTA, model.quotaType()); + Assertions.assertEquals("rezpdr", model.quotaTarget()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumeQuotaRulePatch model = new VolumeQuotaRulePatch() - .withTags(mapOf("ayuhqlbjbsy", "zi", "pgvmpipaslthaqfx", "bqwrvtldgm", "hneuyowqkd", "smwutwbdsrezpd")) - .withQuotaSizeInKiBs(1598919022248600128L) - .withQuotaType(Type.DEFAULT_USER_QUOTA) - .withQuotaTarget("gpikpzimejza"); + VolumeQuotaRulePatch model + = new VolumeQuotaRulePatch().withTags(mapOf("bjbsybb", "bizikayuhq", "ldgmfpgvmpip", "wrv", "x", "slthaq")) + .withQuotaSizeInKiBs(5146168087971383539L) + .withQuotaType(Type.INDIVIDUAL_GROUP_QUOTA) + .withQuotaTarget("rezpdr"); model = BinaryData.fromObject(model).toObject(VolumeQuotaRulePatch.class); - Assertions.assertEquals("zi", model.tags().get("ayuhqlbjbsy")); - Assertions.assertEquals(1598919022248600128L, model.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, model.quotaType()); - Assertions.assertEquals("gpikpzimejza", model.quotaTarget()); + Assertions.assertEquals("bizikayuhq", model.tags().get("bjbsybb")); + Assertions.assertEquals(5146168087971383539L, model.quotaSizeInKiBs()); + Assertions.assertEquals(Type.INDIVIDUAL_GROUP_QUOTA, model.quotaType()); + Assertions.assertEquals("rezpdr", 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 697e7fe2f50f..19c956035325 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\":5182036247086876592,\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"nb\"},\"location\":\"yggagflnlgmt\",\"tags\":{\"rohkpigqfusu\":\"hzjmucftbyrp\",\"alhhjnhgwydyynfs\":\"kzmkwklsnoxaxmqe\",\"qtanarfdlpuk\":\"khgb\"},\"id\":\"py\",\"name\":\"neizjcpe\",\"type\":\"gkhnmgbrouxddbh\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"quotaSizeInKiBs\":8594198007990007248,\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"nrzorpd\"},\"location\":\"bqc\",\"tags\":{\"xsaetg\":\"fg\",\"aqqilzdcduwjoed\":\"dgvpyig\",\"ilfjqqacdmk\":\"ngucaifpaurww\"},\"id\":\"wxdcvjwcyz\",\"name\":\"akeciqchx\",\"type\":\"tuicds\"}"; 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("qxfzyjqttvwk") - .withRegion("uaucmf") - .withExistingVolume("sysidfvclglxnf", "ijtk", "usqogsfikayia", "sharujtj") - .withTags(mapOf("vitac", "nlaxpunjqikcz", "oxhlw", "xmfcsserxhtv")) - .withQuotaSizeInKiBs(7019076429746863657L) + .define("chygtvxbyjane") + .withRegion("od") + .withExistingVolume("rhcekxgnly", "mxcpwzvmdoks", "dt", "wlwxlboncqbazqic") + .withTags(mapOf("aifmcwnosbzlehgc", "ohkxdxuw", "knjolgjyyxpve", "kb", "txwaljglzo", "szerqzevxoqei")) + .withQuotaSizeInKiBs(6162098462394021932L) .withQuotaType(Type.DEFAULT_USER_QUOTA) - .withQuotaTarget("bqeqqekewvnqvcd") + .withQuotaTarget("gx") .create(); - Assertions.assertEquals("yggagflnlgmt", response.location()); - Assertions.assertEquals("hzjmucftbyrp", response.tags().get("rohkpigqfusu")); - Assertions.assertEquals(5182036247086876592L, response.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_GROUP_QUOTA, response.quotaType()); - Assertions.assertEquals("nb", response.quotaTarget()); + Assertions.assertEquals("bqc", response.location()); + Assertions.assertEquals("fg", response.tags().get("xsaetg")); + Assertions.assertEquals(8594198007990007248L, response.quotaSizeInKiBs()); + Assertions.assertEquals(Type.INDIVIDUAL_GROUP_QUOTA, response.quotaType()); + Assertions.assertEquals("nrzorpd", 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 c8821d57e81f..c042dcdd9b02 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,8 +28,7 @@ public void testDelete() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumeQuotaRules() - .delete("cnwfepbnwgfmxjg", "g", "jbgdlfgtdysnaquf", "qbctqha", "zjrwdkqze", - com.azure.core.util.Context.NONE); + .delete("z", "vxhmtfhocnxzcmj", "ngxno", "rxtd", "sn", 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 2a2c980ae8a2..89ac506b15ee 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\":\"Patching\",\"quotaSizeInKiBs\":897633684000834955,\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"sfnrdtjxt\"},\"location\":\"dcqtjvidttge\",\"tags\":{\"zies\":\"lvyjtcvuwkas\",\"uhxu\":\"uughtuqfecjxeyg\",\"hwpusxj\":\"cbuewmrswnjlxuz\",\"dohzjq\":\"aqehg\"},\"id\":\"tu\",\"name\":\"o\",\"type\":\"gebx\"}"; + = "{\"properties\":{\"provisioningState\":\"Updating\",\"quotaSizeInKiBs\":5819505142190116276,\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"fmhklbnld\"},\"location\":\"cbhhez\",\"tags\":{\"trpb\":\"wusqx\"},\"id\":\"r\",\"name\":\"yuuatvlmbjwcolbm\",\"type\":\"lbnwtpcpahp\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,14 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); VolumeQuotaRule response = manager.volumeQuotaRules() - .getWithResponse("olbauirop", "ons", "onwpnga", "innixjawrtmjfj", "yccxlzhcox", + .getWithResponse("nepk", "etiarxqiubxdukec", "xdazv", "hctmmkosz", "dblnsntrp", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("dcqtjvidttge", response.location()); - Assertions.assertEquals("lvyjtcvuwkas", response.tags().get("zies")); - Assertions.assertEquals(897633684000834955L, response.quotaSizeInKiBs()); + Assertions.assertEquals("cbhhez", response.location()); + Assertions.assertEquals("wusqx", response.tags().get("trpb")); + Assertions.assertEquals(5819505142190116276L, response.quotaSizeInKiBs()); Assertions.assertEquals(Type.INDIVIDUAL_GROUP_QUOTA, response.quotaType()); - Assertions.assertEquals("sfnrdtjxt", response.quotaTarget()); + Assertions.assertEquals("fmhklbnld", 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 ca74c4521753..3f5b75b10d5e 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\":\"Updating\",\"quotaSizeInKiBs\":1367487808956907415,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"cjjvpilguooqja\"},\"location\":\"d\",\"tags\":{\"kjbsah\":\"ueio\",\"oebn\":\"tdtpdelqacslmo\",\"dirazf\":\"xofvcjk\",\"bmdujtmvcopexc\":\"xejw\"},\"id\":\"jurbuhhlkyqltqsr\",\"name\":\"gtuwkff\",\"type\":\"jk\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"quotaSizeInKiBs\":7254215540772664714,\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"njzrbhtmeplvu\"},\"location\":\"obrl\",\"tags\":{\"muowakywalhjy\":\"snbagnchjhg\",\"jomevtfycnlb\":\"xcgqtagdrclsso\",\"kk\":\"gjco\"},\"id\":\"ji\",\"name\":\"ytssikiz\",\"type\":\"cufqbvntnrgmqs\"}]}"; 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("yjleziunjx", "fza", "tkw", "eg", com.azure.core.util.Context.NONE); + .listByVolume("evhdlmydid", "hepfwwtjfdoes", "xhmw", "dbckyo", com.azure.core.util.Context.NONE); - Assertions.assertEquals("d", response.iterator().next().location()); - Assertions.assertEquals("ueio", response.iterator().next().tags().get("kjbsah")); - Assertions.assertEquals(1367487808956907415L, response.iterator().next().quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, response.iterator().next().quotaType()); - Assertions.assertEquals("cjjvpilguooqja", response.iterator().next().quotaTarget()); + Assertions.assertEquals("obrl", response.iterator().next().location()); + Assertions.assertEquals("snbagnchjhg", response.iterator().next().tags().get("muowakywalhjy")); + Assertions.assertEquals(7254215540772664714L, response.iterator().next().quotaSizeInKiBs()); + Assertions.assertEquals(Type.DEFAULT_GROUP_QUOTA, response.iterator().next().quotaType()); + Assertions.assertEquals("njzrbhtmeplvu", 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 e0b15f1781ef..745bff643f28 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\":\"Accepted\",\"quotaSizeInKiBs\":1661634789045622076,\"quotaType\":\"IndividualUserQuota\",\"quotaTarget\":\"zonokixrjqci\"},\"location\":\"zpfrla\",\"tags\":{\"pj\":\"rnwoiindfp\"},\"id\":\"lwbtlhf\",\"name\":\"sj\",\"type\":\"dhszfjv\"},{\"properties\":{\"provisioningState\":\"Creating\",\"quotaSizeInKiBs\":4854317837359079981,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"rqmq\"},\"location\":\"dvriiiojnal\",\"tags\":{\"ueluqhhahhxvrhmz\":\"kvtvsexso\"},\"id\":\"wpjgwws\",\"name\":\"ughftqsx\",\"type\":\"qxujxukndxd\"},{\"properties\":{\"provisioningState\":\"Updating\",\"quotaSizeInKiBs\":6871622946068631848,\"quotaType\":\"IndividualUserQuota\",\"quotaTarget\":\"msyqtfi\"},\"location\":\"hbotzingamvppho\",\"tags\":{\"nwcvtbvkayhmtnv\":\"zudphqamvdkfw\",\"zcjaesgvvsccy\":\"qiatkzwpcnp\"},\"id\":\"jguq\",\"name\":\"hwyg\",\"type\":\"lvdnkfx\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"quotaSizeInKiBs\":6647177632922570765,\"quotaType\":\"IndividualGroupQuota\",\"quotaTarget\":\"hapfcqdpsqx\"},\"location\":\"psvuoymgc\",\"tags\":{\"erqwkyhkobopg\":\"vezrypqlmfeo\"},\"id\":\"edkowepbqpcrfk\",\"name\":\"wccsnjvcdwxlpqek\",\"type\":\"tn\"}],\"nextLink\":\"tjsyin\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"quotaSizeInKiBs\":4207252489076853449,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"ytisibir\"},\"location\":\"pikpz\",\"tags\":{\"anlfzxiavrmbz\":\"j\",\"frl\":\"nokixrjqcirgz\"},\"id\":\"zszrnwoiindfpw\",\"name\":\"jylwbtlhflsj\",\"type\":\"dhszfjv\"},{\"properties\":{\"provisioningState\":\"Creating\",\"quotaSizeInKiBs\":4854317837359079981,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"rqmq\"},\"location\":\"dvriiiojnal\",\"tags\":{\"ueluqhhahhxvrhmz\":\"kvtvsexso\"},\"id\":\"wpjgwws\",\"name\":\"ughftqsx\",\"type\":\"qxujxukndxd\"}],\"nextLink\":\"rjguufzdmsyqtf\"}") .toObject(VolumeQuotaRulesList.class); - Assertions.assertEquals("zpfrla", model.value().get(0).location()); - Assertions.assertEquals("rnwoiindfp", model.value().get(0).tags().get("pj")); - Assertions.assertEquals(1661634789045622076L, model.value().get(0).quotaSizeInKiBs()); - Assertions.assertEquals(Type.INDIVIDUAL_USER_QUOTA, model.value().get(0).quotaType()); - Assertions.assertEquals("zonokixrjqci", model.value().get(0).quotaTarget()); - Assertions.assertEquals("tjsyin", model.nextLink()); + Assertions.assertEquals("pikpz", model.value().get(0).location()); + Assertions.assertEquals("j", model.value().get(0).tags().get("anlfzxiavrmbz")); + Assertions.assertEquals(4207252489076853449L, model.value().get(0).quotaSizeInKiBs()); + Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, model.value().get(0).quotaType()); + Assertions.assertEquals("ytisibir", model.value().get(0).quotaTarget()); + Assertions.assertEquals("rjguufzdmsyqtf", 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 86085bb5dacf..624d00c142cb 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\":\"Creating\",\"quotaSizeInKiBs\":7272736071561293881,\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"rfzeey\"}") + "{\"provisioningState\":\"Updating\",\"quotaSizeInKiBs\":2248907093975297235,\"quotaType\":\"IndividualUserQuota\",\"quotaTarget\":\"hmouwqlgzrfze\"}") .toObject(VolumeQuotaRulesProperties.class); - Assertions.assertEquals(7272736071561293881L, model.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, model.quotaType()); - Assertions.assertEquals("rfzeey", model.quotaTarget()); + Assertions.assertEquals(2248907093975297235L, model.quotaSizeInKiBs()); + Assertions.assertEquals(Type.INDIVIDUAL_USER_QUOTA, model.quotaType()); + Assertions.assertEquals("hmouwqlgzrfze", model.quotaTarget()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumeQuotaRulesProperties model = new VolumeQuotaRulesProperties().withQuotaSizeInKiBs(7272736071561293881L) - .withQuotaType(Type.DEFAULT_USER_QUOTA) - .withQuotaTarget("rfzeey"); + VolumeQuotaRulesProperties model = new VolumeQuotaRulesProperties().withQuotaSizeInKiBs(2248907093975297235L) + .withQuotaType(Type.INDIVIDUAL_USER_QUOTA) + .withQuotaTarget("hmouwqlgzrfze"); model = BinaryData.fromObject(model).toObject(VolumeQuotaRulesProperties.class); - Assertions.assertEquals(7272736071561293881L, model.quotaSizeInKiBs()); - Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, model.quotaType()); - Assertions.assertEquals("rfzeey", model.quotaTarget()); + Assertions.assertEquals(2248907093975297235L, model.quotaSizeInKiBs()); + Assertions.assertEquals(Type.INDIVIDUAL_USER_QUOTA, model.quotaType()); + Assertions.assertEquals("hmouwqlgzrfze", model.quotaTarget()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRelocationPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRelocationPropertiesTests.java index 8cd656bb11a1..22c9c0e4cda5 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRelocationPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRelocationPropertiesTests.java @@ -12,7 +12,7 @@ public final class VolumeRelocationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeRelocationProperties model - = BinaryData.fromString("{\"relocationRequested\":false,\"readyToBeFinalized\":false}") + = BinaryData.fromString("{\"relocationRequested\":false,\"readyToBeFinalized\":true}") .toObject(VolumeRelocationProperties.class); Assertions.assertFalse(model.relocationRequested()); } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRevertTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeRevertTests.java index 3d0e2c5070f3..6a005780b27d 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\":\"gjb\"}").toObject(VolumeRevert.class); - Assertions.assertEquals("gjb", model.snapshotId()); + VolumeRevert model = BinaryData.fromString("{\"snapshotId\":\"olpsslqlf\"}").toObject(VolumeRevert.class); + Assertions.assertEquals("olpsslqlf", model.snapshotId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumeRevert model = new VolumeRevert().withSnapshotId("gjb"); + VolumeRevert model = new VolumeRevert().withSnapshotId("olpsslqlf"); model = BinaryData.fromObject(model).toObject(VolumeRevert.class); - Assertions.assertEquals("gjb", model.snapshotId()); + Assertions.assertEquals("olpsslqlf", model.snapshotId()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeSnapshotPropertiesTests.java b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeSnapshotPropertiesTests.java index de2181e5527a..724589c986a3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeSnapshotPropertiesTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumeSnapshotPropertiesTests.java @@ -12,14 +12,14 @@ public final class VolumeSnapshotPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeSnapshotProperties model - = BinaryData.fromString("{\"snapshotPolicyId\":\"pnazzm\"}").toObject(VolumeSnapshotProperties.class); - Assertions.assertEquals("pnazzm", model.snapshotPolicyId()); + = BinaryData.fromString("{\"snapshotPolicyId\":\"rgvtqag\"}").toObject(VolumeSnapshotProperties.class); + Assertions.assertEquals("rgvtqag", model.snapshotPolicyId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VolumeSnapshotProperties model = new VolumeSnapshotProperties().withSnapshotPolicyId("pnazzm"); + VolumeSnapshotProperties model = new VolumeSnapshotProperties().withSnapshotPolicyId("rgvtqag"); model = BinaryData.fromObject(model).toObject(VolumeSnapshotProperties.class); - Assertions.assertEquals("pnazzm", model.snapshotPolicyId()); + Assertions.assertEquals("rgvtqag", model.snapshotPolicyId()); } } 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 6c4d58c0fdb8..e8840844c547 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 = "{\"svmPeeringCommand\":\"lm\"}"; + String responseStr = "{\"svmPeeringCommand\":\"vkjzwfbcyaykm\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,8 +30,9 @@ public void testAuthorizeExternalReplication() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SvmPeerCommandResponse response = manager.volumes() - .authorizeExternalReplication("bcysih", "gqcwdhohsdtmc", "zsu", "cohdx", com.azure.core.util.Context.NONE); + .authorizeExternalReplication("nsxfwu", "hcdpkupnqrmgj", "bpkuwxeoio", "fiz", + com.azure.core.util.Context.NONE); - Assertions.assertEquals("lm", response.svmPeeringCommand()); + Assertions.assertEquals("vkjzwfbcyaykm", response.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 c2d5fadc4cfb..398364aa4672 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,9 @@ public void testAuthorizeReplication() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .authorizeReplication("prlpy", "nuciqdsmexiit", "fuxtyasiibmiybnn", "stgnl", - new AuthorizeRequest().withRemoteVolumeResourceId("nmgixh"), com.azure.core.util.Context.NONE); + .authorizeReplication("syeipqd", "mjtgrqg", "gkkileplkcsmkn", "wtbbaedorvvmqf", + new AuthorizeRequest().withRemoteVolumeResourceId("ygbdgwumgxdgdhpa"), + 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 70321b25ffff..b601d648b171 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("rzpgep", "tybbwwpgda", "chzyvlixqnrk", "xkjibnxmy", - new BreakFileLocksRequest().withClientIp("xs").withConfirmRunningDisruptiveOperation(true), + .breakFileLocks("ujyxkyxlzgsj", "kzzltafhbzf", "ovwmbjlzqsczpgvd", "napfdqwowftpt", + new BreakFileLocksRequest().withClientIp("wjtkschgcgqyhl").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 96f4b3e58b86..6193bfb57acb 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("qqoli", "r", "aiouaubrjt", "oq", + .breakReplication("zcbyfq", "kfaoytehq", "uvjmv", "mtdwcky", 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 70f9181a2e6a..34bc3580f355 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesDeleteReplicationMockTests.java @@ -28,7 +28,8 @@ public void testDeleteReplication() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .deleteReplication("uyxoaf", "aoqltfaey", "inmfgvxirp", "hriypoqeyhlqhy", com.azure.core.util.Context.NONE); + .deleteReplication("mxhzzysevus", "ivzrrryveimipsk", "yzatvfuzkaft", "vvruxwi", + 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 9a7c9977cf17..3b76e042a4a9 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesFinalizeRelocationMockTests.java @@ -28,7 +28,7 @@ public void testFinalizeRelocation() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .finalizeRelocation("xzmqpnodawop", "hewjptmcgsbost", "eln", "la", com.azure.core.util.Context.NONE); + .finalizeRelocation("no", "pziuwfbzkkdtnh", "sycljsel", "kpbafvafhl", 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 216ac9be2d12..63d35b9531ca 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListGetGroupIdListForLdapUserMockTests.java @@ -21,7 +21,7 @@ public final class VolumesListGetGroupIdListForLdapUserMockTests { @Test public void testListGetGroupIdListForLdapUser() throws Exception { - String responseStr = "{\"groupIdsForLdapUser\":[\"rcgegydcwboxjum\"]}"; + String responseStr = "{\"groupIdsForLdapUser\":[\"fkndl\",\"vtwknvgmmbugt\",\"watmqa\",\"kueatgroeshoy\"]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testListGetGroupIdListForLdapUser() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); GetGroupIdListForLdapUserResponse response = manager.volumes() - .listGetGroupIdListForLdapUser("ntvlwijpsttexo", "qpwcyyufmh", "uncuw", "qspkcdqzhlctd", - new GetGroupIdListForLdapUserRequest().withUsername("unqndyfpchrqb"), com.azure.core.util.Context.NONE); + .listGetGroupIdListForLdapUser("yqrhvyeld", "tj", "dkwisw", "kukjtasb", + new GetGroupIdListForLdapUserRequest().withUsername("wispkxk"), com.azure.core.util.Context.NONE); - Assertions.assertEquals("rcgegydcwboxjum", response.groupIdsForLdapUser().get(0)); + Assertions.assertEquals("fkndl", 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 new file mode 100644 index 000000000000..1aff1c358161 --- /dev/null +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesListQuotaReportMockTests.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.ListQuotaReportResponse; +import com.azure.resourcemanager.netapp.models.Type; +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 VolumesListQuotaReportMockTests { + @Test + public void testListQuotaReport() throws Exception { + String responseStr + = "{\"value\":[{\"quotaType\":\"DefaultUserQuota\",\"quotaTarget\":\"wdchozfn\",\"quotaLimitUsedInKiBs\":3168660078499570789,\"quotaLimitTotalInKiBs\":700271083328715030,\"percentageUsed\":53.10744,\"isDerivedQuota\":false},{\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"oaiknaqlnuwig\",\"quotaLimitUsedInKiBs\":2329438320518189311,\"quotaLimitTotalInKiBs\":4465981831282505024,\"percentageUsed\":61.86658,\"isDerivedQuota\":true},{\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"xhmpejtlkex\",\"quotaLimitUsedInKiBs\":3352897062376386518,\"quotaLimitTotalInKiBs\":6028048177476509003,\"percentageUsed\":16.300827,\"isDerivedQuota\":false}]}"; + + 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)); + + ListQuotaReportResponse response = manager.volumes() + .listQuotaReport("pqigtuujwouhd", "wsigrbjbxsj", "bvitvqkjya", "nu", com.azure.core.util.Context.NONE); + + Assertions.assertEquals(Type.DEFAULT_USER_QUOTA, response.value().get(0).quotaType()); + Assertions.assertEquals("wdchozfn", response.value().get(0).quotaTarget()); + Assertions.assertEquals(3168660078499570789L, response.value().get(0).quotaLimitUsedInKiBs()); + Assertions.assertEquals(700271083328715030L, response.value().get(0).quotaLimitTotalInKiBs()); + Assertions.assertEquals(53.10744F, response.value().get(0).percentageUsed()); + Assertions.assertFalse(response.value().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 7b88852fde2f..bf33fe665bc1 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\":\"gbeglqgleo\",\"endpointType\":\"dst\",\"replicationSchedule\":\"_10minutely\",\"remoteVolumeResourceId\":\"nlu\",\"remoteVolumeRegion\":\"krrfx\",\"mirrorState\":\"Broken\",\"replicationCreationTime\":\"2021-06-26T08:39:03Z\",\"replicationDeletionTime\":\"2021-02-28T15:02:58Z\"}]}"; + = "{\"value\":[{\"replicationId\":\"kdnwqapfgsdpcve\",\"endpointType\":\"dst\",\"replicationSchedule\":\"_10minutely\",\"remoteVolumeResourceId\":\"h\",\"remoteVolumeRegion\":\"uipldqq\",\"mirrorState\":\"Mirrored\",\"replicationCreationTime\":\"2021-03-03T11:50:40Z\",\"replicationDeletionTime\":\"2021-11-28T20:48:06Z\"}]}"; 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("fdgugeyzi", "grkyuizabsnmfpph", "jee", "yhyhsgzfczb", - new ListReplicationsRequest().withExclude(Exclude.NONE), com.azure.core.util.Context.NONE); + .listReplications("sybwptdaca", "vvlfntymtp", "iwenazero", "zrsq", + new ListReplicationsRequest().withExclude(Exclude.DELETED), com.azure.core.util.Context.NONE); Assertions.assertEquals(EndpointType.DST, response.iterator().next().endpointType()); Assertions.assertEquals(ReplicationSchedule.ONE_ZEROMINUTELY, response.iterator().next().replicationSchedule()); - Assertions.assertEquals("nlu", response.iterator().next().remoteVolumeResourceId()); - Assertions.assertEquals("krrfx", response.iterator().next().remoteVolumeRegion()); + Assertions.assertEquals("h", response.iterator().next().remoteVolumeResourceId()); + Assertions.assertEquals("uipldqq", 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 dc3ea7ea05a3..c34e0055ab3f 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,7 @@ public final class VolumesPeerExternalClusterMockTests { @Test public void testPeerExternalCluster() throws Exception { - String responseStr = "{\"peerAcceptCommand\":\"qwthmky\"}"; + String responseStr = "{\"peerAcceptCommand\":\"bztensvkzykjtj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,11 +31,13 @@ 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("cmjkavlgorbmftpm", "tzfjltf", "nzcyjtotp", "opv", - new PeerClusterForVolumeMigrationRequest().withPeerIpAddresses(Arrays.asList("dbzqgqqihed")), - com.azure.core.util.Context.NONE); + ClusterPeerCommandResponse response + = manager.volumes() + .peerExternalCluster( + "ljnhvlqj", "ek", "eeksnbksdqhjvyk", "xeslkhhustcpoqm", new PeerClusterForVolumeMigrationRequest() + .withPeerIpAddresses(Arrays.asList("nwqjwgokn", "ejjjkxybwfdb")), + com.azure.core.util.Context.NONE); - Assertions.assertEquals("qwthmky", response.peerAcceptCommand()); + Assertions.assertEquals("bztensvkzykjtj", response.peerAcceptCommand()); } } 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 b8bcdd28807f..9b8b87629c14 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("muapcvhdbevw", "qxeysko", "qzinkfkbg", "z", - new PoolChangeRequest().withNewPoolResourceId("owxeqocljmy"), com.azure.core.util.Context.NONE); + .poolChange("fz", "bfw", "rzx", "dew", new PoolChangeRequest().withNewPoolResourceId("rsxkr"), + 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 636a9cdff04f..83a1561a30e3 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReInitializeReplicationMockTests.java @@ -28,7 +28,8 @@ public void testReInitializeReplication() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .reInitializeReplication("mavmq", "oudorhcgyyp", "otwypundmb", "hu", com.azure.core.util.Context.NONE); + .reInitializeReplication("gdexjd", "vjsaqwotm", "wllcolsr", "xaptefhexcgjok", + 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 dcac9307b23a..b6866dc9b370 100644 --- a/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusWithResponseMockTests.java +++ b/sdk/netapp/azure-resourcemanager-netapp/src/test/java/com/azure/resourcemanager/netapp/generated/VolumesReplicationStatusWithResponseMockTests.java @@ -23,7 +23,7 @@ public final class VolumesReplicationStatusWithResponseMockTests { @Test public void testReplicationStatusWithResponse() throws Exception { String responseStr - = "{\"healthy\":false,\"relationshipStatus\":\"Idle\",\"mirrorState\":\"Mirrored\",\"totalProgress\":\"ojhp\",\"errorMessage\":\"fnmdxotn\"}"; + = "{\"healthy\":true,\"relationshipStatus\":\"Idle\",\"mirrorState\":\"Mirrored\",\"totalProgress\":\"egplwr\",\"errorMessage\":\"hwddkvbxgkq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,14 +33,13 @@ public void testReplicationStatusWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ReplicationStatus response = manager.volumes() - .replicationStatusWithResponse("oj", "ngiflrzpasccbi", "imzdlyj", "fqwmkyoquf", - com.azure.core.util.Context.NONE) + .replicationStatusWithResponse("ejnndljdju", "kb", "req", "n", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertFalse(response.healthy()); + Assertions.assertTrue(response.healthy()); Assertions.assertEquals(VolumeReplicationRelationshipStatus.IDLE, response.relationshipStatus()); Assertions.assertEquals(MirrorState.MIRRORED, response.mirrorState()); - Assertions.assertEquals("ojhp", response.totalProgress()); - Assertions.assertEquals("fnmdxotn", response.errorMessage()); + Assertions.assertEquals("egplwr", response.totalProgress()); + Assertions.assertEquals("hwddkvbxgkq", 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 f04184bbed22..7d6b9855dbf1 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 @@ -27,7 +27,7 @@ public void testResyncReplication() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.volumes().resyncReplication("v", "cvbmqzb", "q", "lajrnwxacevehj", com.azure.core.util.Context.NONE); + manager.volumes().resyncReplication("blhtjq", "qyv", "eh", "a", 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 fde8c54695cf..7ef55ebd970a 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("flyh", "xcudchxgsr", "oldforobw", "lvizb", new VolumeRevert().withSnapshotId("fovvacqpbtuodxes"), - com.azure.core.util.Context.NONE); + .revert("cz", "vodrrslblxydkxr", "vvbxiwkgfbqljnq", "hychocokuleh", + new VolumeRevert().withSnapshotId("qlrqffaweyurk"), 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 f1a89a17ef5c..eba515b53b76 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,7 +28,7 @@ public void testRevertRelocation() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.volumes() - .revertRelocation("utmzlbiojlvfhrbb", "neqvcwwyyurmo", "hppr", "rsnm", com.azure.core.util.Context.NONE); + .revertRelocation("ylcc", "evxrhyz", "fwrsofpltdbmair", "hvhfnracw", 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 8254b732f29f..acc0e21affb9 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\":1634117386,\"day\":\"mpaxmodfvuefywsb\",\"hour\":938827927,\"minute\":1491614176,\"usedBytes\":5583429102583863786}") + "{\"snapshotsToKeep\":270206644,\"day\":\"qwcciuqg\",\"hour\":1924773766,\"minute\":164113652,\"usedBytes\":878238904771000945}") .toObject(WeeklySchedule.class); - Assertions.assertEquals(1634117386, model.snapshotsToKeep()); - Assertions.assertEquals("mpaxmodfvuefywsb", model.day()); - Assertions.assertEquals(938827927, model.hour()); - Assertions.assertEquals(1491614176, model.minute()); - Assertions.assertEquals(5583429102583863786L, model.usedBytes()); + Assertions.assertEquals(270206644, model.snapshotsToKeep()); + Assertions.assertEquals("qwcciuqg", model.day()); + Assertions.assertEquals(1924773766, model.hour()); + Assertions.assertEquals(164113652, model.minute()); + Assertions.assertEquals(878238904771000945L, model.usedBytes()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WeeklySchedule model = new WeeklySchedule().withSnapshotsToKeep(1634117386) - .withDay("mpaxmodfvuefywsb") - .withHour(938827927) - .withMinute(1491614176) - .withUsedBytes(5583429102583863786L); + WeeklySchedule model = new WeeklySchedule().withSnapshotsToKeep(270206644) + .withDay("qwcciuqg") + .withHour(1924773766) + .withMinute(164113652) + .withUsedBytes(878238904771000945L); model = BinaryData.fromObject(model).toObject(WeeklySchedule.class); - Assertions.assertEquals(1634117386, model.snapshotsToKeep()); - Assertions.assertEquals("mpaxmodfvuefywsb", model.day()); - Assertions.assertEquals(938827927, model.hour()); - Assertions.assertEquals(1491614176, model.minute()); - Assertions.assertEquals(5583429102583863786L, model.usedBytes()); + Assertions.assertEquals(270206644, model.snapshotsToKeep()); + Assertions.assertEquals("qwcciuqg", model.day()); + Assertions.assertEquals(1924773766, model.hour()); + Assertions.assertEquals(164113652, model.minute()); + Assertions.assertEquals(878238904771000945L, model.usedBytes()); } } diff --git a/sdk/netapp/azure-resourcemanager-netapp/tsp-location.yaml b/sdk/netapp/azure-resourcemanager-netapp/tsp-location.yaml index 449461ddb1a3..afc9cc7ad037 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: 110584e2d5955b67491cf3b377df887fe24bacbd +commit: e96c24570a484cff13d153fb472f812878866a39 repo: Azure/azure-rest-api-specs additionalDirectories: