diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/CHANGELOG.md b/sdk/netapp/Azure.ResourceManager.NetApp/CHANGELOG.md index e93f527fbf73..d9cf2f2471bc 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/CHANGELOG.md +++ b/sdk/netapp/Azure.ResourceManager.NetApp/CHANGELOG.md @@ -1,14 +1,22 @@ # Release History -## 1.15.0-beta.1 (Unreleased) +## 1.15.0-beta.1 (2025-12-01) ### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Upgraded api-version tag from 'package-2025-09-01' to 'package-2025-09-01-preview'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/1da0ccefea2127820defac6496bf4710c0902d78/specification/netapp/resource-manager/Microsoft.NetApp/NetApp/readme.md. +- Added `Cache` resource type +- Added `ElasticAccount` resource type +- Added `ElasticPool` resource type +- Added `ElasticVolume` resource type +- Added `ElasticSnapshotPolicy` resource type +- Added `ElasticSnapshot` resource type +- Added `ElasticBackupVault` resource type +- Added `ElasticBackupPolicy` resource type +- Added `ElasticBackup` resource type +- Added `ActiveDirectory` resource type +- Added `RansomwareReport` resource type, Support for Advance AntiRansomware features +- Added `LdapConfiguration` to `NetAppAccountResource` to support LDAP configuration at account level +- Added `LargeVolumeType` to `NetAppVolumeResource` to support ExtraLargeVolumes ## 1.14.0 (2025-11-26) diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/api/Azure.ResourceManager.NetApp.net8.0.cs b/sdk/netapp/Azure.ResourceManager.NetApp/api/Azure.ResourceManager.NetApp.net8.0.cs index 1fe566cc34b5..2b4f95e8f5b8 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/api/Azure.ResourceManager.NetApp.net8.0.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/api/Azure.ResourceManager.NetApp.net8.0.cs @@ -1,11 +1,125 @@ namespace Azure.ResourceManager.NetApp { + public partial class ActiveDirectoryConfigCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ActiveDirectoryConfigCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string activeDirectoryConfigName, Azure.ResourceManager.NetApp.ActiveDirectoryConfigData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string activeDirectoryConfigName, Azure.ResourceManager.NetApp.ActiveDirectoryConfigData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string activeDirectoryConfigName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string activeDirectoryConfigName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string activeDirectoryConfigName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string activeDirectoryConfigName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string activeDirectoryConfigName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string activeDirectoryConfigName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ActiveDirectoryConfigData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ActiveDirectoryConfigData(Azure.Core.AzureLocation location) { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ActiveDirectoryConfigProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ActiveDirectoryConfigData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ActiveDirectoryConfigData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ActiveDirectoryConfigResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ActiveDirectoryConfigResource() { } + public virtual Azure.ResourceManager.NetApp.ActiveDirectoryConfigData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string activeDirectoryConfigName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NetApp.ActiveDirectoryConfigData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ActiveDirectoryConfigData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ActiveDirectoryConfigPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ActiveDirectoryConfigPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class AzureResourceManagerNetAppContext : System.ClientModel.Primitives.ModelReaderWriterContext { internal AzureResourceManagerNetAppContext() { } public static Azure.ResourceManager.NetApp.AzureResourceManagerNetAppContext Default { get { throw null; } } protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; } } + public partial class CacheCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected CacheCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string cacheName, Azure.ResourceManager.NetApp.CacheData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string cacheName, Azure.ResourceManager.NetApp.CacheData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string cacheName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string cacheName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string cacheName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string cacheName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string cacheName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string cacheName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class CacheData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CacheData(Azure.Core.AzureLocation location, Azure.ResourceManager.NetApp.Models.CacheProperties properties) { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.CacheProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.CacheData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.CacheData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CacheResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected CacheResource() { } + public virtual Azure.ResourceManager.NetApp.CacheData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string poolName, string cacheName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetPeeringPassphrases(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPeeringPassphrasesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation PoolChange(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.NetAppVolumePoolChangeContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PoolChangeAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.NetAppVolumePoolChangeContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NetApp.CacheData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.CacheData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.CachePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.CachePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class CapacityPoolCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected CapacityPoolCollection() { } @@ -58,6 +172,9 @@ protected CapacityPoolResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetCache(string cacheName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetCacheAsync(string cacheName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NetApp.CacheCollection GetCaches() { throw null; } public virtual Azure.Response GetNetAppVolume(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetNetAppVolumeAsync(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.NetApp.NetAppVolumeCollection GetNetAppVolumes() { throw null; } @@ -73,6 +190,456 @@ protected CapacityPoolResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.CapacityPoolPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.CapacityPoolPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class ElasticAccountCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ElasticAccountCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string accountName, Azure.ResourceManager.NetApp.ElasticAccountData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string accountName, Azure.ResourceManager.NetApp.ElasticAccountData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ElasticAccountData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticAccountData(Azure.Core.AzureLocation location) { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticAccountProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticAccountData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticAccountData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticAccountResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ElasticAccountResource() { } + public virtual Azure.ResourceManager.NetApp.ElasticAccountData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticBackupPolicyCollection GetElasticBackupPolicies() { throw null; } + public virtual Azure.Response GetElasticBackupPolicy(string backupPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetElasticBackupPolicyAsync(string backupPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetElasticBackupVault(string backupVaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetElasticBackupVaultAsync(string backupVaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticBackupVaultCollection GetElasticBackupVaults() { throw null; } + public virtual Azure.Response GetElasticCapacityPool(string poolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetElasticCapacityPoolAsync(string poolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticCapacityPoolCollection GetElasticCapacityPools() { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticSnapshotPolicyCollection GetElasticSnapshotPolicies() { throw null; } + public virtual Azure.Response GetElasticSnapshotPolicy(string snapshotPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetElasticSnapshotPolicyAsync(string snapshotPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NetApp.ElasticAccountData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticAccountData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticAccountPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticAccountPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ElasticBackupCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ElasticBackupCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string backupName, Azure.ResourceManager.NetApp.ElasticBackupData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string backupName, Azure.ResourceManager.NetApp.ElasticBackupData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string backupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string backupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string backupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string backupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string backupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string backupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ElasticBackupData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticBackupData() { } + public Azure.ResourceManager.NetApp.Models.ElasticBackupProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticBackupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticBackupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticBackupPolicyCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ElasticBackupPolicyCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string backupPolicyName, Azure.ResourceManager.NetApp.ElasticBackupPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string backupPolicyName, Azure.ResourceManager.NetApp.ElasticBackupPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string backupPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string backupPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string backupPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string backupPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string backupPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string backupPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ElasticBackupPolicyData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticBackupPolicyData(Azure.Core.AzureLocation location) { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticBackupPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticBackupPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticBackupPolicyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ElasticBackupPolicyResource() { } + public virtual Azure.ResourceManager.NetApp.ElasticBackupPolicyData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string backupPolicyName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NetApp.ElasticBackupPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticBackupPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ElasticBackupResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ElasticBackupResource() { } + public virtual Azure.ResourceManager.NetApp.ElasticBackupData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, string backupName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NetApp.ElasticBackupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticBackupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticBackupPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticBackupPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ElasticBackupVaultCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ElasticBackupVaultCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string backupVaultName, Azure.ResourceManager.NetApp.ElasticBackupVaultData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string backupVaultName, Azure.ResourceManager.NetApp.ElasticBackupVaultData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string backupVaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string backupVaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string backupVaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string backupVaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string backupVaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string backupVaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ElasticBackupVaultData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticBackupVaultData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? ElasticBackupVaultProvisioningState { get { throw null; } } + public Azure.ETag? ETag { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticBackupVaultData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticBackupVaultData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticBackupVaultResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ElasticBackupVaultResource() { } + public virtual Azure.ResourceManager.NetApp.ElasticBackupVaultData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetElasticBackup(string backupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetElasticBackupAsync(string backupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticBackupCollection GetElasticBackups() { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NetApp.ElasticBackupVaultData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticBackupVaultData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticBackupVaultPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticBackupVaultPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ElasticCapacityPoolCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ElasticCapacityPoolCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string poolName, Azure.ResourceManager.NetApp.ElasticCapacityPoolData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string poolName, Azure.ResourceManager.NetApp.ElasticCapacityPoolData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string poolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string poolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string poolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string poolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string poolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string poolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ElasticCapacityPoolData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticCapacityPoolData(Azure.Core.AzureLocation location) { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.ElasticCapacityPoolProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticCapacityPoolData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticCapacityPoolData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticCapacityPoolResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ElasticCapacityPoolResource() { } + public virtual Azure.ResourceManager.NetApp.ElasticCapacityPoolData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation ChangeZone(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ChangeZoneContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ChangeZoneAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ChangeZoneContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CheckVolumeFilePathAvailability(Azure.ResourceManager.NetApp.Models.CheckElasticVolumeFilePathAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CheckVolumeFilePathAvailabilityAsync(Azure.ResourceManager.NetApp.Models.CheckElasticVolumeFilePathAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string poolName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetElasticVolume(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetElasticVolumeAsync(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticVolumeCollection GetElasticVolumes() { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NetApp.ElasticCapacityPoolData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticCapacityPoolData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticCapacityPoolPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticCapacityPoolPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ElasticSnapshotCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ElasticSnapshotCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string snapshotName, Azure.ResourceManager.NetApp.ElasticSnapshotData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string snapshotName, Azure.ResourceManager.NetApp.ElasticSnapshotData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string snapshotName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string snapshotName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string snapshotName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string snapshotName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string snapshotName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string snapshotName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ElasticSnapshotData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticSnapshotData() { } + public Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? ElasticSnapshotProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticSnapshotData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticSnapshotData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticSnapshotPolicyCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ElasticSnapshotPolicyCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string snapshotPolicyName, Azure.ResourceManager.NetApp.ElasticSnapshotPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string snapshotPolicyName, Azure.ResourceManager.NetApp.ElasticSnapshotPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string snapshotPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string snapshotPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string snapshotPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string snapshotPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string snapshotPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string snapshotPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ElasticSnapshotPolicyData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticSnapshotPolicyData(Azure.Core.AzureLocation location) { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticSnapshotPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticSnapshotPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticSnapshotPolicyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ElasticSnapshotPolicyResource() { } + public virtual Azure.ResourceManager.NetApp.ElasticSnapshotPolicyData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string snapshotPolicyName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetElasticVolumes(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetElasticVolumesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NetApp.ElasticSnapshotPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticSnapshotPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ElasticSnapshotResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ElasticSnapshotResource() { } + public virtual Azure.ResourceManager.NetApp.ElasticSnapshotData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string snapshotName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NetApp.ElasticSnapshotData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticSnapshotData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.ElasticSnapshotData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.ElasticSnapshotData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ElasticVolumeCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ElasticVolumeCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string volumeName, Azure.ResourceManager.NetApp.ElasticVolumeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string volumeName, Azure.ResourceManager.NetApp.ElasticVolumeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ElasticVolumeData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticVolumeData(Azure.Core.AzureLocation location) { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.ElasticVolumeProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticVolumeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticVolumeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticVolumeResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ElasticVolumeResource() { } + public virtual Azure.ResourceManager.NetApp.ElasticVolumeData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetElasticSnapshot(string snapshotName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetElasticSnapshotAsync(string snapshotName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticSnapshotCollection GetElasticSnapshots() { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Revert(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticVolumeRevert body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RevertAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticVolumeRevert body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NetApp.ElasticVolumeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticVolumeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticVolumePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticVolumePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class NetAppAccountBackupCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -127,6 +694,7 @@ public NetAppAccountData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.NetApp.Models.NetAppAccountEncryption Encryption { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.LdapConfiguration LdapConfiguration { get { throw null; } set { } } public Azure.ResourceManager.NetApp.Models.MultiAdStatus? MultiAdStatus { get { throw null; } } public string NfsV4IdDomain { get { throw null; } set { } } public string ProvisioningState { get { throw null; } } @@ -387,6 +955,60 @@ protected NetAppBackupVaultResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.NetAppBackupVaultPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.NetAppBackupVaultPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class NetAppBucketCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NetAppBucketCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string bucketName, Azure.ResourceManager.NetApp.NetAppBucketData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string bucketName, Azure.ResourceManager.NetApp.NetAppBucketData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string bucketName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string bucketName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string bucketName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string bucketName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string bucketName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string bucketName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class NetAppBucketData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NetAppBucketData() { } + public Azure.ResourceManager.NetApp.Models.NetAppBucketFileSystemUser FileSystemUser { get { throw null; } set { } } + public string Path { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppBucketPermission? Permissions { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.NetAppBucketServerProperties Server { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialStatus? Status { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.NetAppBucketData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.NetAppBucketData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NetAppBucketResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NetAppBucketResource() { } + public virtual Azure.ResourceManager.NetApp.NetAppBucketData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string bucketName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GenerateCredentials(Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialsExpiry body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GenerateCredentialsAsync(Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialsExpiry body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NetApp.NetAppBucketData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.NetAppBucketData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.NetAppBucketPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.NetAppBucketPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public static partial class NetAppExtensions { public static Azure.Response CheckNetAppFilePathAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.NetApp.Models.NetAppFilePathAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -395,7 +1017,27 @@ public static partial class NetAppExtensions public static System.Threading.Tasks.Task> CheckNetAppNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.NetApp.Models.NetAppNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response CheckNetAppQuotaAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.NetApp.Models.NetAppQuotaAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> CheckNetAppQuotaAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.NetApp.Models.NetAppQuotaAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetActiveDirectoryConfig(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string activeDirectoryConfigName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetActiveDirectoryConfigAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string activeDirectoryConfigName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.NetApp.ActiveDirectoryConfigResource GetActiveDirectoryConfigResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NetApp.ActiveDirectoryConfigCollection GetActiveDirectoryConfigs(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetActiveDirectoryConfigs(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetActiveDirectoryConfigsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.NetApp.CacheResource GetCacheResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.NetApp.CapacityPoolResource GetCapacityPoolResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetElasticAccount(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetElasticAccountAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticAccountResource GetElasticAccountResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticAccountCollection GetElasticAccounts(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetElasticAccounts(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetElasticAccountsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticBackupPolicyResource GetElasticBackupPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticBackupResource GetElasticBackupResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticBackupVaultResource GetElasticBackupVaultResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticCapacityPoolResource GetElasticCapacityPoolResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticSnapshotPolicyResource GetElasticSnapshotPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticSnapshotResource GetElasticSnapshotResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticVolumeResource GetElasticVolumeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetNetAppAccount(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetNetAppAccountAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -407,6 +1049,7 @@ public static partial class NetAppExtensions public static Azure.ResourceManager.NetApp.NetAppBackupPolicyResource GetNetAppBackupPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.NetApp.NetAppBackupVaultBackupResource GetNetAppBackupVaultBackupResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.NetApp.NetAppBackupVaultResource GetNetAppBackupVaultResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NetApp.NetAppBucketResource GetNetAppBucketResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetNetAppQuotaLimit(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, string quotaLimitName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetNetAppQuotaLimitAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, string quotaLimitName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Pageable GetNetAppQuotaLimits(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -422,6 +1065,7 @@ public static partial class NetAppExtensions public static Azure.ResourceManager.NetApp.NetAppVolumeQuotaRuleResource GetNetAppVolumeQuotaRuleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.NetApp.NetAppVolumeResource GetNetAppVolumeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.NetApp.NetAppVolumeSnapshotResource GetNetAppVolumeSnapshotResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NetApp.RansomwareReportResource GetRansomwareReportResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.NetApp.RegionInfoResource GetRegionInfoResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetRegionInfoResource(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetRegionInfoResourceAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -556,6 +1200,7 @@ public NetAppVolumeData(Azure.Core.AzureLocation location, string creationToken, public Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore? AvsDataStore { get { throw null; } set { } } public string BackupId { get { throw null; } set { } } public string BaremetalTenantId { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.BreakthroughMode? BreakthroughMode { get { throw null; } set { } } public Azure.Core.ResourceIdentifier CapacityPoolResourceId { get { throw null; } set { } } public int? CloneProgress { get { throw null; } } public Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy? CoolAccessRetrievalPolicy { get { throw null; } set { } } @@ -586,6 +1231,9 @@ public NetAppVolumeData(Azure.Core.AzureLocation location, string creationToken, public bool? IsSmbEncryptionEnabled { get { throw null; } set { } } public bool? IsSnapshotDirectoryVisible { get { throw null; } set { } } public Azure.Core.ResourceIdentifier KeyVaultPrivateEndpointResourceId { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage? Language { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.LargeVolumeType? LargeVolumeType { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.LdapServerType? LdapServerType { get { throw null; } set { } } public long? MaximumNumberOfFiles { get { throw null; } } public System.Collections.Generic.IReadOnlyList MountTargets { get { throw null; } } public Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? NetworkFeatures { get { throw null; } set { } } @@ -754,6 +1402,9 @@ protected NetAppVolumeResource() { } public virtual System.Threading.Tasks.Task> GetGetGroupIdListForLdapUserAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.GetGroupIdListForLdapUserContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetLatestStatusBackup(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetLatestStatusBackupAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetNetAppBucket(string bucketName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetNetAppBucketAsync(string bucketName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NetApp.NetAppBucketCollection GetNetAppBuckets() { throw null; } public virtual Azure.Response GetNetAppSubvolumeInfo(string subvolumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetNetAppSubvolumeInfoAsync(string subvolumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.NetApp.NetAppSubvolumeInfoCollection GetNetAppSubvolumeInfos() { throw null; } @@ -769,6 +1420,11 @@ protected NetAppVolumeResource() { } public virtual Azure.Response GetNetAppVolumeSnapshot(string snapshotName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetNetAppVolumeSnapshotAsync(string snapshotName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.NetApp.NetAppVolumeSnapshotCollection GetNetAppVolumeSnapshots() { throw null; } + public virtual Azure.ResourceManager.ArmOperation GetQuotaReport(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetQuotaReportAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetRansomwareReport(string ransomwareReportName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetRansomwareReportAsync(string ransomwareReportName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NetApp.RansomwareReportCollection GetRansomwareReports() { throw null; } public virtual Azure.Pageable GetReplications(Azure.ResourceManager.NetApp.Models.ListReplicationsContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Pageable GetReplications(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -871,6 +1527,49 @@ protected NetAppVolumeSnapshotResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.NetAppVolumeSnapshotData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.NetAppVolumeSnapshotData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class RansomwareReportCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected RansomwareReportCollection() { } + public virtual Azure.Response Exists(string ransomwareReportName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string ransomwareReportName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string ransomwareReportName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string ransomwareReportName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string ransomwareReportName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string ransomwareReportName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class RansomwareReportData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RansomwareReportData() { } + public Azure.ResourceManager.NetApp.Models.RansomwareReportProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.RansomwareReportData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.RansomwareReportData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RansomwareReportResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected RansomwareReportResource() { } + public virtual Azure.ResourceManager.NetApp.RansomwareReportData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation ClearSuspects(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.RansomwareSuspectsClearContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ClearSuspectsAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.RansomwareSuspectsClearContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string ransomwareReportName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NetApp.RansomwareReportData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.RansomwareReportData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class RegionInfoResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; @@ -980,13 +1679,24 @@ namespace Azure.ResourceManager.NetApp.Mocking public partial class MockableNetAppArmClient : Azure.ResourceManager.ArmResource { protected MockableNetAppArmClient() { } + public virtual Azure.ResourceManager.NetApp.ActiveDirectoryConfigResource GetActiveDirectoryConfigResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NetApp.CacheResource GetCacheResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NetApp.CapacityPoolResource GetCapacityPoolResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticAccountResource GetElasticAccountResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticBackupPolicyResource GetElasticBackupPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticBackupResource GetElasticBackupResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticBackupVaultResource GetElasticBackupVaultResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticCapacityPoolResource GetElasticCapacityPoolResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticSnapshotPolicyResource GetElasticSnapshotPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticSnapshotResource GetElasticSnapshotResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticVolumeResource GetElasticVolumeResource(Azure.Core.ResourceIdentifier id) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.NetApp.NetAppAccountBackupResource GetNetAppAccountBackupResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NetApp.NetAppAccountResource GetNetAppAccountResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NetApp.NetAppBackupPolicyResource GetNetAppBackupPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NetApp.NetAppBackupVaultBackupResource GetNetAppBackupVaultBackupResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NetApp.NetAppBackupVaultResource GetNetAppBackupVaultResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NetApp.NetAppBucketResource GetNetAppBucketResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NetApp.NetAppSubvolumeInfoResource GetNetAppSubvolumeInfoResource(Azure.Core.ResourceIdentifier id) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.NetApp.NetAppVolumeBackupResource GetNetAppVolumeBackupResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -994,12 +1704,19 @@ protected MockableNetAppArmClient() { } public virtual Azure.ResourceManager.NetApp.NetAppVolumeQuotaRuleResource GetNetAppVolumeQuotaRuleResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NetApp.NetAppVolumeResource GetNetAppVolumeResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NetApp.NetAppVolumeSnapshotResource GetNetAppVolumeSnapshotResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NetApp.RansomwareReportResource GetRansomwareReportResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NetApp.RegionInfoResource GetRegionInfoResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NetApp.SnapshotPolicyResource GetSnapshotPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableNetAppResourceGroupResource : Azure.ResourceManager.ArmResource { protected MockableNetAppResourceGroupResource() { } + public virtual Azure.Response GetActiveDirectoryConfig(string activeDirectoryConfigName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetActiveDirectoryConfigAsync(string activeDirectoryConfigName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NetApp.ActiveDirectoryConfigCollection GetActiveDirectoryConfigs() { throw null; } + public virtual Azure.Response GetElasticAccount(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetElasticAccountAsync(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticAccountCollection GetElasticAccounts() { throw null; } public virtual Azure.Response GetNetAppAccount(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetNetAppAccountAsync(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.NetApp.NetAppAccountCollection GetNetAppAccounts() { throw null; } @@ -1013,6 +1730,10 @@ protected MockableNetAppSubscriptionResource() { } public virtual System.Threading.Tasks.Task> CheckNetAppNameAvailabilityAsync(Azure.Core.AzureLocation location, Azure.ResourceManager.NetApp.Models.NetAppNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CheckNetAppQuotaAvailability(Azure.Core.AzureLocation location, Azure.ResourceManager.NetApp.Models.NetAppQuotaAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CheckNetAppQuotaAvailabilityAsync(Azure.Core.AzureLocation location, Azure.ResourceManager.NetApp.Models.NetAppQuotaAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetActiveDirectoryConfigs(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetActiveDirectoryConfigsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetElasticAccounts(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetElasticAccountsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetNetAppAccounts(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetNetAppAccountsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetNetAppQuotaLimit(Azure.Core.AzureLocation location, string quotaLimitName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1054,10 +1775,90 @@ namespace Azure.ResourceManager.NetApp.Models public static bool operator !=(Azure.ResourceManager.NetApp.Models.AcceptGrowCapacityPoolForShortTermCloneSplit left, Azure.ResourceManager.NetApp.Models.AcceptGrowCapacityPoolForShortTermCloneSplit right) { throw null; } public override string ToString() { throw null; } } + public partial class ActiveDirectoryConfigPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ActiveDirectoryConfigPatch() { } + public Azure.ResourceManager.NetApp.Models.AzureResourceManagerCommonTypesManagedServiceIdentityUpdate Identity { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ActiveDirectoryConfigUpdateProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ActiveDirectoryConfigPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ActiveDirectoryConfigPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ActiveDirectoryConfigProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ActiveDirectoryConfigProperties(string domain, Azure.ResourceManager.NetApp.Models.SecretPassword secretPassword) { } + public Azure.ResourceManager.NetApp.Models.NetAppAccountActiveDirectoryStatus? ActiveDirectoryStatus { get { throw null; } } + public System.Collections.Generic.IList Administrators { get { throw null; } } + public System.Collections.Generic.IList BackupOperators { get { throw null; } } + public System.Collections.Generic.IList Dns { get { throw null; } } + public string Domain { get { throw null; } set { } } + public string OrganizationalUnit { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.SecretPassword SecretPassword { get { throw null; } set { } } + public System.Collections.Generic.IList SecurityOperators { get { throw null; } } + public string Site { get { throw null; } set { } } + public string SmbServerName { get { throw null; } set { } } + public string UserName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ActiveDirectoryConfigProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ActiveDirectoryConfigProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ActiveDirectoryConfigUpdateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ActiveDirectoryConfigUpdateProperties() { } + public System.Collections.Generic.IList Administrators { get { throw null; } } + public System.Collections.Generic.IList BackupOperators { get { throw null; } } + public System.Collections.Generic.IList Dns { get { throw null; } } + public string Domain { get { throw null; } set { } } + public string OrganizationalUnit { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.SecretPasswordUpdate SecretPassword { get { throw null; } set { } } + public System.Collections.Generic.IList SecurityOperators { get { throw null; } } + public string Site { get { throw null; } set { } } + public string SmbServerName { get { throw null; } set { } } + public string UserName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ActiveDirectoryConfigUpdateProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ActiveDirectoryConfigUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ActualRansomwareProtectionState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ActualRansomwareProtectionState(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ActualRansomwareProtectionState Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ActualRansomwareProtectionState Enabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ActualRansomwareProtectionState Learning { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ActualRansomwareProtectionState Paused { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ActualRansomwareProtectionState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ActualRansomwareProtectionState left, Azure.ResourceManager.NetApp.Models.ActualRansomwareProtectionState right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ActualRansomwareProtectionState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ActualRansomwareProtectionState left, Azure.ResourceManager.NetApp.Models.ActualRansomwareProtectionState right) { throw null; } + public override string ToString() { throw null; } + } public static partial class ArmNetAppModelFactory { + public static Azure.ResourceManager.NetApp.ActiveDirectoryConfigData ActiveDirectoryConfigData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetApp.Models.ActiveDirectoryConfigProperties properties = null, Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ActiveDirectoryConfigProperties ActiveDirectoryConfigProperties(string userName = null, System.Collections.Generic.IEnumerable dns = null, string smbServerName = null, string organizationalUnit = null, string site = null, System.Collections.Generic.IEnumerable backupOperators = null, System.Collections.Generic.IEnumerable administrators = null, System.Collections.Generic.IEnumerable securityOperators = null, Azure.ResourceManager.NetApp.Models.NetAppAccountActiveDirectoryStatus? activeDirectoryStatus = default(Azure.ResourceManager.NetApp.Models.NetAppAccountActiveDirectoryStatus?), Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? provisioningState = default(Azure.ResourceManager.NetApp.Models.NetAppProvisioningState?), string domain = null, Azure.ResourceManager.NetApp.Models.SecretPassword secretPassword = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetApp.Models.AvailabilityZoneMapping AvailabilityZoneMapping(string availabilityZone = null, bool? isAvailable = default(bool?)) { throw null; } + public static Azure.ResourceManager.NetApp.CacheData CacheData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetApp.Models.CacheProperties properties = null, Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable zones = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.CacheMountTargetProperties CacheMountTargetProperties(string mountTargetId = null, string ipAddress = null, string smbServerFqdn = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.CacheProperties CacheProperties(string filepath = null, long size = (long)0, System.Collections.Generic.IEnumerable exportPolicy = null, System.Collections.Generic.IEnumerable protocolTypes = null, Azure.ResourceManager.NetApp.Models.CacheProvisioningState? provisioningState = default(Azure.ResourceManager.NetApp.Models.CacheProvisioningState?), Azure.ResourceManager.NetApp.Models.CacheLifeCycleState? cacheState = default(Azure.ResourceManager.NetApp.Models.CacheLifeCycleState?), Azure.Core.ResourceIdentifier cacheSubnetResourceId = null, Azure.Core.ResourceIdentifier peeringSubnetResourceId = null, System.Collections.Generic.IEnumerable mountTargets = null, Azure.ResourceManager.NetApp.Models.KerberosState? kerberos = default(Azure.ResourceManager.NetApp.Models.KerberosState?), Azure.ResourceManager.NetApp.Models.SmbSettings smbSettings = null, float? throughputMibps = default(float?), float? actualThroughputMibps = default(float?), Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource encryptionKeySource = default(Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource), Azure.Core.ResourceIdentifier keyVaultPrivateEndpointResourceId = null, long? maximumNumberOfFiles = default(long?), Azure.ResourceManager.NetApp.Models.EncryptionState? encryption = default(Azure.ResourceManager.NetApp.Models.EncryptionState?), Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage? language = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage?), Azure.ResourceManager.NetApp.Models.LdapState? ldap = default(Azure.ResourceManager.NetApp.Models.LdapState?), Azure.ResourceManager.NetApp.Models.LdapServerType? ldapServerType = default(Azure.ResourceManager.NetApp.Models.LdapServerType?), Azure.ResourceManager.NetApp.Models.OriginClusterInformation originClusterInformation = null, Azure.ResourceManager.NetApp.Models.CifsChangeNotifyState? cifsChangeNotifications = default(Azure.ResourceManager.NetApp.Models.CifsChangeNotifyState?), Azure.ResourceManager.NetApp.Models.GlobalFileLockingState? globalFileLocking = default(Azure.ResourceManager.NetApp.Models.GlobalFileLockingState?), Azure.ResourceManager.NetApp.Models.EnableWriteBackState? writeBack = default(Azure.ResourceManager.NetApp.Models.EnableWriteBackState?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetApp.CapacityPoolData CapacityPoolData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ETag? etag, System.Guid? poolId, long size, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel serviceLevel, string provisioningState, float? totalThroughputMibps, float? utilizedThroughputMibps, Azure.ResourceManager.NetApp.Models.CapacityPoolQosType? qosType, bool? isCoolAccessEnabled, Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType? encryptionType) { throw null; } public static Azure.ResourceManager.NetApp.CapacityPoolData CapacityPoolData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), System.Guid? poolId = default(System.Guid?), long size = (long)0, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel serviceLevel = default(Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel), string provisioningState = null, float? totalThroughputMibps = default(float?), float? utilizedThroughputMibps = default(float?), int? customThroughputMibpsInt = default(int?), Azure.ResourceManager.NetApp.Models.CapacityPoolQosType? qosType = default(Azure.ResourceManager.NetApp.Models.CapacityPoolQosType?), bool? isCoolAccessEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType? encryptionType = default(Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType?)) { throw null; } @@ -1066,15 +1867,38 @@ public static partial class ArmNetAppModelFactory public static Azure.ResourceManager.NetApp.Models.CapacityPoolPatch CapacityPoolPatch(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, long? size, Azure.ResourceManager.NetApp.Models.CapacityPoolQosType? qosType, bool? isCoolAccessEnabled) { throw null; } public static Azure.ResourceManager.NetApp.Models.CapacityPoolPatch CapacityPoolPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), long? size = default(long?), Azure.ResourceManager.NetApp.Models.CapacityPoolQosType? qosType = default(Azure.ResourceManager.NetApp.Models.CapacityPoolQosType?), bool? isCoolAccessEnabled = default(bool?), int? customThroughputMibpsInt = default(int?)) { throw null; } public static Azure.ResourceManager.NetApp.Models.CapacityPoolPatch CapacityPoolPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), long? size = default(long?), Azure.ResourceManager.NetApp.Models.CapacityPoolQosType? qosType = default(Azure.ResourceManager.NetApp.Models.CapacityPoolQosType?), bool? isCoolAccessEnabled = default(bool?), float? customThroughputMibps = default(float?)) { throw null; } + public static Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityResult CheckElasticResourceAvailabilityResult(Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityStatus? isAvailable = default(Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityStatus?), Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityReason? reason = default(Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityReason?), string message = null) { throw null; } public static Azure.ResourceManager.NetApp.Models.ClusterPeerCommandResult ClusterPeerCommandResult(string peerAcceptCommand = null) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticAccountData ElasticAccountData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetApp.Models.ElasticAccountProperties properties = null, Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticAccountProperties ElasticAccountProperties(Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? provisioningState = default(Azure.ResourceManager.NetApp.Models.NetAppProvisioningState?), Azure.ResourceManager.NetApp.Models.ElasticEncryption encryption = null) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticBackupData ElasticBackupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NetApp.Models.ElasticBackupProperties properties = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticBackupPatch ElasticBackupPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string elasticBackupPropertiesUpdateLabel = null) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticBackupPolicyData ElasticBackupPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyProperties properties = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyProperties ElasticBackupPolicyProperties(Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? provisioningState = default(Azure.ResourceManager.NetApp.Models.NetAppProvisioningState?), int? dailyBackupsToKeep = default(int?), int? weeklyBackupsToKeep = default(int?), int? monthlyBackupsToKeep = default(int?), int? assignedVolumesCount = default(int?), Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyState? policyState = default(Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyState?)) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticBackupProperties ElasticBackupProperties(System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? snapshotCreationOn = default(System.DateTimeOffset?), System.DateTimeOffset? completionOn = default(System.DateTimeOffset?), Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? provisioningState = default(Azure.ResourceManager.NetApp.Models.NetAppProvisioningState?), long? size = default(long?), string label = null, Azure.ResourceManager.NetApp.Models.ElasticBackupType? backupType = default(Azure.ResourceManager.NetApp.Models.ElasticBackupType?), string failureReason = null, Azure.Core.ResourceIdentifier elasticVolumeResourceId = null, Azure.ResourceManager.NetApp.Models.SnapshotUsage? snapshotUsage = default(Azure.ResourceManager.NetApp.Models.SnapshotUsage?), Azure.Core.ResourceIdentifier elasticSnapshotResourceId = null, Azure.Core.ResourceIdentifier elasticBackupPolicyResourceId = null, Azure.ResourceManager.NetApp.Models.VolumeSize? volumeSize = default(Azure.ResourceManager.NetApp.Models.VolumeSize?)) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticBackupVaultData ElasticBackupVaultData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? elasticBackupVaultProvisioningState = default(Azure.ResourceManager.NetApp.Models.NetAppProvisioningState?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticCapacityPoolData ElasticCapacityPoolData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetApp.Models.ElasticCapacityPoolProperties properties = null, Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable zones = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticCapacityPoolProperties ElasticCapacityPoolProperties(long size = (long)0, Azure.ResourceManager.NetApp.Models.ElasticServiceLevel serviceLevel = default(Azure.ResourceManager.NetApp.Models.ElasticServiceLevel), Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? provisioningState = default(Azure.ResourceManager.NetApp.Models.NetAppProvisioningState?), Azure.ResourceManager.NetApp.Models.ElasticEncryptionConfiguration encryption = null, double? totalThroughputMibps = default(double?), Azure.Core.ResourceIdentifier subnetResourceId = null, string currentZone = null, Azure.ResourceManager.NetApp.Models.ElasticResourceAvailabilityStatus? availabilityStatus = default(Azure.ResourceManager.NetApp.Models.ElasticResourceAvailabilityStatus?), Azure.Core.ResourceIdentifier activeDirectoryConfigResourceId = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticEncryptionIdentity ElasticEncryptionIdentity(string principalId = null, Azure.Core.ResourceIdentifier userAssignedIdentity = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticKeyVaultProperties ElasticKeyVaultProperties(System.Uri keyVaultUri = null, string keyName = null, Azure.Core.ResourceIdentifier keyVaultResourceId = null, Azure.ResourceManager.NetApp.Models.ElasticKeyVaultStatus? status = default(Azure.ResourceManager.NetApp.Models.ElasticKeyVaultStatus?)) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticMountTargetProperties ElasticMountTargetProperties(string ipAddress = null, string smbServerFqdn = null) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticSnapshotData ElasticSnapshotData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? elasticSnapshotProvisioningState = default(Azure.ResourceManager.NetApp.Models.NetAppProvisioningState?)) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticSnapshotPolicyData ElasticSnapshotPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyProperties properties = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyProperties ElasticSnapshotPolicyProperties(Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyHourlySchedule hourlySchedule = null, Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyDailySchedule dailySchedule = null, Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyWeeklySchedule weeklySchedule = null, Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyMonthlySchedule monthlySchedule = null, Azure.ResourceManager.NetApp.Models.PolicyStatus? policyStatus = default(Azure.ResourceManager.NetApp.Models.PolicyStatus?), Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? provisioningState = default(Azure.ResourceManager.NetApp.Models.NetAppProvisioningState?)) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticVolumeData ElasticVolumeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetApp.Models.ElasticVolumeProperties properties = null, Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable zones = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticVolumeProperties ElasticVolumeProperties(string filePath = null, long size = (long)0, System.Collections.Generic.IEnumerable exportRules = null, System.Collections.Generic.IEnumerable protocolTypes = null, Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? provisioningState = default(Azure.ResourceManager.NetApp.Models.NetAppProvisioningState?), Azure.ResourceManager.NetApp.Models.ElasticResourceAvailabilityStatus? availabilityStatus = default(Azure.ResourceManager.NetApp.Models.ElasticResourceAvailabilityStatus?), Azure.Core.ResourceIdentifier snapshotResourceId = null, System.Collections.Generic.IEnumerable mountTargets = null, Azure.ResourceManager.NetApp.Models.ElasticVolumeDataProtectionProperties dataProtection = null, Azure.ResourceManager.NetApp.Models.SnapshotDirectoryVisibility? snapshotDirectoryVisibility = default(Azure.ResourceManager.NetApp.Models.SnapshotDirectoryVisibility?), Azure.ResourceManager.NetApp.Models.ElasticSmbEncryption? smbEncryption = default(Azure.ResourceManager.NetApp.Models.ElasticSmbEncryption?), Azure.Core.ResourceIdentifier backupResourceId = null, Azure.ResourceManager.NetApp.Models.ElasticVolumeRestorationState? restorationState = default(Azure.ResourceManager.NetApp.Models.ElasticVolumeRestorationState?)) { throw null; } public static Azure.ResourceManager.NetApp.Models.GetGroupIdListForLdapUserResult GetGroupIdListForLdapUserResult(System.Collections.Generic.IEnumerable groupIdsForLdapUser = null) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppAccountActiveDirectory NetAppAccountActiveDirectory(string activeDirectoryId = null, string username = null, string password = null, string domain = null, string dns = null, Azure.ResourceManager.NetApp.Models.NetAppAccountActiveDirectoryStatus? status = default(Azure.ResourceManager.NetApp.Models.NetAppAccountActiveDirectoryStatus?), string statusDetails = null, string smbServerName = null, string organizationalUnit = null, string site = null, System.Collections.Generic.IEnumerable backupOperators = null, System.Collections.Generic.IEnumerable administrators = null, System.Net.IPAddress kdcIP = null, string adName = null, string serverRootCACertificate = null, bool? isAesEncryptionEnabled = default(bool?), bool? isLdapSigningEnabled = default(bool?), System.Collections.Generic.IEnumerable securityOperators = null, bool? isLdapOverTlsEnabled = default(bool?), bool? allowLocalNfsUsersWithLdap = default(bool?), bool? encryptDCConnections = default(bool?), Azure.ResourceManager.NetApp.Models.NetAppLdapSearchScopeConfiguration ldapSearchScope = null, string preferredServersForLdapClient = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetApp.NetAppAccountData NetAppAccountData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ETag? etag, Azure.ResourceManager.Models.ManagedServiceIdentity identity, string provisioningState, System.Collections.Generic.IEnumerable activeDirectories, Azure.ResourceManager.NetApp.Models.NetAppAccountEncryption encryption, bool? disableShowmount) { throw null; } - public static Azure.ResourceManager.NetApp.NetAppAccountData NetAppAccountData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string provisioningState = null, System.Collections.Generic.IEnumerable activeDirectories = null, Azure.ResourceManager.NetApp.Models.NetAppAccountEncryption encryption = null, bool? disableShowmount = default(bool?), string nfsV4IdDomain = null, Azure.ResourceManager.NetApp.Models.MultiAdStatus? multiAdStatus = default(Azure.ResourceManager.NetApp.Models.MultiAdStatus?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.NetApp.NetAppAccountData NetAppAccountData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ETag? etag, Azure.ResourceManager.Models.ManagedServiceIdentity identity, string provisioningState, System.Collections.Generic.IEnumerable activeDirectories, Azure.ResourceManager.NetApp.Models.NetAppAccountEncryption encryption, bool? disableShowmount, string nfsV4IdDomain, Azure.ResourceManager.NetApp.Models.MultiAdStatus? multiAdStatus) { throw null; } + public static Azure.ResourceManager.NetApp.NetAppAccountData NetAppAccountData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string provisioningState = null, System.Collections.Generic.IEnumerable activeDirectories = null, Azure.ResourceManager.NetApp.Models.NetAppAccountEncryption encryption = null, bool? disableShowmount = default(bool?), string nfsV4IdDomain = null, Azure.ResourceManager.NetApp.Models.MultiAdStatus? multiAdStatus = default(Azure.ResourceManager.NetApp.Models.MultiAdStatus?), Azure.ResourceManager.NetApp.Models.LdapConfiguration ldapConfiguration = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetApp.Models.NetAppAccountPatch NetAppAccountPatch(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, string provisioningState, System.Collections.Generic.IEnumerable activeDirectories, Azure.ResourceManager.NetApp.Models.NetAppAccountEncryption encryption, bool? disableShowmount) { throw null; } - public static Azure.ResourceManager.NetApp.Models.NetAppAccountPatch NetAppAccountPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string provisioningState = null, System.Collections.Generic.IEnumerable activeDirectories = null, Azure.ResourceManager.NetApp.Models.NetAppAccountEncryption encryption = null, bool? disableShowmount = default(bool?), string nfsV4IdDomain = null, Azure.ResourceManager.NetApp.Models.MultiAdStatus? multiAdStatus = default(Azure.ResourceManager.NetApp.Models.MultiAdStatus?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.NetApp.Models.NetAppAccountPatch NetAppAccountPatch(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, string provisioningState, System.Collections.Generic.IEnumerable activeDirectories, Azure.ResourceManager.NetApp.Models.NetAppAccountEncryption encryption, bool? disableShowmount, string nfsV4IdDomain, Azure.ResourceManager.NetApp.Models.MultiAdStatus? multiAdStatus) { throw null; } + public static Azure.ResourceManager.NetApp.Models.NetAppAccountPatch NetAppAccountPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string provisioningState = null, System.Collections.Generic.IEnumerable activeDirectories = null, Azure.ResourceManager.NetApp.Models.NetAppAccountEncryption encryption = null, bool? disableShowmount = default(bool?), string nfsV4IdDomain = null, Azure.ResourceManager.NetApp.Models.MultiAdStatus? multiAdStatus = default(Azure.ResourceManager.NetApp.Models.MultiAdStatus?), Azure.ResourceManager.NetApp.Models.LdapConfiguration ldapConfiguration = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetApp.NetAppBackupData NetAppBackupData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.Core.AzureLocation location, string backupId = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string provisioningState = null, long? size = default(long?), string label = null, Azure.ResourceManager.NetApp.Models.NetAppBackupType? backupType = default(Azure.ResourceManager.NetApp.Models.NetAppBackupType?), string failureReason = null, string volumeName = null, bool? useExistingSnapshot = default(bool?)) { throw null; } public static Azure.ResourceManager.NetApp.NetAppBackupData NetAppBackupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string backupId = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? snapshotCreationOn = default(System.DateTimeOffset?), System.DateTimeOffset? completionOn = default(System.DateTimeOffset?), string provisioningState = null, long? size = default(long?), string label = null, Azure.ResourceManager.NetApp.Models.NetAppBackupType? backupType = default(Azure.ResourceManager.NetApp.Models.NetAppBackupType?), string failureReason = null, Azure.Core.ResourceIdentifier volumeResourceId = null, bool? useExistingSnapshot = default(bool?), string snapshotName = null, Azure.Core.ResourceIdentifier backupPolicyArmResourceId = null, bool? isLargeVolume = default(bool?)) { throw null; } @@ -1085,6 +1909,10 @@ public static partial class ArmNetAppModelFactory public static Azure.ResourceManager.NetApp.NetAppBackupPolicyData NetAppBackupPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.Core.ResourceIdentifier backupPolicyId = null, string provisioningState = null, int? dailyBackupsToKeep = default(int?), int? weeklyBackupsToKeep = default(int?), int? monthlyBackupsToKeep = default(int?), int? volumesAssigned = default(int?), bool? isEnabled = default(bool?), System.Collections.Generic.IEnumerable volumeBackups = null) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppBackupPolicyPatch NetAppBackupPolicyPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.Core.ResourceIdentifier backupPolicyId = null, string provisioningState = null, int? dailyBackupsToKeep = default(int?), int? weeklyBackupsToKeep = default(int?), int? monthlyBackupsToKeep = default(int?), int? volumesAssigned = default(int?), bool? isEnabled = default(bool?), System.Collections.Generic.IEnumerable volumeBackups = null) { throw null; } public static Azure.ResourceManager.NetApp.NetAppBackupVaultData NetAppBackupVaultData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string provisioningState = null) { throw null; } + public static Azure.ResourceManager.NetApp.NetAppBucketData NetAppBucketData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string path = null, Azure.ResourceManager.NetApp.Models.NetAppBucketFileSystemUser fileSystemUser = null, Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? provisioningState = default(Azure.ResourceManager.NetApp.Models.NetAppProvisioningState?), Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialStatus? status = default(Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialStatus?), Azure.ResourceManager.NetApp.Models.NetAppBucketServerProperties server = null, Azure.ResourceManager.NetApp.Models.NetAppBucketPermission? permissions = default(Azure.ResourceManager.NetApp.Models.NetAppBucketPermission?)) { throw null; } + public static Azure.ResourceManager.NetApp.Models.NetAppBucketGenerateCredentials NetAppBucketGenerateCredentials(string accessKey = null, string secretKey = null, System.DateTimeOffset? keyPairExpiry = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.NetApp.Models.NetAppBucketPatch NetAppBucketPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string path = null, Azure.ResourceManager.NetApp.Models.NetAppBucketFileSystemUser fileSystemUser = null, Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? provisioningState = default(Azure.ResourceManager.NetApp.Models.NetAppProvisioningState?), Azure.ResourceManager.NetApp.Models.NetAppBucketServerPatchProperties server = null, Azure.ResourceManager.NetApp.Models.NetAppBucketPatchPermission? permissions = default(Azure.ResourceManager.NetApp.Models.NetAppBucketPatchPermission?)) { throw null; } + public static Azure.ResourceManager.NetApp.Models.NetAppBucketServerProperties NetAppBucketServerProperties(string fqdn = null, string certificateCommonName = null, System.DateTimeOffset? certificateExpiryOn = default(System.DateTimeOffset?), string ipAddress = null, string certificateObject = null) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppChangeKeyVault NetAppChangeKeyVault(System.Uri keyVaultUri = null, string keyName = null, Azure.Core.ResourceIdentifier keyVaultResourceId = null, System.Collections.Generic.IEnumerable keyVaultPrivateEndpoints = null) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppCheckAvailabilityResult NetAppCheckAvailabilityResult(bool? isAvailable = default(bool?), Azure.ResourceManager.NetApp.Models.NetAppNameUnavailableReason? reason = default(Azure.ResourceManager.NetApp.Models.NetAppNameUnavailableReason?), string message = null) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppDestinationReplication NetAppDestinationReplication(Azure.Core.ResourceIdentifier resourceId = null, Azure.ResourceManager.NetApp.Models.NetAppReplicationType? replicationType = default(Azure.ResourceManager.NetApp.Models.NetAppReplicationType?), string region = null, string zone = null) { throw null; } @@ -1098,7 +1926,9 @@ public static partial class ArmNetAppModelFactory public static Azure.ResourceManager.NetApp.Models.NetAppRegionInfo NetAppRegionInfo(Azure.ResourceManager.NetApp.Models.RegionStorageToNetworkProximity? storageToNetworkProximity = default(Azure.ResourceManager.NetApp.Models.RegionStorageToNetworkProximity?), System.Collections.Generic.IEnumerable availabilityZoneMappings = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetApp.Models.NetAppReplicationObject NetAppReplicationObject(string replicationId, Azure.ResourceManager.NetApp.Models.NetAppEndpointType? endpointType, Azure.ResourceManager.NetApp.Models.NetAppReplicationSchedule? replicationSchedule, Azure.Core.ResourceIdentifier remoteVolumeResourceId, Azure.ResourceManager.NetApp.Models.RemotePath remotePath, string remoteVolumeRegion) { throw null; } - public static Azure.ResourceManager.NetApp.Models.NetAppReplicationObject NetAppReplicationObject(string replicationId = null, Azure.ResourceManager.NetApp.Models.NetAppEndpointType? endpointType = default(Azure.ResourceManager.NetApp.Models.NetAppEndpointType?), Azure.ResourceManager.NetApp.Models.NetAppReplicationSchedule? replicationSchedule = default(Azure.ResourceManager.NetApp.Models.NetAppReplicationSchedule?), Azure.Core.ResourceIdentifier remoteVolumeResourceId = null, Azure.ResourceManager.NetApp.Models.RemotePath remotePath = null, string remoteVolumeRegion = null, System.Collections.Generic.IEnumerable destinationReplications = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.NetApp.Models.NetAppReplicationObject NetAppReplicationObject(string replicationId, Azure.ResourceManager.NetApp.Models.NetAppEndpointType? endpointType, Azure.ResourceManager.NetApp.Models.NetAppReplicationSchedule? replicationSchedule, Azure.Core.ResourceIdentifier remoteVolumeResourceId, Azure.ResourceManager.NetApp.Models.RemotePath remotePath, string remoteVolumeRegion, System.Collections.Generic.IEnumerable destinationReplications) { throw null; } + public static Azure.ResourceManager.NetApp.Models.NetAppReplicationObject NetAppReplicationObject(string replicationId = null, Azure.ResourceManager.NetApp.Models.NetAppEndpointType? endpointType = default(Azure.ResourceManager.NetApp.Models.NetAppEndpointType?), Azure.ResourceManager.NetApp.Models.NetAppReplicationSchedule? replicationSchedule = default(Azure.ResourceManager.NetApp.Models.NetAppReplicationSchedule?), Azure.Core.ResourceIdentifier remoteVolumeResourceId = null, Azure.ResourceManager.NetApp.Models.RemotePath remotePath = null, string remoteVolumeRegion = null, System.Collections.Generic.IEnumerable destinationReplications = null, Azure.ResourceManager.NetApp.Models.ExternalReplicationSetupStatus? externalReplicationSetupStatus = default(Azure.ResourceManager.NetApp.Models.ExternalReplicationSetupStatus?), string externalReplicationSetupInfo = null, Azure.ResourceManager.NetApp.Models.NetAppMirrorState? mirrorState = default(Azure.ResourceManager.NetApp.Models.NetAppMirrorState?), Azure.ResourceManager.NetApp.Models.VolumeReplicationRelationshipStatus? relationshipStatus = default(Azure.ResourceManager.NetApp.Models.VolumeReplicationRelationshipStatus?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetApp.Models.NetAppReplicationObject NetAppReplicationObject(string replicationId, Azure.ResourceManager.NetApp.Models.NetAppEndpointType? endpointType, Azure.ResourceManager.NetApp.Models.NetAppReplicationSchedule? replicationSchedule, Azure.Core.ResourceIdentifier remoteVolumeResourceId, string remoteVolumeRegion) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppRestoreStatus NetAppRestoreStatus(bool? isHealthy = default(bool?), Azure.ResourceManager.NetApp.Models.NetAppRelationshipStatus? relationshipStatus = default(Azure.ResourceManager.NetApp.Models.NetAppRelationshipStatus?), Azure.ResourceManager.NetApp.Models.NetAppMirrorState? mirrorState = default(Azure.ResourceManager.NetApp.Models.NetAppMirrorState?), string unhealthyReason = null, string errorMessage = null, long? totalTransferBytes = default(long?)) { throw null; } @@ -1118,7 +1948,9 @@ public static partial class ArmNetAppModelFactory public static Azure.ResourceManager.NetApp.Models.NetAppVolumeBackupStatus NetAppVolumeBackupStatus(bool? isHealthy, Azure.ResourceManager.NetApp.Models.NetAppRelationshipStatus? relationshipStatus, Azure.ResourceManager.NetApp.Models.NetAppMirrorState? mirrorState, string unhealthyReason, string errorMessage, long? lastTransferSize, string lastTransferType, long? totalTransferBytes) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppVolumeBackupStatus NetAppVolumeBackupStatus(bool? isHealthy = default(bool?), Azure.ResourceManager.NetApp.Models.NetAppRelationshipStatus? relationshipStatus = default(Azure.ResourceManager.NetApp.Models.NetAppRelationshipStatus?), Azure.ResourceManager.NetApp.Models.NetAppMirrorState? mirrorState = default(Azure.ResourceManager.NetApp.Models.NetAppMirrorState?), string unhealthyReason = null, string errorMessage = null, long? lastTransferSize = default(long?), string lastTransferType = null, long? totalTransferBytes = default(long?), long? transferProgressBytes = default(long?)) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppVolumeBackupStatus NetAppVolumeBackupStatus(bool? isHealthy = default(bool?), Azure.ResourceManager.NetApp.Models.VolumeBackupRelationshipStatus? volumeBackupRelationshipStatus = default(Azure.ResourceManager.NetApp.Models.VolumeBackupRelationshipStatus?), Azure.ResourceManager.NetApp.Models.NetAppMirrorState? mirrorState = default(Azure.ResourceManager.NetApp.Models.NetAppMirrorState?), string unhealthyReason = null, string errorMessage = null, long? lastTransferSize = default(long?), string lastTransferType = null, long? totalTransferBytes = default(long?), long? transferProgressBytes = default(long?)) { throw null; } - public static Azure.ResourceManager.NetApp.NetAppVolumeData NetAppVolumeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable zones = null, System.Guid? fileSystemId = default(System.Guid?), string creationToken = null, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel? serviceLevel = default(Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel?), long usageThreshold = (long)0, System.Collections.Generic.IEnumerable exportRules = null, System.Collections.Generic.IEnumerable protocolTypes = null, string provisioningState = null, string snapshotId = null, bool? deleteBaseSnapshot = default(bool?), string backupId = null, string baremetalTenantId = null, Azure.Core.ResourceIdentifier subnetId = null, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? networkFeatures = default(Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature?), Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? effectiveNetworkFeatures = default(Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature?), System.Guid? networkSiblingSetId = default(System.Guid?), Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity?), System.Collections.Generic.IEnumerable mountTargets = null, string volumeType = null, Azure.ResourceManager.NetApp.Models.NetAppVolumeDataProtection dataProtection = null, Azure.ResourceManager.NetApp.Models.AcceptGrowCapacityPoolForShortTermCloneSplit? acceptGrowCapacityPoolForShortTermCloneSplit = default(Azure.ResourceManager.NetApp.Models.AcceptGrowCapacityPoolForShortTermCloneSplit?), bool? isRestoring = default(bool?), bool? isSnapshotDirectoryVisible = default(bool?), bool? isKerberosEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle? securityStyle = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle?), bool? isSmbEncryptionEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration? smbAccessBasedEnumeration = default(Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration?), Azure.ResourceManager.NetApp.Models.SmbNonBrowsable? smbNonBrowsable = default(Azure.ResourceManager.NetApp.Models.SmbNonBrowsable?), bool? isSmbContinuouslyAvailable = default(bool?), float? throughputMibps = default(float?), float? actualThroughputMibps = default(float?), Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource? encryptionKeySource = default(Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource?), Azure.Core.ResourceIdentifier keyVaultPrivateEndpointResourceId = null, bool? isLdapEnabled = default(bool?), bool? isCoolAccessEnabled = default(bool?), int? coolnessPeriod = default(int?), Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy = default(Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy?), Azure.ResourceManager.NetApp.Models.CoolAccessTieringPolicy? coolAccessTieringPolicy = default(Azure.ResourceManager.NetApp.Models.CoolAccessTieringPolicy?), string unixPermissions = null, int? cloneProgress = default(int?), Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog? fileAccessLogs = default(Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog?), Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore? avsDataStore = default(Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore?), System.Collections.Generic.IEnumerable dataStoreResourceId = null, bool? isDefaultQuotaEnabled = default(bool?), long? defaultUserQuotaInKiBs = default(long?), long? defaultGroupQuotaInKiBs = default(long?), long? maximumNumberOfFiles = default(long?), string volumeGroupName = null, Azure.Core.ResourceIdentifier capacityPoolResourceId = null, Azure.Core.ResourceIdentifier proximityPlacementGroupId = null, string t2Network = null, string volumeSpecName = null, bool? isEncrypted = default(bool?), System.Collections.Generic.IEnumerable placementRules = null, Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume? enableSubvolumes = default(Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume?), string provisionedAvailabilityZone = null, bool? isLargeVolume = default(bool?), Azure.Core.ResourceIdentifier originatingResourceId = null, long? inheritedSizeInBytes = default(long?)) { throw null; } + public static Azure.ResourceManager.NetApp.NetAppVolumeData NetAppVolumeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable zones = null, System.Guid? fileSystemId = default(System.Guid?), string creationToken = null, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel? serviceLevel = default(Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel?), long usageThreshold = (long)0, System.Collections.Generic.IEnumerable exportRules = null, System.Collections.Generic.IEnumerable protocolTypes = null, string provisioningState = null, string snapshotId = null, bool? deleteBaseSnapshot = default(bool?), string backupId = null, string baremetalTenantId = null, Azure.Core.ResourceIdentifier subnetId = null, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? networkFeatures = default(Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature?), Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? effectiveNetworkFeatures = default(Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature?), System.Guid? networkSiblingSetId = default(System.Guid?), Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity?), System.Collections.Generic.IEnumerable mountTargets = null, string volumeType = null, Azure.ResourceManager.NetApp.Models.NetAppVolumeDataProtection dataProtection = null, Azure.ResourceManager.NetApp.Models.AcceptGrowCapacityPoolForShortTermCloneSplit? acceptGrowCapacityPoolForShortTermCloneSplit = default(Azure.ResourceManager.NetApp.Models.AcceptGrowCapacityPoolForShortTermCloneSplit?), bool? isRestoring = default(bool?), bool? isSnapshotDirectoryVisible = default(bool?), bool? isKerberosEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle? securityStyle = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle?), bool? isSmbEncryptionEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration? smbAccessBasedEnumeration = default(Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration?), Azure.ResourceManager.NetApp.Models.SmbNonBrowsable? smbNonBrowsable = default(Azure.ResourceManager.NetApp.Models.SmbNonBrowsable?), bool? isSmbContinuouslyAvailable = default(bool?), float? throughputMibps = default(float?), float? actualThroughputMibps = default(float?), Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource? encryptionKeySource = default(Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource?), Azure.Core.ResourceIdentifier keyVaultPrivateEndpointResourceId = null, bool? isLdapEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.LdapServerType? ldapServerType = default(Azure.ResourceManager.NetApp.Models.LdapServerType?), bool? isCoolAccessEnabled = default(bool?), int? coolnessPeriod = default(int?), Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy = default(Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy?), Azure.ResourceManager.NetApp.Models.CoolAccessTieringPolicy? coolAccessTieringPolicy = default(Azure.ResourceManager.NetApp.Models.CoolAccessTieringPolicy?), string unixPermissions = null, int? cloneProgress = default(int?), Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog? fileAccessLogs = default(Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog?), Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore? avsDataStore = default(Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore?), System.Collections.Generic.IEnumerable dataStoreResourceId = null, bool? isDefaultQuotaEnabled = default(bool?), long? defaultUserQuotaInKiBs = default(long?), long? defaultGroupQuotaInKiBs = default(long?), long? maximumNumberOfFiles = default(long?), string volumeGroupName = null, Azure.Core.ResourceIdentifier capacityPoolResourceId = null, Azure.Core.ResourceIdentifier proximityPlacementGroupId = null, string t2Network = null, string volumeSpecName = null, bool? isEncrypted = default(bool?), System.Collections.Generic.IEnumerable placementRules = null, Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume? enableSubvolumes = default(Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume?), string provisionedAvailabilityZone = null, bool? isLargeVolume = default(bool?), Azure.ResourceManager.NetApp.Models.LargeVolumeType? largeVolumeType = default(Azure.ResourceManager.NetApp.Models.LargeVolumeType?), Azure.Core.ResourceIdentifier originatingResourceId = null, long? inheritedSizeInBytes = default(long?), Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage? language = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage?), Azure.ResourceManager.NetApp.Models.BreakthroughMode? breakthroughMode = default(Azure.ResourceManager.NetApp.Models.BreakthroughMode?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.NetApp.NetAppVolumeData NetAppVolumeData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ETag? etag, System.Collections.Generic.IEnumerable zones, System.Guid? fileSystemId, string creationToken, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel? serviceLevel, long usageThreshold, System.Collections.Generic.IEnumerable exportRules, System.Collections.Generic.IEnumerable protocolTypes, string provisioningState, string snapshotId, bool? deleteBaseSnapshot, string backupId, string baremetalTenantId, Azure.Core.ResourceIdentifier subnetId, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? networkFeatures, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? effectiveNetworkFeatures, System.Guid? networkSiblingSetId, Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity, System.Collections.Generic.IEnumerable mountTargets, string volumeType, Azure.ResourceManager.NetApp.Models.NetAppVolumeDataProtection dataProtection, Azure.ResourceManager.NetApp.Models.AcceptGrowCapacityPoolForShortTermCloneSplit? acceptGrowCapacityPoolForShortTermCloneSplit, bool? isRestoring, bool? isSnapshotDirectoryVisible, bool? isKerberosEnabled, Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle? securityStyle, bool? isSmbEncryptionEnabled, Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration? smbAccessBasedEnumeration, Azure.ResourceManager.NetApp.Models.SmbNonBrowsable? smbNonBrowsable, bool? isSmbContinuouslyAvailable, float? throughputMibps, float? actualThroughputMibps, Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource? encryptionKeySource, Azure.Core.ResourceIdentifier keyVaultPrivateEndpointResourceId, bool? isLdapEnabled, bool? isCoolAccessEnabled, int? coolnessPeriod, Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy, Azure.ResourceManager.NetApp.Models.CoolAccessTieringPolicy? coolAccessTieringPolicy, string unixPermissions, int? cloneProgress, Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog? fileAccessLogs, Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore? avsDataStore, System.Collections.Generic.IEnumerable dataStoreResourceId, bool? isDefaultQuotaEnabled, long? defaultUserQuotaInKiBs, long? defaultGroupQuotaInKiBs, long? maximumNumberOfFiles, string volumeGroupName, Azure.Core.ResourceIdentifier capacityPoolResourceId, Azure.Core.ResourceIdentifier proximityPlacementGroupId, string t2Network, string volumeSpecName, bool? isEncrypted, System.Collections.Generic.IEnumerable placementRules, Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume? enableSubvolumes, string provisionedAvailabilityZone, bool? isLargeVolume, Azure.Core.ResourceIdentifier originatingResourceId, long? inheritedSizeInBytes) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetApp.NetAppVolumeData NetAppVolumeData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ETag? etag, System.Collections.Generic.IEnumerable zones, System.Guid? fileSystemId, string creationToken, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel? serviceLevel, long usageThreshold, System.Collections.Generic.IEnumerable exportRules, System.Collections.Generic.IEnumerable protocolTypes, string provisioningState, string snapshotId, bool? deleteBaseSnapshot, string backupId, string baremetalTenantId, Azure.Core.ResourceIdentifier subnetId, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? networkFeatures, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? effectiveNetworkFeatures, System.Guid? networkSiblingSetId, Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity, System.Collections.Generic.IEnumerable mountTargets, string volumeType, Azure.ResourceManager.NetApp.Models.NetAppVolumeDataProtection dataProtection, bool? isRestoring, bool? isSnapshotDirectoryVisible, bool? isKerberosEnabled, Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle? securityStyle, bool? isSmbEncryptionEnabled, Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration? smbAccessBasedEnumeration, Azure.ResourceManager.NetApp.Models.SmbNonBrowsable? smbNonBrowsable, bool? isSmbContinuouslyAvailable, float? throughputMibps, float? actualThroughputMibps, Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource? encryptionKeySource, Azure.Core.ResourceIdentifier keyVaultPrivateEndpointResourceId, bool? isLdapEnabled, bool? isCoolAccessEnabled, int? coolnessPeriod, Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy, Azure.ResourceManager.NetApp.Models.CoolAccessTieringPolicy? coolAccessTieringPolicy, string unixPermissions, int? cloneProgress, Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog? fileAccessLogs, Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore? avsDataStore, System.Collections.Generic.IEnumerable dataStoreResourceId, bool? isDefaultQuotaEnabled, long? defaultUserQuotaInKiBs, long? defaultGroupQuotaInKiBs, long? maximumNumberOfFiles, string volumeGroupName, Azure.Core.ResourceIdentifier capacityPoolResourceId, Azure.Core.ResourceIdentifier proximityPlacementGroupId, string t2Network, string volumeSpecName, bool? isEncrypted, System.Collections.Generic.IEnumerable placementRules, Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume? enableSubvolumes, string provisionedAvailabilityZone, bool? isLargeVolume, Azure.Core.ResourceIdentifier originatingResourceId) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -1132,7 +1964,9 @@ public static partial class ArmNetAppModelFactory [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetApp.Models.NetAppVolumeGroupMetadata NetAppVolumeGroupMetadata(string groupDescription, Azure.ResourceManager.NetApp.Models.NetAppApplicationType? applicationType, string applicationIdentifier, System.Collections.Generic.IEnumerable globalPlacementRules, string deploymentSpecId, long? volumesCount) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppVolumeGroupResult NetAppVolumeGroupResult(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string provisioningState = null, Azure.ResourceManager.NetApp.Models.NetAppVolumeGroupMetadata groupMetaData = null) { throw null; } - public static Azure.ResourceManager.NetApp.Models.NetAppVolumeGroupVolume NetAppVolumeGroupVolume(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IEnumerable zones = null, System.Guid? fileSystemId = default(System.Guid?), string creationToken = null, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel? serviceLevel = default(Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel?), long usageThreshold = (long)0, System.Collections.Generic.IEnumerable exportRules = null, System.Collections.Generic.IEnumerable protocolTypes = null, string provisioningState = null, string snapshotId = null, bool? deleteBaseSnapshot = default(bool?), string backupId = null, string baremetalTenantId = null, Azure.Core.ResourceIdentifier subnetId = null, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? networkFeatures = default(Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature?), Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? effectiveNetworkFeatures = default(Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature?), System.Guid? networkSiblingSetId = default(System.Guid?), Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity?), System.Collections.Generic.IEnumerable mountTargets = null, string volumeType = null, Azure.ResourceManager.NetApp.Models.NetAppVolumeDataProtection dataProtection = null, Azure.ResourceManager.NetApp.Models.AcceptGrowCapacityPoolForShortTermCloneSplit? acceptGrowCapacityPoolForShortTermCloneSplit = default(Azure.ResourceManager.NetApp.Models.AcceptGrowCapacityPoolForShortTermCloneSplit?), bool? isRestoring = default(bool?), bool? isSnapshotDirectoryVisible = default(bool?), bool? isKerberosEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle? securityStyle = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle?), bool? isSmbEncryptionEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration? smbAccessBasedEnumeration = default(Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration?), Azure.ResourceManager.NetApp.Models.SmbNonBrowsable? smbNonBrowsable = default(Azure.ResourceManager.NetApp.Models.SmbNonBrowsable?), bool? isSmbContinuouslyAvailable = default(bool?), float? throughputMibps = default(float?), float? actualThroughputMibps = default(float?), Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource? encryptionKeySource = default(Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource?), Azure.Core.ResourceIdentifier keyVaultPrivateEndpointResourceId = null, bool? isLdapEnabled = default(bool?), bool? isCoolAccessEnabled = default(bool?), int? coolnessPeriod = default(int?), Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy = default(Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy?), Azure.ResourceManager.NetApp.Models.CoolAccessTieringPolicy? coolAccessTieringPolicy = default(Azure.ResourceManager.NetApp.Models.CoolAccessTieringPolicy?), string unixPermissions = null, int? cloneProgress = default(int?), Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog? fileAccessLogs = default(Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog?), Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore? avsDataStore = default(Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore?), System.Collections.Generic.IEnumerable dataStoreResourceId = null, bool? isDefaultQuotaEnabled = default(bool?), long? defaultUserQuotaInKiBs = default(long?), long? defaultGroupQuotaInKiBs = default(long?), long? maximumNumberOfFiles = default(long?), string volumeGroupName = null, Azure.Core.ResourceIdentifier capacityPoolResourceId = null, Azure.Core.ResourceIdentifier proximityPlacementGroupId = null, string t2Network = null, string volumeSpecName = null, bool? isEncrypted = default(bool?), System.Collections.Generic.IEnumerable placementRules = null, Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume? enableSubvolumes = default(Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume?), string provisionedAvailabilityZone = null, bool? isLargeVolume = default(bool?), Azure.Core.ResourceIdentifier originatingResourceId = null, long? inheritedSizeInBytes = default(long?)) { throw null; } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeGroupVolume NetAppVolumeGroupVolume(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IEnumerable zones = null, System.Guid? fileSystemId = default(System.Guid?), string creationToken = null, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel? serviceLevel = default(Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel?), long usageThreshold = (long)0, System.Collections.Generic.IEnumerable exportRules = null, System.Collections.Generic.IEnumerable protocolTypes = null, string provisioningState = null, string snapshotId = null, bool? deleteBaseSnapshot = default(bool?), string backupId = null, string baremetalTenantId = null, Azure.Core.ResourceIdentifier subnetId = null, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? networkFeatures = default(Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature?), Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? effectiveNetworkFeatures = default(Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature?), System.Guid? networkSiblingSetId = default(System.Guid?), Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity?), System.Collections.Generic.IEnumerable mountTargets = null, string volumeType = null, Azure.ResourceManager.NetApp.Models.NetAppVolumeDataProtection dataProtection = null, Azure.ResourceManager.NetApp.Models.AcceptGrowCapacityPoolForShortTermCloneSplit? acceptGrowCapacityPoolForShortTermCloneSplit = default(Azure.ResourceManager.NetApp.Models.AcceptGrowCapacityPoolForShortTermCloneSplit?), bool? isRestoring = default(bool?), bool? isSnapshotDirectoryVisible = default(bool?), bool? isKerberosEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle? securityStyle = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle?), bool? isSmbEncryptionEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration? smbAccessBasedEnumeration = default(Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration?), Azure.ResourceManager.NetApp.Models.SmbNonBrowsable? smbNonBrowsable = default(Azure.ResourceManager.NetApp.Models.SmbNonBrowsable?), bool? isSmbContinuouslyAvailable = default(bool?), float? throughputMibps = default(float?), float? actualThroughputMibps = default(float?), Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource? encryptionKeySource = default(Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource?), Azure.Core.ResourceIdentifier keyVaultPrivateEndpointResourceId = null, bool? isLdapEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.LdapServerType? ldapServerType = default(Azure.ResourceManager.NetApp.Models.LdapServerType?), bool? isCoolAccessEnabled = default(bool?), int? coolnessPeriod = default(int?), Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy = default(Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy?), Azure.ResourceManager.NetApp.Models.CoolAccessTieringPolicy? coolAccessTieringPolicy = default(Azure.ResourceManager.NetApp.Models.CoolAccessTieringPolicy?), string unixPermissions = null, int? cloneProgress = default(int?), Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog? fileAccessLogs = default(Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog?), Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore? avsDataStore = default(Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore?), System.Collections.Generic.IEnumerable dataStoreResourceId = null, bool? isDefaultQuotaEnabled = default(bool?), long? defaultUserQuotaInKiBs = default(long?), long? defaultGroupQuotaInKiBs = default(long?), long? maximumNumberOfFiles = default(long?), string volumeGroupName = null, Azure.Core.ResourceIdentifier capacityPoolResourceId = null, Azure.Core.ResourceIdentifier proximityPlacementGroupId = null, string t2Network = null, string volumeSpecName = null, bool? isEncrypted = default(bool?), System.Collections.Generic.IEnumerable placementRules = null, Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume? enableSubvolumes = default(Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume?), string provisionedAvailabilityZone = null, bool? isLargeVolume = default(bool?), Azure.ResourceManager.NetApp.Models.LargeVolumeType? largeVolumeType = default(Azure.ResourceManager.NetApp.Models.LargeVolumeType?), Azure.Core.ResourceIdentifier originatingResourceId = null, long? inheritedSizeInBytes = default(long?), Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage? language = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage?), Azure.ResourceManager.NetApp.Models.BreakthroughMode? breakthroughMode = default(Azure.ResourceManager.NetApp.Models.BreakthroughMode?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeGroupVolume NetAppVolumeGroupVolume(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType? resourceType, System.Collections.Generic.IDictionary tags, System.Collections.Generic.IEnumerable zones, System.Guid? fileSystemId, string creationToken, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel? serviceLevel, long usageThreshold, System.Collections.Generic.IEnumerable exportRules, System.Collections.Generic.IEnumerable protocolTypes, string provisioningState, string snapshotId, bool? deleteBaseSnapshot, string backupId, string baremetalTenantId, Azure.Core.ResourceIdentifier subnetId, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? networkFeatures, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? effectiveNetworkFeatures, System.Guid? networkSiblingSetId, Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity, System.Collections.Generic.IEnumerable mountTargets, string volumeType, Azure.ResourceManager.NetApp.Models.NetAppVolumeDataProtection dataProtection, Azure.ResourceManager.NetApp.Models.AcceptGrowCapacityPoolForShortTermCloneSplit? acceptGrowCapacityPoolForShortTermCloneSplit, bool? isRestoring, bool? isSnapshotDirectoryVisible, bool? isKerberosEnabled, Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle? securityStyle, bool? isSmbEncryptionEnabled, Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration? smbAccessBasedEnumeration, Azure.ResourceManager.NetApp.Models.SmbNonBrowsable? smbNonBrowsable, bool? isSmbContinuouslyAvailable, float? throughputMibps, float? actualThroughputMibps, Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource? encryptionKeySource, Azure.Core.ResourceIdentifier keyVaultPrivateEndpointResourceId, bool? isLdapEnabled, bool? isCoolAccessEnabled, int? coolnessPeriod, Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy, Azure.ResourceManager.NetApp.Models.CoolAccessTieringPolicy? coolAccessTieringPolicy, string unixPermissions, int? cloneProgress, Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog? fileAccessLogs, Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore? avsDataStore, System.Collections.Generic.IEnumerable dataStoreResourceId, bool? isDefaultQuotaEnabled, long? defaultUserQuotaInKiBs, long? defaultGroupQuotaInKiBs, long? maximumNumberOfFiles, string volumeGroupName, Azure.Core.ResourceIdentifier capacityPoolResourceId, Azure.Core.ResourceIdentifier proximityPlacementGroupId, string t2Network, string volumeSpecName, bool? isEncrypted, System.Collections.Generic.IEnumerable placementRules, Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume? enableSubvolumes, string provisionedAvailabilityZone, bool? isLargeVolume, Azure.Core.ResourceIdentifier originatingResourceId, long? inheritedSizeInBytes) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetApp.Models.NetAppVolumeGroupVolume NetAppVolumeGroupVolume(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType? resourceType, System.Collections.Generic.IDictionary tags, System.Collections.Generic.IEnumerable zones, System.Guid? fileSystemId, string creationToken, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel? serviceLevel, long usageThreshold, System.Collections.Generic.IEnumerable exportRules, System.Collections.Generic.IEnumerable protocolTypes, string provisioningState, string snapshotId, bool? deleteBaseSnapshot, string backupId, string baremetalTenantId, Azure.Core.ResourceIdentifier subnetId, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? networkFeatures, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? effectiveNetworkFeatures, System.Guid? networkSiblingSetId, Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity, System.Collections.Generic.IEnumerable mountTargets, string volumeType, Azure.ResourceManager.NetApp.Models.NetAppVolumeDataProtection dataProtection, bool? isRestoring, bool? isSnapshotDirectoryVisible, bool? isKerberosEnabled, Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle? securityStyle, bool? isSmbEncryptionEnabled, Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration? smbAccessBasedEnumeration, Azure.ResourceManager.NetApp.Models.SmbNonBrowsable? smbNonBrowsable, bool? isSmbContinuouslyAvailable, float? throughputMibps, float? actualThroughputMibps, Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource? encryptionKeySource, Azure.Core.ResourceIdentifier keyVaultPrivateEndpointResourceId, bool? isLdapEnabled, bool? isCoolAccessEnabled, int? coolnessPeriod, Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy, Azure.ResourceManager.NetApp.Models.CoolAccessTieringPolicy? coolAccessTieringPolicy, string unixPermissions, int? cloneProgress, Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog? fileAccessLogs, Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore? avsDataStore, System.Collections.Generic.IEnumerable dataStoreResourceId, bool? isDefaultQuotaEnabled, long? defaultUserQuotaInKiBs, long? defaultGroupQuotaInKiBs, long? maximumNumberOfFiles, string volumeGroupName, Azure.Core.ResourceIdentifier capacityPoolResourceId, Azure.Core.ResourceIdentifier proximityPlacementGroupId, string t2Network, string volumeSpecName, bool? isEncrypted, System.Collections.Generic.IEnumerable placementRules, Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume? enableSubvolumes, string provisionedAvailabilityZone, bool? isLargeVolume, Azure.Core.ResourceIdentifier originatingResourceId) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -1147,6 +1981,8 @@ public static partial class ArmNetAppModelFactory public static Azure.ResourceManager.NetApp.Models.NetAppVolumePatch NetAppVolumePatch(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel? serviceLevel, long? usageThreshold, System.Collections.Generic.IEnumerable exportRules, System.Collections.Generic.IEnumerable protocolTypes, float? throughputMibps, Azure.ResourceManager.NetApp.Models.NetAppVolumePatchDataProtection dataProtection, bool? isDefaultQuotaEnabled, long? defaultUserQuotaInKiBs, long? defaultGroupQuotaInKiBs, string unixPermissions, bool? isCoolAccessEnabled, int? coolnessPeriod, Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy, bool? isSnapshotDirectoryVisible, Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration? smbAccessBasedEnumeration, Azure.ResourceManager.NetApp.Models.SmbNonBrowsable? smbNonBrowsable) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetApp.Models.NetAppVolumePatch NetAppVolumePatch(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel? serviceLevel, long? usageThreshold, System.Collections.Generic.IEnumerable exportRules, float? throughputMibps, Azure.Core.ResourceIdentifier snapshotPolicyId = null, bool? isDefaultQuotaEnabled = default(bool?), long? defaultUserQuotaInKiBs = default(long?), long? defaultGroupQuotaInKiBs = default(long?), string unixPermissions = null, bool? isCoolAccessEnabled = default(bool?), int? coolnessPeriod = default(int?), Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy = default(Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy?), bool? isSnapshotDirectoryVisible = default(bool?), Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration? smbAccessBasedEnumeration = default(Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration?), Azure.ResourceManager.NetApp.Models.SmbNonBrowsable? smbNonBrowsable = default(Azure.ResourceManager.NetApp.Models.SmbNonBrowsable?)) { throw null; } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeQuotaReport NetAppVolumeQuotaReport(Azure.ResourceManager.NetApp.Models.NetAppVolumeQuotaType? quotaType = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeQuotaType?), string quotaTarget = null, long? quotaLimitUsedInKiBs = default(long?), long? quotaLimitTotalInKiBs = default(long?), float? percentageUsed = default(float?), bool? isDerivedQuota = default(bool?)) { throw null; } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeQuotaReportListResult NetAppVolumeQuotaReportListResult(System.Collections.Generic.IEnumerable value = null) { throw null; } public static Azure.ResourceManager.NetApp.NetAppVolumeQuotaRuleData NetAppVolumeQuotaRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? provisioningState = default(Azure.ResourceManager.NetApp.Models.NetAppProvisioningState?), long? quotaSizeInKiBs = default(long?), Azure.ResourceManager.NetApp.Models.NetAppVolumeQuotaType? quotaType = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeQuotaType?), string quotaTarget = null) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppVolumeQuotaRulePatch NetAppVolumeQuotaRulePatch(System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? provisioningState = default(Azure.ResourceManager.NetApp.Models.NetAppProvisioningState?), long? quotaSizeInKiBs = default(long?), Azure.ResourceManager.NetApp.Models.NetAppVolumeQuotaType? quotaType = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeQuotaType?), string quotaTarget = null) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppVolumeRelocationProperties NetAppVolumeRelocationProperties(bool? isRelocationRequested = default(bool?), bool? isReadyToBeFinalized = default(bool?)) { throw null; } @@ -1160,9 +1996,16 @@ public static partial class ArmNetAppModelFactory public static Azure.ResourceManager.NetApp.NetAppVolumeSnapshotData NetAppVolumeSnapshotData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string snapshotId = null, System.DateTimeOffset? created = default(System.DateTimeOffset?), string provisioningState = null) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetworkSiblingSet NetworkSiblingSet(string networkSiblingSetId = null, Azure.Core.ResourceIdentifier subnetId = null, string networkSiblingSetStateId = null, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? networkFeatures = default(Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature?), Azure.ResourceManager.NetApp.Models.NetworkSiblingSetProvisioningState? provisioningState = default(Azure.ResourceManager.NetApp.Models.NetworkSiblingSetProvisioningState?), System.Collections.Generic.IEnumerable nicInfoList = null) { throw null; } public static Azure.ResourceManager.NetApp.Models.NicInfo NicInfo(string ipAddress = null, System.Collections.Generic.IEnumerable volumeResourceIds = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.PeeringPassphrases PeeringPassphrases(string clusterPeeringCommand = null, string clusterPeeringPassphrase = null, string vserverPeeringCommand = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.RansomwareProtectionSettings RansomwareProtectionSettings(Azure.ResourceManager.NetApp.Models.DesiredRansomwareProtectionState? desiredRansomwareProtectionState = default(Azure.ResourceManager.NetApp.Models.DesiredRansomwareProtectionState?), Azure.ResourceManager.NetApp.Models.ActualRansomwareProtectionState? actualRansomwareProtectionState = default(Azure.ResourceManager.NetApp.Models.ActualRansomwareProtectionState?)) { throw null; } + public static Azure.ResourceManager.NetApp.RansomwareReportData RansomwareReportData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NetApp.Models.RansomwareReportProperties properties = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.RansomwareReportProperties RansomwareReportProperties(System.DateTimeOffset? eventOn = default(System.DateTimeOffset?), Azure.ResourceManager.NetApp.Models.RansomwareReportState? state = default(Azure.ResourceManager.NetApp.Models.RansomwareReportState?), Azure.ResourceManager.NetApp.Models.RansomwareReportSeverity? severity = default(Azure.ResourceManager.NetApp.Models.RansomwareReportSeverity?), int? clearedCount = default(int?), int? reportedCount = default(int?), System.Collections.Generic.IEnumerable suspects = null, string provisioningState = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.RansomwareSuspects RansomwareSuspects(string extension = null, Azure.ResourceManager.NetApp.Models.RansomwareSuspectResolution? resolution = default(Azure.ResourceManager.NetApp.Models.RansomwareSuspectResolution?), int? fileCount = default(int?), System.Collections.Generic.IEnumerable suspectFiles = null) { throw null; } public static Azure.ResourceManager.NetApp.RegionInfoResourceData RegionInfoResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NetApp.Models.RegionStorageToNetworkProximity? storageToNetworkProximity = default(Azure.ResourceManager.NetApp.Models.RegionStorageToNetworkProximity?), System.Collections.Generic.IEnumerable availabilityZoneMappings = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.SecretPasswordIdentity SecretPasswordIdentity(string principalId = null, string userAssignedIdentity = null) { throw null; } public static Azure.ResourceManager.NetApp.SnapshotPolicyData SnapshotPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.NetApp.Models.SnapshotPolicyHourlySchedule hourlySchedule = null, Azure.ResourceManager.NetApp.Models.SnapshotPolicyDailySchedule dailySchedule = null, Azure.ResourceManager.NetApp.Models.SnapshotPolicyWeeklySchedule weeklySchedule = null, Azure.ResourceManager.NetApp.Models.SnapshotPolicyMonthlySchedule monthlySchedule = null, bool? isEnabled = default(bool?), string provisioningState = null) { throw null; } public static Azure.ResourceManager.NetApp.Models.SnapshotPolicyPatch SnapshotPolicyPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetApp.Models.SnapshotPolicyHourlySchedule hourlySchedule = null, Azure.ResourceManager.NetApp.Models.SnapshotPolicyDailySchedule dailySchedule = null, Azure.ResourceManager.NetApp.Models.SnapshotPolicyWeeklySchedule weeklySchedule = null, Azure.ResourceManager.NetApp.Models.SnapshotPolicyMonthlySchedule monthlySchedule = null, bool? isEnabled = default(bool?), string provisioningState = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.SuspectFile SuspectFile(string suspectFileName = null, System.DateTimeOffset? fileTimestamp = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.NetApp.Models.SvmPeerCommandResult SvmPeerCommandResult(string svmPeeringCommand = null) { throw null; } } public partial class AvailabilityZoneMapping : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel @@ -1177,6 +2020,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class AzureResourceManagerCommonTypesManagedServiceIdentityUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AzureResourceManagerCommonTypesManagedServiceIdentityUpdate() { } + public Azure.ResourceManager.NetApp.Models.ManagedServiceIdentityType? ManagedServiceIdentityType { get { throw null; } set { } } + public System.Collections.Generic.IDictionary UserAssignedIdentities { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.AzureResourceManagerCommonTypesManagedServiceIdentityUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.AzureResourceManagerCommonTypesManagedServiceIdentityUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class BackupsMigrationContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public BackupsMigrationContent(string backupVaultId) { } @@ -1189,75 +2044,302 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct CapacityPoolEncryptionType : System.IEquatable + public readonly partial struct BreakthroughMode : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public CapacityPoolEncryptionType(string value) { throw null; } - public static Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType Double { get { throw null; } } - public static Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType Single { get { throw null; } } - public bool Equals(Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType other) { throw null; } + public BreakthroughMode(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.BreakthroughMode Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.BreakthroughMode Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.BreakthroughMode other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType left, Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType right) { throw null; } - public static implicit operator Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType left, Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.BreakthroughMode left, Azure.ResourceManager.NetApp.Models.BreakthroughMode right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.BreakthroughMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.BreakthroughMode left, Azure.ResourceManager.NetApp.Models.BreakthroughMode right) { throw null; } public override string ToString() { throw null; } } - public partial class CapacityPoolPatch : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CapacityPoolPatch(Azure.Core.AzureLocation location) { } - public float? CustomThroughputMibps { get { throw null; } set { } } - public int? CustomThroughputMibpsInt { get { throw null; } set { } } - public bool? IsCoolAccessEnabled { get { throw null; } set { } } - public Azure.ResourceManager.NetApp.Models.CapacityPoolQosType? QosType { get { throw null; } set { } } - public long? Size { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.NetApp.Models.CapacityPoolPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.NetApp.Models.CapacityPoolPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct CapacityPoolQosType : System.IEquatable + public readonly partial struct CacheLifeCycleState : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public CapacityPoolQosType(string value) { throw null; } - public static Azure.ResourceManager.NetApp.Models.CapacityPoolQosType Auto { get { throw null; } } - public static Azure.ResourceManager.NetApp.Models.CapacityPoolQosType Manual { get { throw null; } } - public bool Equals(Azure.ResourceManager.NetApp.Models.CapacityPoolQosType other) { throw null; } + public CacheLifeCycleState(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.CacheLifeCycleState ClusterPeeringOfferSent { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.CacheLifeCycleState Creating { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.CacheLifeCycleState Failed { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.CacheLifeCycleState Succeeded { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.CacheLifeCycleState VserverPeeringOfferSent { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.CacheLifeCycleState other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.NetApp.Models.CapacityPoolQosType left, Azure.ResourceManager.NetApp.Models.CapacityPoolQosType right) { throw null; } - public static implicit operator Azure.ResourceManager.NetApp.Models.CapacityPoolQosType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.NetApp.Models.CapacityPoolQosType left, Azure.ResourceManager.NetApp.Models.CapacityPoolQosType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.CacheLifeCycleState left, Azure.ResourceManager.NetApp.Models.CacheLifeCycleState right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.CacheLifeCycleState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.CacheLifeCycleState left, Azure.ResourceManager.NetApp.Models.CacheLifeCycleState right) { throw null; } public override string ToString() { throw null; } } - public partial class ClusterPeerCommandResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class CacheMountTargetProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal ClusterPeerCommandResult() { } - public string PeerAcceptCommand { get { throw null; } } + internal CacheMountTargetProperties() { } + public string IPAddress { get { throw null; } } + public string MountTargetId { get { throw null; } } + public string SmbServerFqdn { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.NetApp.Models.ClusterPeerCommandResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.NetApp.Models.ClusterPeerCommandResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.NetApp.Models.CacheMountTargetProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.CacheMountTargetProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct CoolAccessRetrievalPolicy : System.IEquatable + public partial class CachePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public CoolAccessRetrievalPolicy(string value) { throw null; } - public static Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy Default { get { throw null; } } - public static Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy Never { get { throw null; } } + public CachePatch() { } + public Azure.ResourceManager.NetApp.Models.CacheUpdateProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.CachePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.CachePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CacheProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CacheProperties(string filepath, long size, Azure.Core.ResourceIdentifier cacheSubnetResourceId, Azure.Core.ResourceIdentifier peeringSubnetResourceId, Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource encryptionKeySource, Azure.ResourceManager.NetApp.Models.OriginClusterInformation originClusterInformation) { } + public float? ActualThroughputMibps { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.CacheLifeCycleState? CacheState { get { throw null; } } + public Azure.Core.ResourceIdentifier CacheSubnetResourceId { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.CifsChangeNotifyState? CifsChangeNotifications { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.EncryptionState? Encryption { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource EncryptionKeySource { get { throw null; } set { } } + public System.Collections.Generic.IList ExportPolicy { get { throw null; } } + public string Filepath { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.GlobalFileLockingState? GlobalFileLocking { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.KerberosState? Kerberos { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier KeyVaultPrivateEndpointResourceId { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage? Language { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.LdapState? Ldap { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.LdapServerType? LdapServerType { get { throw null; } set { } } + public long? MaximumNumberOfFiles { get { throw null; } } + public System.Collections.Generic.IReadOnlyList MountTargets { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.OriginClusterInformation OriginClusterInformation { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier PeeringSubnetResourceId { get { throw null; } set { } } + public System.Collections.Generic.IList ProtocolTypes { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.CacheProvisioningState? ProvisioningState { get { throw null; } } + public long Size { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.SmbSettings SmbSettings { get { throw null; } set { } } + public float? ThroughputMibps { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.EnableWriteBackState? WriteBack { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.CacheProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.CacheProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CacheProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CacheProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.CacheProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.CacheProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.CacheProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.CacheProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.CacheProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.CacheProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.CacheProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.CacheProvisioningState left, Azure.ResourceManager.NetApp.Models.CacheProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.CacheProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.CacheProvisioningState left, Azure.ResourceManager.NetApp.Models.CacheProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CacheUpdateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CacheUpdateProperties() { } + public Azure.ResourceManager.NetApp.Models.CifsChangeNotifyState? CifsChangeNotifications { get { throw null; } set { } } + public System.Collections.Generic.IList ExportPolicy { get { throw null; } } + public Azure.Core.ResourceIdentifier KeyVaultPrivateEndpointResourceId { get { throw null; } set { } } + public System.Collections.Generic.IList ProtocolTypes { get { throw null; } } + public long? Size { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.SmbSettings SmbSettings { get { throw null; } set { } } + public float? ThroughputMibps { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.EnableWriteBackState? WriteBack { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.CacheUpdateProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.CacheUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CapacityPoolEncryptionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CapacityPoolEncryptionType(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType Double { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType Single { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType left, Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType left, Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CapacityPoolPatch : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CapacityPoolPatch(Azure.Core.AzureLocation location) { } + public float? CustomThroughputMibps { get { throw null; } set { } } + public int? CustomThroughputMibpsInt { get { throw null; } set { } } + public bool? IsCoolAccessEnabled { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.CapacityPoolQosType? QosType { get { throw null; } set { } } + public long? Size { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.CapacityPoolPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.CapacityPoolPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CapacityPoolQosType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CapacityPoolQosType(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.CapacityPoolQosType Auto { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.CapacityPoolQosType Manual { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.CapacityPoolQosType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.CapacityPoolQosType left, Azure.ResourceManager.NetApp.Models.CapacityPoolQosType right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.CapacityPoolQosType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.CapacityPoolQosType left, Azure.ResourceManager.NetApp.Models.CapacityPoolQosType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ChangeZoneContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ChangeZoneContent(string newZone) { } + public string NewZone { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ChangeZoneContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ChangeZoneContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CheckElasticResourceAvailabilityReason : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CheckElasticResourceAvailabilityReason(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityReason AlreadyExists { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityReason Invalid { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityReason other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityReason left, Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityReason right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityReason (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityReason left, Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityReason right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CheckElasticResourceAvailabilityResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CheckElasticResourceAvailabilityResult() { } + public Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityStatus? IsAvailable { get { throw null; } } + public string Message { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityReason? Reason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CheckElasticResourceAvailabilityStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CheckElasticResourceAvailabilityStatus(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityStatus False { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityStatus True { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityStatus left, Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityStatus left, Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CheckElasticVolumeFilePathAvailabilityContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CheckElasticVolumeFilePathAvailabilityContent(string filePath) { } + public string FilePath { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.CheckElasticVolumeFilePathAvailabilityContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.CheckElasticVolumeFilePathAvailabilityContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CifsChangeNotifyState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CifsChangeNotifyState(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.CifsChangeNotifyState Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.CifsChangeNotifyState Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.CifsChangeNotifyState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.CifsChangeNotifyState left, Azure.ResourceManager.NetApp.Models.CifsChangeNotifyState right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.CifsChangeNotifyState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.CifsChangeNotifyState left, Azure.ResourceManager.NetApp.Models.CifsChangeNotifyState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ClusterPeerCommandResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ClusterPeerCommandResult() { } + public string PeerAcceptCommand { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ClusterPeerCommandResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ClusterPeerCommandResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CoolAccessRetrievalPolicy : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CoolAccessRetrievalPolicy(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy Default { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy Never { get { throw null; } } public static Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy OnRead { get { throw null; } } public bool Equals(Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -1288,63 +2370,964 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct EnableNetAppSubvolume : System.IEquatable + public readonly partial struct DayOfWeek : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DayOfWeek(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.DayOfWeek Friday { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.DayOfWeek Monday { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.DayOfWeek Saturday { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.DayOfWeek Sunday { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.DayOfWeek Thursday { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.DayOfWeek Tuesday { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.DayOfWeek Wednesday { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.DayOfWeek other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.DayOfWeek left, Azure.ResourceManager.NetApp.Models.DayOfWeek right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.DayOfWeek (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.DayOfWeek left, Azure.ResourceManager.NetApp.Models.DayOfWeek right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DesiredRansomwareProtectionState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DesiredRansomwareProtectionState(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.DesiredRansomwareProtectionState Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.DesiredRansomwareProtectionState Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.DesiredRansomwareProtectionState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.DesiredRansomwareProtectionState left, Azure.ResourceManager.NetApp.Models.DesiredRansomwareProtectionState right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.DesiredRansomwareProtectionState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.DesiredRansomwareProtectionState left, Azure.ResourceManager.NetApp.Models.DesiredRansomwareProtectionState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ElasticAccountPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticAccountPatch() { } + public Azure.ResourceManager.NetApp.Models.ElasticEncryption ElasticAccountUpdateEncryption { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.AzureResourceManagerCommonTypesManagedServiceIdentityUpdate Identity { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticAccountPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticAccountPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticAccountProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticAccountProperties() { } + public Azure.ResourceManager.NetApp.Models.ElasticEncryption Encryption { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticAccountProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticAccountProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticBackupPatch : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticBackupPatch() { } + public string ElasticBackupPropertiesUpdateLabel { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticBackupPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticBackupPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticBackupPolicyPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticBackupPolicyPatch() { } + public Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyUpdateProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticBackupPolicyProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticBackupPolicyProperties() { } + public int? AssignedVolumesCount { get { throw null; } } + public int? DailyBackupsToKeep { get { throw null; } set { } } + public int? MonthlyBackupsToKeep { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyState? PolicyState { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? ProvisioningState { get { throw null; } } + public int? WeeklyBackupsToKeep { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ElasticBackupPolicyState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ElasticBackupPolicyState(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyState Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyState Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyState left, Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyState right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyState left, Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ElasticBackupPolicyUpdateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticBackupPolicyUpdateProperties() { } + public int? DailyBackupsToKeep { get { throw null; } set { } } + public int? MonthlyBackupsToKeep { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyState? PolicyState { get { throw null; } set { } } + public int? WeeklyBackupsToKeep { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyUpdateProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticBackupProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticBackupProperties(Azure.Core.ResourceIdentifier elasticVolumeResourceId) { } + public Azure.ResourceManager.NetApp.Models.ElasticBackupType? BackupType { get { throw null; } } + public System.DateTimeOffset? CompletionOn { get { throw null; } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public Azure.Core.ResourceIdentifier ElasticBackupPolicyResourceId { get { throw null; } } + public Azure.Core.ResourceIdentifier ElasticSnapshotResourceId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ElasticVolumeResourceId { get { throw null; } set { } } + public string FailureReason { get { throw null; } } + public string Label { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? ProvisioningState { get { throw null; } } + public long? Size { get { throw null; } } + public System.DateTimeOffset? SnapshotCreationOn { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.SnapshotUsage? SnapshotUsage { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.VolumeSize? VolumeSize { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticBackupProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticBackupProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ElasticBackupType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ElasticBackupType(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticBackupType Manual { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticBackupType Scheduled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ElasticBackupType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ElasticBackupType left, Azure.ResourceManager.NetApp.Models.ElasticBackupType right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ElasticBackupType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ElasticBackupType left, Azure.ResourceManager.NetApp.Models.ElasticBackupType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ElasticBackupVaultPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticBackupVaultPatch() { } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticBackupVaultPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticBackupVaultPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticCapacityPoolPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticCapacityPoolPatch() { } + public Azure.ResourceManager.NetApp.Models.ElasticCapacityPoolUpdateProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticCapacityPoolPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticCapacityPoolPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticCapacityPoolProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticCapacityPoolProperties(long size, Azure.ResourceManager.NetApp.Models.ElasticServiceLevel serviceLevel, Azure.Core.ResourceIdentifier subnetResourceId) { } + public Azure.Core.ResourceIdentifier ActiveDirectoryConfigResourceId { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticResourceAvailabilityStatus? AvailabilityStatus { get { throw null; } } + public string CurrentZone { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.ElasticEncryptionConfiguration Encryption { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.ElasticServiceLevel ServiceLevel { get { throw null; } set { } } + public long Size { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SubnetResourceId { get { throw null; } set { } } + public double? TotalThroughputMibps { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticCapacityPoolProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticCapacityPoolProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticCapacityPoolUpdateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticCapacityPoolUpdateProperties() { } + public Azure.Core.ResourceIdentifier ActiveDirectoryConfigResourceId { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticEncryptionConfigurationUpdate Encryption { get { throw null; } set { } } + public long? Size { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticCapacityPoolUpdateProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticCapacityPoolUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticEncryption : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticEncryption() { } + public Azure.ResourceManager.NetApp.Models.ElasticEncryptionIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppKeySource? KeySource { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticKeyVaultProperties KeyVaultProperties { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticEncryption System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticEncryption System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticEncryptionConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticEncryptionConfiguration(Azure.ResourceManager.NetApp.Models.ElasticPoolEncryptionKeySource elasticPoolEncryptionKeySource, Azure.Core.ResourceIdentifier keyVaultPrivateEndpointResourceId) { } + public Azure.ResourceManager.NetApp.Models.ElasticPoolEncryptionKeySource ElasticPoolEncryptionKeySource { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier KeyVaultPrivateEndpointResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticEncryptionConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticEncryptionConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticEncryptionConfigurationUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticEncryptionConfigurationUpdate() { } + public Azure.ResourceManager.NetApp.Models.ElasticPoolEncryptionKeySource? ElasticPoolEncryptionKeySource { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier KeyVaultPrivateEndpointResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticEncryptionConfigurationUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticEncryptionConfigurationUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticEncryptionIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticEncryptionIdentity() { } + public string PrincipalId { get { throw null; } } + public Azure.Core.ResourceIdentifier UserAssignedIdentity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticEncryptionIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticEncryptionIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticExportPolicyRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticExportPolicyRule() { } + public System.Collections.Generic.IList AllowedClients { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.ElasticNfsv3Access? Nfsv3 { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticNfsv4Access? Nfsv4 { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticRootAccess? RootAccess { get { throw null; } set { } } + public int? RuleIndex { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticUnixAccessRule? UnixAccessRule { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticExportPolicyRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticExportPolicyRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticKeyVaultProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticKeyVaultProperties() { } + public string KeyName { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier KeyVaultResourceId { get { throw null; } set { } } + public System.Uri KeyVaultUri { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticKeyVaultStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticKeyVaultProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticKeyVaultProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ElasticKeyVaultStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ElasticKeyVaultStatus(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticKeyVaultStatus Created { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticKeyVaultStatus Deleted { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticKeyVaultStatus Error { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticKeyVaultStatus InUse { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticKeyVaultStatus Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ElasticKeyVaultStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ElasticKeyVaultStatus left, Azure.ResourceManager.NetApp.Models.ElasticKeyVaultStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ElasticKeyVaultStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ElasticKeyVaultStatus left, Azure.ResourceManager.NetApp.Models.ElasticKeyVaultStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ElasticMountTargetProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ElasticMountTargetProperties() { } + public string IPAddress { get { throw null; } } + public string SmbServerFqdn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticMountTargetProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticMountTargetProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ElasticNfsv3Access : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ElasticNfsv3Access(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticNfsv3Access Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticNfsv3Access Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ElasticNfsv3Access other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ElasticNfsv3Access left, Azure.ResourceManager.NetApp.Models.ElasticNfsv3Access right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ElasticNfsv3Access (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ElasticNfsv3Access left, Azure.ResourceManager.NetApp.Models.ElasticNfsv3Access right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ElasticNfsv4Access : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ElasticNfsv4Access(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticNfsv4Access Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticNfsv4Access Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ElasticNfsv4Access other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ElasticNfsv4Access left, Azure.ResourceManager.NetApp.Models.ElasticNfsv4Access right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ElasticNfsv4Access (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ElasticNfsv4Access left, Azure.ResourceManager.NetApp.Models.ElasticNfsv4Access right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ElasticPoolEncryptionKeySource : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ElasticPoolEncryptionKeySource(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticPoolEncryptionKeySource KeyVault { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticPoolEncryptionKeySource NetApp { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ElasticPoolEncryptionKeySource other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ElasticPoolEncryptionKeySource left, Azure.ResourceManager.NetApp.Models.ElasticPoolEncryptionKeySource right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ElasticPoolEncryptionKeySource (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ElasticPoolEncryptionKeySource left, Azure.ResourceManager.NetApp.Models.ElasticPoolEncryptionKeySource right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ElasticProtocolType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ElasticProtocolType(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticProtocolType NFSv3 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticProtocolType NFSv4 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticProtocolType SMB { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ElasticProtocolType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ElasticProtocolType left, Azure.ResourceManager.NetApp.Models.ElasticProtocolType right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ElasticProtocolType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ElasticProtocolType left, Azure.ResourceManager.NetApp.Models.ElasticProtocolType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ElasticResourceAvailabilityStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ElasticResourceAvailabilityStatus(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticResourceAvailabilityStatus Offline { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticResourceAvailabilityStatus Online { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ElasticResourceAvailabilityStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ElasticResourceAvailabilityStatus left, Azure.ResourceManager.NetApp.Models.ElasticResourceAvailabilityStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ElasticResourceAvailabilityStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ElasticResourceAvailabilityStatus left, Azure.ResourceManager.NetApp.Models.ElasticResourceAvailabilityStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ElasticRootAccess : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ElasticRootAccess(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticRootAccess Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticRootAccess Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ElasticRootAccess other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ElasticRootAccess left, Azure.ResourceManager.NetApp.Models.ElasticRootAccess right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ElasticRootAccess (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ElasticRootAccess left, Azure.ResourceManager.NetApp.Models.ElasticRootAccess right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ElasticServiceLevel : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ElasticServiceLevel(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticServiceLevel ZoneRedundant { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ElasticServiceLevel other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ElasticServiceLevel left, Azure.ResourceManager.NetApp.Models.ElasticServiceLevel right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ElasticServiceLevel (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ElasticServiceLevel left, Azure.ResourceManager.NetApp.Models.ElasticServiceLevel right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ElasticSmbEncryption : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ElasticSmbEncryption(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticSmbEncryption Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticSmbEncryption Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ElasticSmbEncryption other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ElasticSmbEncryption left, Azure.ResourceManager.NetApp.Models.ElasticSmbEncryption right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ElasticSmbEncryption (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ElasticSmbEncryption left, Azure.ResourceManager.NetApp.Models.ElasticSmbEncryption right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ElasticSnapshotPolicyDailySchedule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticSnapshotPolicyDailySchedule() { } + public int? Hour { get { throw null; } set { } } + public int? Minute { get { throw null; } set { } } + public int? SnapshotsToKeep { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyDailySchedule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyDailySchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticSnapshotPolicyHourlySchedule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticSnapshotPolicyHourlySchedule() { } + public int? Minute { get { throw null; } set { } } + public int? SnapshotsToKeep { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyHourlySchedule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyHourlySchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticSnapshotPolicyMonthlySchedule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticSnapshotPolicyMonthlySchedule() { } + public System.Collections.Generic.IList DaysOfMonth { get { throw null; } } + public int? Hour { get { throw null; } set { } } + public int? Minute { get { throw null; } set { } } + public int? SnapshotsToKeep { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyMonthlySchedule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyMonthlySchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticSnapshotPolicyPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticSnapshotPolicyPatch() { } + public Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyUpdateProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticSnapshotPolicyProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticSnapshotPolicyProperties() { } + public Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyDailySchedule DailySchedule { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyHourlySchedule HourlySchedule { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyMonthlySchedule MonthlySchedule { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.PolicyStatus? PolicyStatus { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyWeeklySchedule WeeklySchedule { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticSnapshotPolicyUpdateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticSnapshotPolicyUpdateProperties() { } + public Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyDailySchedule DailySchedule { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyHourlySchedule HourlySchedule { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyMonthlySchedule MonthlySchedule { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.PolicyStatus? PolicyStatus { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyWeeklySchedule WeeklySchedule { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyUpdateProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticSnapshotPolicyWeeklySchedule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticSnapshotPolicyWeeklySchedule() { } + public System.Collections.Generic.IList Days { get { throw null; } } + public int? Hour { get { throw null; } set { } } + public int? Minute { get { throw null; } set { } } + public int? SnapshotsToKeep { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyWeeklySchedule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyWeeklySchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ElasticUnixAccessRule : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ElasticUnixAccessRule(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticUnixAccessRule NoAccess { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticUnixAccessRule ReadOnly { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticUnixAccessRule ReadWrite { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ElasticUnixAccessRule other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ElasticUnixAccessRule left, Azure.ResourceManager.NetApp.Models.ElasticUnixAccessRule right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ElasticUnixAccessRule (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ElasticUnixAccessRule left, Azure.ResourceManager.NetApp.Models.ElasticUnixAccessRule right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ElasticVolumeBackupProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticVolumeBackupProperties() { } + public Azure.Core.ResourceIdentifier ElasticBackupPolicyResourceId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ElasticBackupVaultResourceId { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticVolumePolicyEnforcement? PolicyEnforcement { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticVolumeBackupProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticVolumeBackupProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticVolumeDataProtectionPatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticVolumeDataProtectionPatchProperties() { } + public Azure.ResourceManager.NetApp.Models.ElasticVolumeBackupProperties Backup { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SnapshotPolicyResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticVolumeDataProtectionPatchProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticVolumeDataProtectionPatchProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticVolumeDataProtectionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticVolumeDataProtectionProperties() { } + public Azure.ResourceManager.NetApp.Models.ElasticVolumeBackupProperties Backup { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SnapshotPolicyResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticVolumeDataProtectionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticVolumeDataProtectionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticVolumePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticVolumePatch() { } + public Azure.ResourceManager.NetApp.Models.ElasticVolumeUpdateProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticVolumePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticVolumePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ElasticVolumePolicyEnforcement : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ElasticVolumePolicyEnforcement(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticVolumePolicyEnforcement Enforced { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticVolumePolicyEnforcement NotEnforced { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ElasticVolumePolicyEnforcement other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ElasticVolumePolicyEnforcement left, Azure.ResourceManager.NetApp.Models.ElasticVolumePolicyEnforcement right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ElasticVolumePolicyEnforcement (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ElasticVolumePolicyEnforcement left, Azure.ResourceManager.NetApp.Models.ElasticVolumePolicyEnforcement right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ElasticVolumeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticVolumeProperties(string filePath, long size, System.Collections.Generic.IEnumerable protocolTypes) { } + public Azure.ResourceManager.NetApp.Models.ElasticResourceAvailabilityStatus? AvailabilityStatus { get { throw null; } } + public Azure.Core.ResourceIdentifier BackupResourceId { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticVolumeDataProtectionProperties DataProtection { get { throw null; } set { } } + public System.Collections.Generic.IList ExportRules { get { throw null; } } + public string FilePath { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList MountTargets { get { throw null; } } + public System.Collections.Generic.IList ProtocolTypes { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.ElasticVolumeRestorationState? RestorationState { get { throw null; } } + public long Size { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticSmbEncryption? SmbEncryption { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.SnapshotDirectoryVisibility? SnapshotDirectoryVisibility { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SnapshotResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticVolumeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticVolumeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ElasticVolumeRestorationState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ElasticVolumeRestorationState(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticVolumeRestorationState Failed { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticVolumeRestorationState Restored { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticVolumeRestorationState Restoring { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ElasticVolumeRestorationState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ElasticVolumeRestorationState left, Azure.ResourceManager.NetApp.Models.ElasticVolumeRestorationState right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ElasticVolumeRestorationState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ElasticVolumeRestorationState left, Azure.ResourceManager.NetApp.Models.ElasticVolumeRestorationState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ElasticVolumeRevert : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticVolumeRevert() { } + public Azure.Core.ResourceIdentifier SnapshotResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticVolumeRevert System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticVolumeRevert System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticVolumeUpdateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticVolumeUpdateProperties() { } + public Azure.ResourceManager.NetApp.Models.ElasticVolumeDataProtectionPatchProperties DataProtection { get { throw null; } set { } } + public System.Collections.Generic.IList ExportRules { get { throw null; } } + public long? Size { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticSmbEncryption? SmbEncryption { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.SnapshotDirectoryVisibility? SnapshotDirectoryVisibility { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticVolumeUpdateProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticVolumeUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EnableNetAppSubvolume : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EnableNetAppSubvolume(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume left, Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume left, Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EnableWriteBackState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EnableWriteBackState(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.EnableWriteBackState Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.EnableWriteBackState Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.EnableWriteBackState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.EnableWriteBackState left, Azure.ResourceManager.NetApp.Models.EnableWriteBackState right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.EnableWriteBackState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.EnableWriteBackState left, Azure.ResourceManager.NetApp.Models.EnableWriteBackState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EncryptionState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EncryptionState(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.EncryptionState Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.EncryptionState Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.EncryptionState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.EncryptionState left, Azure.ResourceManager.NetApp.Models.EncryptionState right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.EncryptionState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.EncryptionState left, Azure.ResourceManager.NetApp.Models.EncryptionState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ExcludeReplicationsFilter : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ExcludeReplicationsFilter(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter Deleted { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter None { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter left, Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter left, Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ExternalReplicationSetupStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ExternalReplicationSetupStatus(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ExternalReplicationSetupStatus ClusterPeerPending { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ExternalReplicationSetupStatus ClusterPeerRequired { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ExternalReplicationSetupStatus NoActionRequired { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ExternalReplicationSetupStatus ReplicationCreateRequired { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ExternalReplicationSetupStatus VServerPeerRequired { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ExternalReplicationSetupStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ExternalReplicationSetupStatus left, Azure.ResourceManager.NetApp.Models.ExternalReplicationSetupStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ExternalReplicationSetupStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ExternalReplicationSetupStatus left, Azure.ResourceManager.NetApp.Models.ExternalReplicationSetupStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class GetGroupIdListForLdapUserContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GetGroupIdListForLdapUserContent(string username) { } + public string Username { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.GetGroupIdListForLdapUserContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.GetGroupIdListForLdapUserContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class GetGroupIdListForLdapUserResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal GetGroupIdListForLdapUserResult() { } + public System.Collections.Generic.IReadOnlyList GroupIdsForLdapUser { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.GetGroupIdListForLdapUserResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.GetGroupIdListForLdapUserResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct GlobalFileLockingState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public GlobalFileLockingState(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.GlobalFileLockingState Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.GlobalFileLockingState Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.GlobalFileLockingState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.GlobalFileLockingState left, Azure.ResourceManager.NetApp.Models.GlobalFileLockingState right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.GlobalFileLockingState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.GlobalFileLockingState left, Azure.ResourceManager.NetApp.Models.GlobalFileLockingState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct KerberosState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public KerberosState(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.KerberosState Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.KerberosState Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.KerberosState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.KerberosState left, Azure.ResourceManager.NetApp.Models.KerberosState right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.KerberosState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.KerberosState left, Azure.ResourceManager.NetApp.Models.KerberosState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct LargeVolumeType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public LargeVolumeType(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.LargeVolumeType ExtraLargeVolume7Dot2PiB { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.LargeVolumeType LargeVolume { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.LargeVolumeType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.LargeVolumeType left, Azure.ResourceManager.NetApp.Models.LargeVolumeType right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.LargeVolumeType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.LargeVolumeType left, Azure.ResourceManager.NetApp.Models.LargeVolumeType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class LdapConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public LdapConfiguration() { } + public string CertificateCNHost { get { throw null; } set { } } + public string Domain { get { throw null; } set { } } + public bool? LdapOverTls { get { throw null; } set { } } + public System.Collections.Generic.IList LdapServers { get { throw null; } } + public string ServerCACertificate { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.LdapConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.LdapConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct LdapServerType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public EnableNetAppSubvolume(string value) { throw null; } - public static Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume Disabled { get { throw null; } } - public static Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume Enabled { get { throw null; } } - public bool Equals(Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume other) { throw null; } + public LdapServerType(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.LdapServerType ActiveDirectory { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.LdapServerType OpenLdap { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.LdapServerType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume left, Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume right) { throw null; } - public static implicit operator Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume left, Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume right) { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.LdapServerType left, Azure.ResourceManager.NetApp.Models.LdapServerType right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.LdapServerType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.LdapServerType left, Azure.ResourceManager.NetApp.Models.LdapServerType right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ExcludeReplicationsFilter : System.IEquatable + public readonly partial struct LdapState : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ExcludeReplicationsFilter(string value) { throw null; } - public static Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter Deleted { get { throw null; } } - public static Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter None { get { throw null; } } - public bool Equals(Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter other) { throw null; } + public LdapState(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.LdapState Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.LdapState Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.LdapState other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter left, Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter right) { throw null; } - public static implicit operator Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter left, Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter right) { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.LdapState left, Azure.ResourceManager.NetApp.Models.LdapState right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.LdapState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.LdapState left, Azure.ResourceManager.NetApp.Models.LdapState right) { throw null; } public override string ToString() { throw null; } } - public partial class GetGroupIdListForLdapUserContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public GetGroupIdListForLdapUserContent(string username) { } - public string Username { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.NetApp.Models.GetGroupIdListForLdapUserContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.NetApp.Models.GetGroupIdListForLdapUserContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class GetGroupIdListForLdapUserResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal GetGroupIdListForLdapUserResult() { } - public System.Collections.Generic.IReadOnlyList GroupIdsForLdapUser { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.NetApp.Models.GetGroupIdListForLdapUserResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.NetApp.Models.GetGroupIdListForLdapUserResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class ListReplicationsContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ListReplicationsContent() { } @@ -1357,6 +3340,26 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ManagedServiceIdentityType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ManagedServiceIdentityType(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ManagedServiceIdentityType None { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ManagedServiceIdentityType SystemAssigned { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ManagedServiceIdentityType SystemAssignedUserAssigned { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ManagedServiceIdentityType UserAssigned { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ManagedServiceIdentityType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ManagedServiceIdentityType left, Azure.ResourceManager.NetApp.Models.ManagedServiceIdentityType right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ManagedServiceIdentityType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ManagedServiceIdentityType left, Azure.ResourceManager.NetApp.Models.ManagedServiceIdentityType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct MultiAdStatus : System.IEquatable { private readonly object _dummy; @@ -1448,6 +3451,7 @@ public NetAppAccountPatch(Azure.Core.AzureLocation location) { } public bool? DisableShowmount { get { throw null; } } public Azure.ResourceManager.NetApp.Models.NetAppAccountEncryption Encryption { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.LdapConfiguration LdapConfiguration { get { throw null; } set { } } public Azure.ResourceManager.NetApp.Models.MultiAdStatus? MultiAdStatus { get { throw null; } } public string NfsV4IdDomain { get { throw null; } set { } } public string ProvisioningState { get { throw null; } } @@ -1553,6 +3557,151 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class NetAppBucketCredentialsExpiry : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NetAppBucketCredentialsExpiry() { } + public int? KeyPairExpiryDays { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialsExpiry System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialsExpiry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NetAppBucketCredentialStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NetAppBucketCredentialStatus(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialStatus Active { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialStatus CredentialsExpired { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialStatus NoCredentialsSet { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialStatus left, Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialStatus left, Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class NetAppBucketFileSystemUser : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NetAppBucketFileSystemUser() { } + public string CifsUserUsername { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppBucketNfsUser NfsUser { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppBucketFileSystemUser System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppBucketFileSystemUser System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NetAppBucketGenerateCredentials : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NetAppBucketGenerateCredentials() { } + public string AccessKey { get { throw null; } } + public System.DateTimeOffset? KeyPairExpiry { get { throw null; } } + public string SecretKey { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppBucketGenerateCredentials System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppBucketGenerateCredentials System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NetAppBucketNfsUser : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NetAppBucketNfsUser() { } + public long? GroupId { get { throw null; } set { } } + public long? UserId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppBucketNfsUser System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppBucketNfsUser System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NetAppBucketPatch : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NetAppBucketPatch() { } + public Azure.ResourceManager.NetApp.Models.NetAppBucketFileSystemUser FileSystemUser { get { throw null; } set { } } + public string Path { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppBucketPatchPermission? Permissions { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.NetAppBucketServerPatchProperties Server { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppBucketPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppBucketPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NetAppBucketPatchPermission : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NetAppBucketPatchPermission(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.NetAppBucketPatchPermission ReadOnly { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppBucketPatchPermission ReadWrite { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.NetAppBucketPatchPermission other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.NetAppBucketPatchPermission left, Azure.ResourceManager.NetApp.Models.NetAppBucketPatchPermission right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.NetAppBucketPatchPermission (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.NetAppBucketPatchPermission left, Azure.ResourceManager.NetApp.Models.NetAppBucketPatchPermission right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NetAppBucketPermission : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NetAppBucketPermission(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.NetAppBucketPermission ReadOnly { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppBucketPermission ReadWrite { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.NetAppBucketPermission other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.NetAppBucketPermission left, Azure.ResourceManager.NetApp.Models.NetAppBucketPermission right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.NetAppBucketPermission (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.NetAppBucketPermission left, Azure.ResourceManager.NetApp.Models.NetAppBucketPermission right) { throw null; } + public override string ToString() { throw null; } + } + public partial class NetAppBucketServerPatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NetAppBucketServerPatchProperties() { } + public string CertificateObject { get { throw null; } set { } } + public string Fqdn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppBucketServerPatchProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppBucketServerPatchProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NetAppBucketServerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NetAppBucketServerProperties() { } + public string CertificateCommonName { get { throw null; } } + public System.DateTimeOffset? CertificateExpiryOn { get { throw null; } } + public string CertificateObject { get { throw null; } set { } } + public string Fqdn { get { throw null; } set { } } + public string IPAddress { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppBucketServerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppBucketServerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class NetAppChangeKeyVault : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NetAppChangeKeyVault(System.Uri keyVaultUri, string keyName, System.Collections.Generic.IEnumerable keyVaultPrivateEndpoints) { } @@ -2001,6 +4150,10 @@ public NetAppReplicationObject() { } public NetAppReplicationObject(Azure.Core.ResourceIdentifier remoteVolumeResourceId) { } public System.Collections.Generic.IReadOnlyList DestinationReplications { get { throw null; } } public Azure.ResourceManager.NetApp.Models.NetAppEndpointType? EndpointType { get { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] set { } } + public string ExternalReplicationSetupInfo { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.ExternalReplicationSetupStatus? ExternalReplicationSetupStatus { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.NetAppMirrorState? MirrorState { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.VolumeReplicationRelationshipStatus? RelationshipStatus { get { throw null; } } public Azure.ResourceManager.NetApp.Models.RemotePath RemotePath { get { throw null; } set { } } public string RemoteVolumeRegion { get { throw null; } set { } } public Azure.Core.ResourceIdentifier RemoteVolumeResourceId { get { throw null; } set { } } @@ -2276,6 +4429,7 @@ public partial class NetAppVolumeDataProtection : System.ClientModel.Primitives. { public NetAppVolumeDataProtection() { } public Azure.ResourceManager.NetApp.Models.NetAppVolumeBackupConfiguration Backup { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.RansomwareProtectionSettings RansomwareProtection { get { throw null; } set { } } public Azure.ResourceManager.NetApp.Models.NetAppReplicationObject Replication { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SnapshotPolicyId { get { throw null; } set { } } public Azure.ResourceManager.NetApp.Models.NetAppVolumeRelocationProperties VolumeRelocation { get { throw null; } set { } } @@ -2349,6 +4503,7 @@ public NetAppVolumeGroupVolume(string creationToken, long usageThreshold, Azure. public Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore? AvsDataStore { get { throw null; } set { } } public string BackupId { get { throw null; } set { } } public string BaremetalTenantId { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.BreakthroughMode? BreakthroughMode { get { throw null; } set { } } public Azure.Core.ResourceIdentifier CapacityPoolResourceId { get { throw null; } set { } } public int? CloneProgress { get { throw null; } } public Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy? CoolAccessRetrievalPolicy { get { throw null; } set { } } @@ -2379,6 +4534,9 @@ public NetAppVolumeGroupVolume(string creationToken, long usageThreshold, Azure. public bool? IsSmbEncryptionEnabled { get { throw null; } set { } } public bool? IsSnapshotDirectoryVisible { get { throw null; } set { } } public Azure.Core.ResourceIdentifier KeyVaultPrivateEndpointResourceId { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage? Language { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.LargeVolumeType? LargeVolumeType { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.LdapServerType? LdapServerType { get { throw null; } set { } } public long? MaximumNumberOfFiles { get { throw null; } } public System.Collections.Generic.IReadOnlyList MountTargets { get { throw null; } } public string Name { get { throw null; } set { } } @@ -2414,6 +4572,91 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NetAppVolumeLanguage : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NetAppVolumeLanguage(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Ar { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage ArUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage C { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Cs { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage CsUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage CUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Da { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage DaUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage De { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage DeUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage En { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage EnUs { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage EnUsUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage EnUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Es { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage EsUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Fi { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage FiUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Fr { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage FrUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage He { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage HeUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Hr { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage HrUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Hu { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage HuUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage It { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage ItUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Ja { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage JaJp932 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage JaJp932Utf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage JaJpPck { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage JaJpPckUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage JaJpPckV2 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage JaJpPckV2Utf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage JaUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage JaV1 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage JaV1Utf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Ko { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage KoUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Nl { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage NlUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage No { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage NoUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Pl { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage PlUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Pt { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage PtUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Ro { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage RoUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Ru { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage RuUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Sk { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage SkUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Sl { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage SlUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Sv { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage SvUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Tr { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage TrUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Utf8Mb4 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Zh { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage ZhGbk { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage ZhGbkUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage ZhTw { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage ZhTwBig5 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage ZhTwBig5Utf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage ZhTwUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage ZhUtf8 { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage left, Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage left, Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage right) { throw null; } + public override string ToString() { throw null; } + } public partial class NetAppVolumeMountTarget : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal NetAppVolumeMountTarget() { } @@ -2461,6 +4704,7 @@ public partial class NetAppVolumePatchDataProtection : System.ClientModel.Primit { public NetAppVolumePatchDataProtection() { } public Azure.ResourceManager.NetApp.Models.NetAppVolumeBackupConfiguration Backup { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.DesiredRansomwareProtectionState? DesiredRansomwareProtectionState { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SnapshotPolicyId { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetApp.Models.NetAppVolumePatchDataProtection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2492,6 +4736,33 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class NetAppVolumeQuotaReport : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NetAppVolumeQuotaReport() { } + public bool? IsDerivedQuota { get { throw null; } } + public float? PercentageUsed { get { throw null; } } + public long? QuotaLimitTotalInKiBs { get { throw null; } } + public long? QuotaLimitUsedInKiBs { get { throw null; } } + public string QuotaTarget { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.NetAppVolumeQuotaType? QuotaType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppVolumeQuotaReport System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppVolumeQuotaReport System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NetAppVolumeQuotaReportListResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NetAppVolumeQuotaReportListResult() { } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppVolumeQuotaReportListResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppVolumeQuotaReportListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class NetAppVolumeQuotaRulePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NetAppVolumeQuotaRulePatch() { } @@ -2694,6 +4965,20 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class OriginClusterInformation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OriginClusterInformation(string peerClusterName, System.Collections.Generic.IEnumerable peerAddresses, string peerVserverName, string peerVolumeName) { } + public System.Collections.Generic.IList PeerAddresses { get { throw null; } } + public string PeerClusterName { get { throw null; } set { } } + public string PeerVolumeName { get { throw null; } set { } } + public string PeerVserverName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.OriginClusterInformation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.OriginClusterInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class PeerClusterForVolumeMigrationContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public PeerClusterForVolumeMigrationContent(System.Collections.Generic.IEnumerable peerIPAddresses) { } @@ -2705,6 +4990,56 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class PeeringPassphrases : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PeeringPassphrases() { } + public string ClusterPeeringCommand { get { throw null; } } + public string ClusterPeeringPassphrase { get { throw null; } } + public string VserverPeeringCommand { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.PeeringPassphrases System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.PeeringPassphrases System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PolicyStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PolicyStatus(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.PolicyStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.PolicyStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.PolicyStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.PolicyStatus left, Azure.ResourceManager.NetApp.Models.PolicyStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.PolicyStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.PolicyStatus left, Azure.ResourceManager.NetApp.Models.PolicyStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProtocolType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProtocolType(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ProtocolType NFSv3 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ProtocolType NFSv4 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ProtocolType SMB { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ProtocolType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ProtocolType left, Azure.ResourceManager.NetApp.Models.ProtocolType right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ProtocolType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ProtocolType left, Azure.ResourceManager.NetApp.Models.ProtocolType right) { throw null; } + public override string ToString() { throw null; } + } public partial class QueryNetworkSiblingSetContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public QueryNetworkSiblingSetContent(string networkSiblingSetId, Azure.Core.ResourceIdentifier subnetId) { } @@ -2717,6 +5052,117 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class RansomwareProtectionSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RansomwareProtectionSettings() { } + public Azure.ResourceManager.NetApp.Models.ActualRansomwareProtectionState? ActualRansomwareProtectionState { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.DesiredRansomwareProtectionState? DesiredRansomwareProtectionState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.RansomwareProtectionSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.RansomwareProtectionSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RansomwareReportProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RansomwareReportProperties() { } + public int? ClearedCount { get { throw null; } } + public System.DateTimeOffset? EventOn { get { throw null; } } + public string ProvisioningState { get { throw null; } } + public int? ReportedCount { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.RansomwareReportSeverity? Severity { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.RansomwareReportState? State { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Suspects { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.RansomwareReportProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.RansomwareReportProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RansomwareReportSeverity : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RansomwareReportSeverity(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.RansomwareReportSeverity High { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.RansomwareReportSeverity Low { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.RansomwareReportSeverity Moderate { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.RansomwareReportSeverity None { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.RansomwareReportSeverity other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.RansomwareReportSeverity left, Azure.ResourceManager.NetApp.Models.RansomwareReportSeverity right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.RansomwareReportSeverity (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.RansomwareReportSeverity left, Azure.ResourceManager.NetApp.Models.RansomwareReportSeverity right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RansomwareReportState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RansomwareReportState(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.RansomwareReportState Active { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.RansomwareReportState Resolved { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.RansomwareReportState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.RansomwareReportState left, Azure.ResourceManager.NetApp.Models.RansomwareReportState right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.RansomwareReportState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.RansomwareReportState left, Azure.ResourceManager.NetApp.Models.RansomwareReportState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RansomwareSuspectResolution : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RansomwareSuspectResolution(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.RansomwareSuspectResolution FalsePositive { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.RansomwareSuspectResolution PotentialThreat { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.RansomwareSuspectResolution other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.RansomwareSuspectResolution left, Azure.ResourceManager.NetApp.Models.RansomwareSuspectResolution right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.RansomwareSuspectResolution (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.RansomwareSuspectResolution left, Azure.ResourceManager.NetApp.Models.RansomwareSuspectResolution right) { throw null; } + public override string ToString() { throw null; } + } + public partial class RansomwareSuspects : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RansomwareSuspects() { } + public string Extension { get { throw null; } } + public int? FileCount { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.RansomwareSuspectResolution? Resolution { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SuspectFiles { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.RansomwareSuspects System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.RansomwareSuspects System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RansomwareSuspectsClearContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RansomwareSuspectsClearContent(Azure.ResourceManager.NetApp.Models.RansomwareSuspectResolution resolution, System.Collections.Generic.IEnumerable extensions) { } + public System.Collections.Generic.IList Extensions { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.RansomwareSuspectResolution Resolution { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.RansomwareSuspectsClearContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.RansomwareSuspectsClearContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct RegionStorageToNetworkProximity : System.IEquatable { @@ -2784,6 +5230,66 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.NetApp.Models.ReplicationMirrorState left, Azure.ResourceManager.NetApp.Models.ReplicationMirrorState right) { throw null; } public override string ToString() { throw null; } } + public partial class SecretPassword : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SecretPassword() { } + public Azure.ResourceManager.NetApp.Models.SecretPasswordIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.SecretPasswordKeyVaultProperties KeyVaultProperties { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.SecretPassword System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.SecretPassword System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SecretPasswordIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SecretPasswordIdentity() { } + public string PrincipalId { get { throw null; } } + public string UserAssignedIdentity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.SecretPasswordIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.SecretPasswordIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SecretPasswordKeyVaultProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SecretPasswordKeyVaultProperties(System.Uri keyVaultUri, string secretName) { } + public System.Uri KeyVaultUri { get { throw null; } set { } } + public string SecretName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.SecretPasswordKeyVaultProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.SecretPasswordKeyVaultProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SecretPasswordKeyVaultPropertiesUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SecretPasswordKeyVaultPropertiesUpdate() { } + public System.Uri KeyVaultUri { get { throw null; } set { } } + public string SecretName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.SecretPasswordKeyVaultPropertiesUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.SecretPasswordKeyVaultPropertiesUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SecretPasswordUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SecretPasswordUpdate() { } + public Azure.ResourceManager.NetApp.Models.SecretPasswordIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.SecretPasswordKeyVaultPropertiesUpdate KeyVaultProperties { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.SecretPasswordUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.SecretPasswordUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct SmbAccessBasedEnumeration : System.IEquatable { @@ -2803,6 +5309,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SmbEncryptionState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SmbEncryptionState(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.SmbEncryptionState Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.SmbEncryptionState Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.SmbEncryptionState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.SmbEncryptionState left, Azure.ResourceManager.NetApp.Models.SmbEncryptionState right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.SmbEncryptionState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.SmbEncryptionState left, Azure.ResourceManager.NetApp.Models.SmbEncryptionState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct SmbNonBrowsable : System.IEquatable { private readonly object _dummy; @@ -2820,6 +5344,37 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.NetApp.Models.SmbNonBrowsable left, Azure.ResourceManager.NetApp.Models.SmbNonBrowsable right) { throw null; } public override string ToString() { throw null; } } + public partial class SmbSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SmbSettings() { } + public Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration? SmbAccessBasedEnumerations { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.SmbEncryptionState? SmbEncryption { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.SmbNonBrowsable? SmbNonBrowsable { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.SmbSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.SmbSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SnapshotDirectoryVisibility : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SnapshotDirectoryVisibility(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.SnapshotDirectoryVisibility Hidden { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.SnapshotDirectoryVisibility Visible { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.SnapshotDirectoryVisibility other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.SnapshotDirectoryVisibility left, Azure.ResourceManager.NetApp.Models.SnapshotDirectoryVisibility right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.SnapshotDirectoryVisibility (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.SnapshotDirectoryVisibility left, Azure.ResourceManager.NetApp.Models.SnapshotDirectoryVisibility right) { throw null; } + public override string ToString() { throw null; } + } public partial class SnapshotPolicyDailySchedule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SnapshotPolicyDailySchedule() { } @@ -2893,6 +5448,36 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SnapshotUsage : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SnapshotUsage(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.SnapshotUsage CreateNewSnapshot { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.SnapshotUsage UseExistingSnapshot { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.SnapshotUsage other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.SnapshotUsage left, Azure.ResourceManager.NetApp.Models.SnapshotUsage right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.SnapshotUsage (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.SnapshotUsage left, Azure.ResourceManager.NetApp.Models.SnapshotUsage right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SuspectFile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SuspectFile() { } + public System.DateTimeOffset? FileTimestamp { get { throw null; } } + public string SuspectFileName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.SuspectFile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.SuspectFile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class SvmPeerCommandResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal SvmPeerCommandResult() { } @@ -2976,4 +5561,22 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.NetApp.Models.VolumeRestoreRelationshipStatus left, Azure.ResourceManager.NetApp.Models.VolumeRestoreRelationshipStatus right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct VolumeSize : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public VolumeSize(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.VolumeSize Large { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.VolumeSize Regular { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.VolumeSize other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.VolumeSize left, Azure.ResourceManager.NetApp.Models.VolumeSize right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.VolumeSize (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.VolumeSize left, Azure.ResourceManager.NetApp.Models.VolumeSize right) { throw null; } + public override string ToString() { throw null; } + } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/api/Azure.ResourceManager.NetApp.netstandard2.0.cs b/sdk/netapp/Azure.ResourceManager.NetApp/api/Azure.ResourceManager.NetApp.netstandard2.0.cs index 1fe566cc34b5..2b4f95e8f5b8 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/api/Azure.ResourceManager.NetApp.netstandard2.0.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/api/Azure.ResourceManager.NetApp.netstandard2.0.cs @@ -1,11 +1,125 @@ namespace Azure.ResourceManager.NetApp { + public partial class ActiveDirectoryConfigCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ActiveDirectoryConfigCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string activeDirectoryConfigName, Azure.ResourceManager.NetApp.ActiveDirectoryConfigData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string activeDirectoryConfigName, Azure.ResourceManager.NetApp.ActiveDirectoryConfigData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string activeDirectoryConfigName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string activeDirectoryConfigName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string activeDirectoryConfigName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string activeDirectoryConfigName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string activeDirectoryConfigName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string activeDirectoryConfigName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ActiveDirectoryConfigData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ActiveDirectoryConfigData(Azure.Core.AzureLocation location) { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ActiveDirectoryConfigProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ActiveDirectoryConfigData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ActiveDirectoryConfigData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ActiveDirectoryConfigResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ActiveDirectoryConfigResource() { } + public virtual Azure.ResourceManager.NetApp.ActiveDirectoryConfigData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string activeDirectoryConfigName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NetApp.ActiveDirectoryConfigData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ActiveDirectoryConfigData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ActiveDirectoryConfigPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ActiveDirectoryConfigPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class AzureResourceManagerNetAppContext : System.ClientModel.Primitives.ModelReaderWriterContext { internal AzureResourceManagerNetAppContext() { } public static Azure.ResourceManager.NetApp.AzureResourceManagerNetAppContext Default { get { throw null; } } protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; } } + public partial class CacheCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected CacheCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string cacheName, Azure.ResourceManager.NetApp.CacheData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string cacheName, Azure.ResourceManager.NetApp.CacheData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string cacheName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string cacheName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string cacheName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string cacheName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string cacheName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string cacheName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class CacheData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CacheData(Azure.Core.AzureLocation location, Azure.ResourceManager.NetApp.Models.CacheProperties properties) { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.CacheProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.CacheData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.CacheData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CacheResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected CacheResource() { } + public virtual Azure.ResourceManager.NetApp.CacheData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string poolName, string cacheName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetPeeringPassphrases(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPeeringPassphrasesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation PoolChange(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.NetAppVolumePoolChangeContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PoolChangeAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.NetAppVolumePoolChangeContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NetApp.CacheData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.CacheData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.CachePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.CachePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class CapacityPoolCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected CapacityPoolCollection() { } @@ -58,6 +172,9 @@ protected CapacityPoolResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetCache(string cacheName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetCacheAsync(string cacheName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NetApp.CacheCollection GetCaches() { throw null; } public virtual Azure.Response GetNetAppVolume(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetNetAppVolumeAsync(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.NetApp.NetAppVolumeCollection GetNetAppVolumes() { throw null; } @@ -73,6 +190,456 @@ protected CapacityPoolResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.CapacityPoolPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.CapacityPoolPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class ElasticAccountCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ElasticAccountCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string accountName, Azure.ResourceManager.NetApp.ElasticAccountData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string accountName, Azure.ResourceManager.NetApp.ElasticAccountData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ElasticAccountData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticAccountData(Azure.Core.AzureLocation location) { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticAccountProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticAccountData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticAccountData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticAccountResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ElasticAccountResource() { } + public virtual Azure.ResourceManager.NetApp.ElasticAccountData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticBackupPolicyCollection GetElasticBackupPolicies() { throw null; } + public virtual Azure.Response GetElasticBackupPolicy(string backupPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetElasticBackupPolicyAsync(string backupPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetElasticBackupVault(string backupVaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetElasticBackupVaultAsync(string backupVaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticBackupVaultCollection GetElasticBackupVaults() { throw null; } + public virtual Azure.Response GetElasticCapacityPool(string poolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetElasticCapacityPoolAsync(string poolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticCapacityPoolCollection GetElasticCapacityPools() { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticSnapshotPolicyCollection GetElasticSnapshotPolicies() { throw null; } + public virtual Azure.Response GetElasticSnapshotPolicy(string snapshotPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetElasticSnapshotPolicyAsync(string snapshotPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NetApp.ElasticAccountData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticAccountData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticAccountPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticAccountPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ElasticBackupCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ElasticBackupCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string backupName, Azure.ResourceManager.NetApp.ElasticBackupData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string backupName, Azure.ResourceManager.NetApp.ElasticBackupData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string backupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string backupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string backupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string backupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string backupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string backupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ElasticBackupData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticBackupData() { } + public Azure.ResourceManager.NetApp.Models.ElasticBackupProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticBackupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticBackupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticBackupPolicyCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ElasticBackupPolicyCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string backupPolicyName, Azure.ResourceManager.NetApp.ElasticBackupPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string backupPolicyName, Azure.ResourceManager.NetApp.ElasticBackupPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string backupPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string backupPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string backupPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string backupPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string backupPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string backupPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ElasticBackupPolicyData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticBackupPolicyData(Azure.Core.AzureLocation location) { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticBackupPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticBackupPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticBackupPolicyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ElasticBackupPolicyResource() { } + public virtual Azure.ResourceManager.NetApp.ElasticBackupPolicyData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string backupPolicyName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NetApp.ElasticBackupPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticBackupPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ElasticBackupResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ElasticBackupResource() { } + public virtual Azure.ResourceManager.NetApp.ElasticBackupData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, string backupName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NetApp.ElasticBackupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticBackupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticBackupPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticBackupPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ElasticBackupVaultCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ElasticBackupVaultCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string backupVaultName, Azure.ResourceManager.NetApp.ElasticBackupVaultData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string backupVaultName, Azure.ResourceManager.NetApp.ElasticBackupVaultData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string backupVaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string backupVaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string backupVaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string backupVaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string backupVaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string backupVaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ElasticBackupVaultData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticBackupVaultData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? ElasticBackupVaultProvisioningState { get { throw null; } } + public Azure.ETag? ETag { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticBackupVaultData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticBackupVaultData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticBackupVaultResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ElasticBackupVaultResource() { } + public virtual Azure.ResourceManager.NetApp.ElasticBackupVaultData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetElasticBackup(string backupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetElasticBackupAsync(string backupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticBackupCollection GetElasticBackups() { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NetApp.ElasticBackupVaultData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticBackupVaultData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticBackupVaultPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticBackupVaultPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ElasticCapacityPoolCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ElasticCapacityPoolCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string poolName, Azure.ResourceManager.NetApp.ElasticCapacityPoolData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string poolName, Azure.ResourceManager.NetApp.ElasticCapacityPoolData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string poolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string poolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string poolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string poolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string poolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string poolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ElasticCapacityPoolData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticCapacityPoolData(Azure.Core.AzureLocation location) { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.ElasticCapacityPoolProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticCapacityPoolData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticCapacityPoolData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticCapacityPoolResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ElasticCapacityPoolResource() { } + public virtual Azure.ResourceManager.NetApp.ElasticCapacityPoolData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation ChangeZone(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ChangeZoneContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ChangeZoneAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ChangeZoneContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CheckVolumeFilePathAvailability(Azure.ResourceManager.NetApp.Models.CheckElasticVolumeFilePathAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CheckVolumeFilePathAvailabilityAsync(Azure.ResourceManager.NetApp.Models.CheckElasticVolumeFilePathAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string poolName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetElasticVolume(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetElasticVolumeAsync(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticVolumeCollection GetElasticVolumes() { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NetApp.ElasticCapacityPoolData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticCapacityPoolData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticCapacityPoolPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticCapacityPoolPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ElasticSnapshotCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ElasticSnapshotCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string snapshotName, Azure.ResourceManager.NetApp.ElasticSnapshotData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string snapshotName, Azure.ResourceManager.NetApp.ElasticSnapshotData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string snapshotName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string snapshotName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string snapshotName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string snapshotName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string snapshotName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string snapshotName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ElasticSnapshotData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticSnapshotData() { } + public Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? ElasticSnapshotProvisioningState { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticSnapshotData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticSnapshotData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticSnapshotPolicyCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ElasticSnapshotPolicyCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string snapshotPolicyName, Azure.ResourceManager.NetApp.ElasticSnapshotPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string snapshotPolicyName, Azure.ResourceManager.NetApp.ElasticSnapshotPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string snapshotPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string snapshotPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string snapshotPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string snapshotPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string snapshotPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string snapshotPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ElasticSnapshotPolicyData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticSnapshotPolicyData(Azure.Core.AzureLocation location) { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticSnapshotPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticSnapshotPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticSnapshotPolicyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ElasticSnapshotPolicyResource() { } + public virtual Azure.ResourceManager.NetApp.ElasticSnapshotPolicyData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string snapshotPolicyName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetElasticVolumes(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetElasticVolumesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NetApp.ElasticSnapshotPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticSnapshotPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ElasticSnapshotResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ElasticSnapshotResource() { } + public virtual Azure.ResourceManager.NetApp.ElasticSnapshotData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string snapshotName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NetApp.ElasticSnapshotData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticSnapshotData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.ElasticSnapshotData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.ElasticSnapshotData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ElasticVolumeCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ElasticVolumeCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string volumeName, Azure.ResourceManager.NetApp.ElasticVolumeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string volumeName, Azure.ResourceManager.NetApp.ElasticVolumeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string volumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ElasticVolumeData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticVolumeData(Azure.Core.AzureLocation location) { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.ElasticVolumeProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IList Zones { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticVolumeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticVolumeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticVolumeResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ElasticVolumeResource() { } + public virtual Azure.ResourceManager.NetApp.ElasticVolumeData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetElasticSnapshot(string snapshotName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetElasticSnapshotAsync(string snapshotName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticSnapshotCollection GetElasticSnapshots() { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Revert(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticVolumeRevert body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RevertAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticVolumeRevert body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NetApp.ElasticVolumeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.ElasticVolumeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticVolumePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.ElasticVolumePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class NetAppAccountBackupCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -127,6 +694,7 @@ public NetAppAccountData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.NetApp.Models.NetAppAccountEncryption Encryption { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.LdapConfiguration LdapConfiguration { get { throw null; } set { } } public Azure.ResourceManager.NetApp.Models.MultiAdStatus? MultiAdStatus { get { throw null; } } public string NfsV4IdDomain { get { throw null; } set { } } public string ProvisioningState { get { throw null; } } @@ -387,6 +955,60 @@ protected NetAppBackupVaultResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.NetAppBackupVaultPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.NetAppBackupVaultPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class NetAppBucketCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NetAppBucketCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string bucketName, Azure.ResourceManager.NetApp.NetAppBucketData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string bucketName, Azure.ResourceManager.NetApp.NetAppBucketData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string bucketName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string bucketName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string bucketName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string bucketName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string bucketName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string bucketName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class NetAppBucketData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NetAppBucketData() { } + public Azure.ResourceManager.NetApp.Models.NetAppBucketFileSystemUser FileSystemUser { get { throw null; } set { } } + public string Path { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppBucketPermission? Permissions { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.NetAppBucketServerProperties Server { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialStatus? Status { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.NetAppBucketData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.NetAppBucketData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NetAppBucketResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NetAppBucketResource() { } + public virtual Azure.ResourceManager.NetApp.NetAppBucketData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string bucketName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GenerateCredentials(Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialsExpiry body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GenerateCredentialsAsync(Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialsExpiry body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NetApp.NetAppBucketData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.NetAppBucketData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.NetAppBucketPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.NetAppBucketPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public static partial class NetAppExtensions { public static Azure.Response CheckNetAppFilePathAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.NetApp.Models.NetAppFilePathAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -395,7 +1017,27 @@ public static partial class NetAppExtensions public static System.Threading.Tasks.Task> CheckNetAppNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.NetApp.Models.NetAppNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response CheckNetAppQuotaAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.NetApp.Models.NetAppQuotaAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> CheckNetAppQuotaAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.NetApp.Models.NetAppQuotaAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetActiveDirectoryConfig(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string activeDirectoryConfigName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetActiveDirectoryConfigAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string activeDirectoryConfigName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.NetApp.ActiveDirectoryConfigResource GetActiveDirectoryConfigResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NetApp.ActiveDirectoryConfigCollection GetActiveDirectoryConfigs(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetActiveDirectoryConfigs(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetActiveDirectoryConfigsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.NetApp.CacheResource GetCacheResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.NetApp.CapacityPoolResource GetCapacityPoolResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetElasticAccount(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetElasticAccountAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticAccountResource GetElasticAccountResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticAccountCollection GetElasticAccounts(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetElasticAccounts(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetElasticAccountsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticBackupPolicyResource GetElasticBackupPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticBackupResource GetElasticBackupResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticBackupVaultResource GetElasticBackupVaultResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticCapacityPoolResource GetElasticCapacityPoolResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticSnapshotPolicyResource GetElasticSnapshotPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticSnapshotResource GetElasticSnapshotResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticVolumeResource GetElasticVolumeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetNetAppAccount(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetNetAppAccountAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -407,6 +1049,7 @@ public static partial class NetAppExtensions public static Azure.ResourceManager.NetApp.NetAppBackupPolicyResource GetNetAppBackupPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.NetApp.NetAppBackupVaultBackupResource GetNetAppBackupVaultBackupResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.NetApp.NetAppBackupVaultResource GetNetAppBackupVaultResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NetApp.NetAppBucketResource GetNetAppBucketResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetNetAppQuotaLimit(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, string quotaLimitName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetNetAppQuotaLimitAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, string quotaLimitName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Pageable GetNetAppQuotaLimits(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -422,6 +1065,7 @@ public static partial class NetAppExtensions public static Azure.ResourceManager.NetApp.NetAppVolumeQuotaRuleResource GetNetAppVolumeQuotaRuleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.NetApp.NetAppVolumeResource GetNetAppVolumeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.NetApp.NetAppVolumeSnapshotResource GetNetAppVolumeSnapshotResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NetApp.RansomwareReportResource GetRansomwareReportResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.NetApp.RegionInfoResource GetRegionInfoResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetRegionInfoResource(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetRegionInfoResourceAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -556,6 +1200,7 @@ public NetAppVolumeData(Azure.Core.AzureLocation location, string creationToken, public Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore? AvsDataStore { get { throw null; } set { } } public string BackupId { get { throw null; } set { } } public string BaremetalTenantId { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.BreakthroughMode? BreakthroughMode { get { throw null; } set { } } public Azure.Core.ResourceIdentifier CapacityPoolResourceId { get { throw null; } set { } } public int? CloneProgress { get { throw null; } } public Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy? CoolAccessRetrievalPolicy { get { throw null; } set { } } @@ -586,6 +1231,9 @@ public NetAppVolumeData(Azure.Core.AzureLocation location, string creationToken, public bool? IsSmbEncryptionEnabled { get { throw null; } set { } } public bool? IsSnapshotDirectoryVisible { get { throw null; } set { } } public Azure.Core.ResourceIdentifier KeyVaultPrivateEndpointResourceId { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage? Language { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.LargeVolumeType? LargeVolumeType { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.LdapServerType? LdapServerType { get { throw null; } set { } } public long? MaximumNumberOfFiles { get { throw null; } } public System.Collections.Generic.IReadOnlyList MountTargets { get { throw null; } } public Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? NetworkFeatures { get { throw null; } set { } } @@ -754,6 +1402,9 @@ protected NetAppVolumeResource() { } public virtual System.Threading.Tasks.Task> GetGetGroupIdListForLdapUserAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.GetGroupIdListForLdapUserContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetLatestStatusBackup(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetLatestStatusBackupAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetNetAppBucket(string bucketName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetNetAppBucketAsync(string bucketName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NetApp.NetAppBucketCollection GetNetAppBuckets() { throw null; } public virtual Azure.Response GetNetAppSubvolumeInfo(string subvolumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetNetAppSubvolumeInfoAsync(string subvolumeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.NetApp.NetAppSubvolumeInfoCollection GetNetAppSubvolumeInfos() { throw null; } @@ -769,6 +1420,11 @@ protected NetAppVolumeResource() { } public virtual Azure.Response GetNetAppVolumeSnapshot(string snapshotName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetNetAppVolumeSnapshotAsync(string snapshotName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.NetApp.NetAppVolumeSnapshotCollection GetNetAppVolumeSnapshots() { throw null; } + public virtual Azure.ResourceManager.ArmOperation GetQuotaReport(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetQuotaReportAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetRansomwareReport(string ransomwareReportName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetRansomwareReportAsync(string ransomwareReportName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NetApp.RansomwareReportCollection GetRansomwareReports() { throw null; } public virtual Azure.Pageable GetReplications(Azure.ResourceManager.NetApp.Models.ListReplicationsContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Pageable GetReplications(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -871,6 +1527,49 @@ protected NetAppVolumeSnapshotResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.NetAppVolumeSnapshotData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.NetAppVolumeSnapshotData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class RansomwareReportCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected RansomwareReportCollection() { } + public virtual Azure.Response Exists(string ransomwareReportName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string ransomwareReportName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string ransomwareReportName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string ransomwareReportName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string ransomwareReportName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string ransomwareReportName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class RansomwareReportData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RansomwareReportData() { } + public Azure.ResourceManager.NetApp.Models.RansomwareReportProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.RansomwareReportData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.RansomwareReportData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RansomwareReportResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected RansomwareReportResource() { } + public virtual Azure.ResourceManager.NetApp.RansomwareReportData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation ClearSuspects(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.RansomwareSuspectsClearContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ClearSuspectsAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetApp.Models.RansomwareSuspectsClearContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string ransomwareReportName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NetApp.RansomwareReportData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.RansomwareReportData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class RegionInfoResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; @@ -980,13 +1679,24 @@ namespace Azure.ResourceManager.NetApp.Mocking public partial class MockableNetAppArmClient : Azure.ResourceManager.ArmResource { protected MockableNetAppArmClient() { } + public virtual Azure.ResourceManager.NetApp.ActiveDirectoryConfigResource GetActiveDirectoryConfigResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NetApp.CacheResource GetCacheResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NetApp.CapacityPoolResource GetCapacityPoolResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticAccountResource GetElasticAccountResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticBackupPolicyResource GetElasticBackupPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticBackupResource GetElasticBackupResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticBackupVaultResource GetElasticBackupVaultResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticCapacityPoolResource GetElasticCapacityPoolResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticSnapshotPolicyResource GetElasticSnapshotPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticSnapshotResource GetElasticSnapshotResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticVolumeResource GetElasticVolumeResource(Azure.Core.ResourceIdentifier id) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.NetApp.NetAppAccountBackupResource GetNetAppAccountBackupResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NetApp.NetAppAccountResource GetNetAppAccountResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NetApp.NetAppBackupPolicyResource GetNetAppBackupPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NetApp.NetAppBackupVaultBackupResource GetNetAppBackupVaultBackupResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NetApp.NetAppBackupVaultResource GetNetAppBackupVaultResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NetApp.NetAppBucketResource GetNetAppBucketResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NetApp.NetAppSubvolumeInfoResource GetNetAppSubvolumeInfoResource(Azure.Core.ResourceIdentifier id) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.NetApp.NetAppVolumeBackupResource GetNetAppVolumeBackupResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -994,12 +1704,19 @@ protected MockableNetAppArmClient() { } public virtual Azure.ResourceManager.NetApp.NetAppVolumeQuotaRuleResource GetNetAppVolumeQuotaRuleResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NetApp.NetAppVolumeResource GetNetAppVolumeResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NetApp.NetAppVolumeSnapshotResource GetNetAppVolumeSnapshotResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NetApp.RansomwareReportResource GetRansomwareReportResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NetApp.RegionInfoResource GetRegionInfoResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NetApp.SnapshotPolicyResource GetSnapshotPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableNetAppResourceGroupResource : Azure.ResourceManager.ArmResource { protected MockableNetAppResourceGroupResource() { } + public virtual Azure.Response GetActiveDirectoryConfig(string activeDirectoryConfigName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetActiveDirectoryConfigAsync(string activeDirectoryConfigName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NetApp.ActiveDirectoryConfigCollection GetActiveDirectoryConfigs() { throw null; } + public virtual Azure.Response GetElasticAccount(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetElasticAccountAsync(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NetApp.ElasticAccountCollection GetElasticAccounts() { throw null; } public virtual Azure.Response GetNetAppAccount(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetNetAppAccountAsync(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.NetApp.NetAppAccountCollection GetNetAppAccounts() { throw null; } @@ -1013,6 +1730,10 @@ protected MockableNetAppSubscriptionResource() { } public virtual System.Threading.Tasks.Task> CheckNetAppNameAvailabilityAsync(Azure.Core.AzureLocation location, Azure.ResourceManager.NetApp.Models.NetAppNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CheckNetAppQuotaAvailability(Azure.Core.AzureLocation location, Azure.ResourceManager.NetApp.Models.NetAppQuotaAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CheckNetAppQuotaAvailabilityAsync(Azure.Core.AzureLocation location, Azure.ResourceManager.NetApp.Models.NetAppQuotaAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetActiveDirectoryConfigs(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetActiveDirectoryConfigsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetElasticAccounts(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetElasticAccountsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetNetAppAccounts(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetNetAppAccountsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetNetAppQuotaLimit(Azure.Core.AzureLocation location, string quotaLimitName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1054,10 +1775,90 @@ namespace Azure.ResourceManager.NetApp.Models public static bool operator !=(Azure.ResourceManager.NetApp.Models.AcceptGrowCapacityPoolForShortTermCloneSplit left, Azure.ResourceManager.NetApp.Models.AcceptGrowCapacityPoolForShortTermCloneSplit right) { throw null; } public override string ToString() { throw null; } } + public partial class ActiveDirectoryConfigPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ActiveDirectoryConfigPatch() { } + public Azure.ResourceManager.NetApp.Models.AzureResourceManagerCommonTypesManagedServiceIdentityUpdate Identity { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ActiveDirectoryConfigUpdateProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ActiveDirectoryConfigPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ActiveDirectoryConfigPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ActiveDirectoryConfigProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ActiveDirectoryConfigProperties(string domain, Azure.ResourceManager.NetApp.Models.SecretPassword secretPassword) { } + public Azure.ResourceManager.NetApp.Models.NetAppAccountActiveDirectoryStatus? ActiveDirectoryStatus { get { throw null; } } + public System.Collections.Generic.IList Administrators { get { throw null; } } + public System.Collections.Generic.IList BackupOperators { get { throw null; } } + public System.Collections.Generic.IList Dns { get { throw null; } } + public string Domain { get { throw null; } set { } } + public string OrganizationalUnit { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.SecretPassword SecretPassword { get { throw null; } set { } } + public System.Collections.Generic.IList SecurityOperators { get { throw null; } } + public string Site { get { throw null; } set { } } + public string SmbServerName { get { throw null; } set { } } + public string UserName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ActiveDirectoryConfigProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ActiveDirectoryConfigProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ActiveDirectoryConfigUpdateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ActiveDirectoryConfigUpdateProperties() { } + public System.Collections.Generic.IList Administrators { get { throw null; } } + public System.Collections.Generic.IList BackupOperators { get { throw null; } } + public System.Collections.Generic.IList Dns { get { throw null; } } + public string Domain { get { throw null; } set { } } + public string OrganizationalUnit { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.SecretPasswordUpdate SecretPassword { get { throw null; } set { } } + public System.Collections.Generic.IList SecurityOperators { get { throw null; } } + public string Site { get { throw null; } set { } } + public string SmbServerName { get { throw null; } set { } } + public string UserName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ActiveDirectoryConfigUpdateProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ActiveDirectoryConfigUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ActualRansomwareProtectionState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ActualRansomwareProtectionState(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ActualRansomwareProtectionState Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ActualRansomwareProtectionState Enabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ActualRansomwareProtectionState Learning { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ActualRansomwareProtectionState Paused { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ActualRansomwareProtectionState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ActualRansomwareProtectionState left, Azure.ResourceManager.NetApp.Models.ActualRansomwareProtectionState right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ActualRansomwareProtectionState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ActualRansomwareProtectionState left, Azure.ResourceManager.NetApp.Models.ActualRansomwareProtectionState right) { throw null; } + public override string ToString() { throw null; } + } public static partial class ArmNetAppModelFactory { + public static Azure.ResourceManager.NetApp.ActiveDirectoryConfigData ActiveDirectoryConfigData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetApp.Models.ActiveDirectoryConfigProperties properties = null, Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ActiveDirectoryConfigProperties ActiveDirectoryConfigProperties(string userName = null, System.Collections.Generic.IEnumerable dns = null, string smbServerName = null, string organizationalUnit = null, string site = null, System.Collections.Generic.IEnumerable backupOperators = null, System.Collections.Generic.IEnumerable administrators = null, System.Collections.Generic.IEnumerable securityOperators = null, Azure.ResourceManager.NetApp.Models.NetAppAccountActiveDirectoryStatus? activeDirectoryStatus = default(Azure.ResourceManager.NetApp.Models.NetAppAccountActiveDirectoryStatus?), Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? provisioningState = default(Azure.ResourceManager.NetApp.Models.NetAppProvisioningState?), string domain = null, Azure.ResourceManager.NetApp.Models.SecretPassword secretPassword = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetApp.Models.AvailabilityZoneMapping AvailabilityZoneMapping(string availabilityZone = null, bool? isAvailable = default(bool?)) { throw null; } + public static Azure.ResourceManager.NetApp.CacheData CacheData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetApp.Models.CacheProperties properties = null, Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable zones = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.CacheMountTargetProperties CacheMountTargetProperties(string mountTargetId = null, string ipAddress = null, string smbServerFqdn = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.CacheProperties CacheProperties(string filepath = null, long size = (long)0, System.Collections.Generic.IEnumerable exportPolicy = null, System.Collections.Generic.IEnumerable protocolTypes = null, Azure.ResourceManager.NetApp.Models.CacheProvisioningState? provisioningState = default(Azure.ResourceManager.NetApp.Models.CacheProvisioningState?), Azure.ResourceManager.NetApp.Models.CacheLifeCycleState? cacheState = default(Azure.ResourceManager.NetApp.Models.CacheLifeCycleState?), Azure.Core.ResourceIdentifier cacheSubnetResourceId = null, Azure.Core.ResourceIdentifier peeringSubnetResourceId = null, System.Collections.Generic.IEnumerable mountTargets = null, Azure.ResourceManager.NetApp.Models.KerberosState? kerberos = default(Azure.ResourceManager.NetApp.Models.KerberosState?), Azure.ResourceManager.NetApp.Models.SmbSettings smbSettings = null, float? throughputMibps = default(float?), float? actualThroughputMibps = default(float?), Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource encryptionKeySource = default(Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource), Azure.Core.ResourceIdentifier keyVaultPrivateEndpointResourceId = null, long? maximumNumberOfFiles = default(long?), Azure.ResourceManager.NetApp.Models.EncryptionState? encryption = default(Azure.ResourceManager.NetApp.Models.EncryptionState?), Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage? language = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage?), Azure.ResourceManager.NetApp.Models.LdapState? ldap = default(Azure.ResourceManager.NetApp.Models.LdapState?), Azure.ResourceManager.NetApp.Models.LdapServerType? ldapServerType = default(Azure.ResourceManager.NetApp.Models.LdapServerType?), Azure.ResourceManager.NetApp.Models.OriginClusterInformation originClusterInformation = null, Azure.ResourceManager.NetApp.Models.CifsChangeNotifyState? cifsChangeNotifications = default(Azure.ResourceManager.NetApp.Models.CifsChangeNotifyState?), Azure.ResourceManager.NetApp.Models.GlobalFileLockingState? globalFileLocking = default(Azure.ResourceManager.NetApp.Models.GlobalFileLockingState?), Azure.ResourceManager.NetApp.Models.EnableWriteBackState? writeBack = default(Azure.ResourceManager.NetApp.Models.EnableWriteBackState?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetApp.CapacityPoolData CapacityPoolData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ETag? etag, System.Guid? poolId, long size, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel serviceLevel, string provisioningState, float? totalThroughputMibps, float? utilizedThroughputMibps, Azure.ResourceManager.NetApp.Models.CapacityPoolQosType? qosType, bool? isCoolAccessEnabled, Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType? encryptionType) { throw null; } public static Azure.ResourceManager.NetApp.CapacityPoolData CapacityPoolData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), System.Guid? poolId = default(System.Guid?), long size = (long)0, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel serviceLevel = default(Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel), string provisioningState = null, float? totalThroughputMibps = default(float?), float? utilizedThroughputMibps = default(float?), int? customThroughputMibpsInt = default(int?), Azure.ResourceManager.NetApp.Models.CapacityPoolQosType? qosType = default(Azure.ResourceManager.NetApp.Models.CapacityPoolQosType?), bool? isCoolAccessEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType? encryptionType = default(Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType?)) { throw null; } @@ -1066,15 +1867,38 @@ public static partial class ArmNetAppModelFactory public static Azure.ResourceManager.NetApp.Models.CapacityPoolPatch CapacityPoolPatch(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, long? size, Azure.ResourceManager.NetApp.Models.CapacityPoolQosType? qosType, bool? isCoolAccessEnabled) { throw null; } public static Azure.ResourceManager.NetApp.Models.CapacityPoolPatch CapacityPoolPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), long? size = default(long?), Azure.ResourceManager.NetApp.Models.CapacityPoolQosType? qosType = default(Azure.ResourceManager.NetApp.Models.CapacityPoolQosType?), bool? isCoolAccessEnabled = default(bool?), int? customThroughputMibpsInt = default(int?)) { throw null; } public static Azure.ResourceManager.NetApp.Models.CapacityPoolPatch CapacityPoolPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), long? size = default(long?), Azure.ResourceManager.NetApp.Models.CapacityPoolQosType? qosType = default(Azure.ResourceManager.NetApp.Models.CapacityPoolQosType?), bool? isCoolAccessEnabled = default(bool?), float? customThroughputMibps = default(float?)) { throw null; } + public static Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityResult CheckElasticResourceAvailabilityResult(Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityStatus? isAvailable = default(Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityStatus?), Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityReason? reason = default(Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityReason?), string message = null) { throw null; } public static Azure.ResourceManager.NetApp.Models.ClusterPeerCommandResult ClusterPeerCommandResult(string peerAcceptCommand = null) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticAccountData ElasticAccountData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetApp.Models.ElasticAccountProperties properties = null, Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticAccountProperties ElasticAccountProperties(Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? provisioningState = default(Azure.ResourceManager.NetApp.Models.NetAppProvisioningState?), Azure.ResourceManager.NetApp.Models.ElasticEncryption encryption = null) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticBackupData ElasticBackupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NetApp.Models.ElasticBackupProperties properties = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticBackupPatch ElasticBackupPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string elasticBackupPropertiesUpdateLabel = null) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticBackupPolicyData ElasticBackupPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyProperties properties = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyProperties ElasticBackupPolicyProperties(Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? provisioningState = default(Azure.ResourceManager.NetApp.Models.NetAppProvisioningState?), int? dailyBackupsToKeep = default(int?), int? weeklyBackupsToKeep = default(int?), int? monthlyBackupsToKeep = default(int?), int? assignedVolumesCount = default(int?), Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyState? policyState = default(Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyState?)) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticBackupProperties ElasticBackupProperties(System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? snapshotCreationOn = default(System.DateTimeOffset?), System.DateTimeOffset? completionOn = default(System.DateTimeOffset?), Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? provisioningState = default(Azure.ResourceManager.NetApp.Models.NetAppProvisioningState?), long? size = default(long?), string label = null, Azure.ResourceManager.NetApp.Models.ElasticBackupType? backupType = default(Azure.ResourceManager.NetApp.Models.ElasticBackupType?), string failureReason = null, Azure.Core.ResourceIdentifier elasticVolumeResourceId = null, Azure.ResourceManager.NetApp.Models.SnapshotUsage? snapshotUsage = default(Azure.ResourceManager.NetApp.Models.SnapshotUsage?), Azure.Core.ResourceIdentifier elasticSnapshotResourceId = null, Azure.Core.ResourceIdentifier elasticBackupPolicyResourceId = null, Azure.ResourceManager.NetApp.Models.VolumeSize? volumeSize = default(Azure.ResourceManager.NetApp.Models.VolumeSize?)) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticBackupVaultData ElasticBackupVaultData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? elasticBackupVaultProvisioningState = default(Azure.ResourceManager.NetApp.Models.NetAppProvisioningState?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticCapacityPoolData ElasticCapacityPoolData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetApp.Models.ElasticCapacityPoolProperties properties = null, Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable zones = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticCapacityPoolProperties ElasticCapacityPoolProperties(long size = (long)0, Azure.ResourceManager.NetApp.Models.ElasticServiceLevel serviceLevel = default(Azure.ResourceManager.NetApp.Models.ElasticServiceLevel), Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? provisioningState = default(Azure.ResourceManager.NetApp.Models.NetAppProvisioningState?), Azure.ResourceManager.NetApp.Models.ElasticEncryptionConfiguration encryption = null, double? totalThroughputMibps = default(double?), Azure.Core.ResourceIdentifier subnetResourceId = null, string currentZone = null, Azure.ResourceManager.NetApp.Models.ElasticResourceAvailabilityStatus? availabilityStatus = default(Azure.ResourceManager.NetApp.Models.ElasticResourceAvailabilityStatus?), Azure.Core.ResourceIdentifier activeDirectoryConfigResourceId = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticEncryptionIdentity ElasticEncryptionIdentity(string principalId = null, Azure.Core.ResourceIdentifier userAssignedIdentity = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticKeyVaultProperties ElasticKeyVaultProperties(System.Uri keyVaultUri = null, string keyName = null, Azure.Core.ResourceIdentifier keyVaultResourceId = null, Azure.ResourceManager.NetApp.Models.ElasticKeyVaultStatus? status = default(Azure.ResourceManager.NetApp.Models.ElasticKeyVaultStatus?)) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticMountTargetProperties ElasticMountTargetProperties(string ipAddress = null, string smbServerFqdn = null) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticSnapshotData ElasticSnapshotData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? elasticSnapshotProvisioningState = default(Azure.ResourceManager.NetApp.Models.NetAppProvisioningState?)) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticSnapshotPolicyData ElasticSnapshotPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyProperties properties = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyProperties ElasticSnapshotPolicyProperties(Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyHourlySchedule hourlySchedule = null, Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyDailySchedule dailySchedule = null, Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyWeeklySchedule weeklySchedule = null, Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyMonthlySchedule monthlySchedule = null, Azure.ResourceManager.NetApp.Models.PolicyStatus? policyStatus = default(Azure.ResourceManager.NetApp.Models.PolicyStatus?), Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? provisioningState = default(Azure.ResourceManager.NetApp.Models.NetAppProvisioningState?)) { throw null; } + public static Azure.ResourceManager.NetApp.ElasticVolumeData ElasticVolumeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetApp.Models.ElasticVolumeProperties properties = null, Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable zones = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticVolumeProperties ElasticVolumeProperties(string filePath = null, long size = (long)0, System.Collections.Generic.IEnumerable exportRules = null, System.Collections.Generic.IEnumerable protocolTypes = null, Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? provisioningState = default(Azure.ResourceManager.NetApp.Models.NetAppProvisioningState?), Azure.ResourceManager.NetApp.Models.ElasticResourceAvailabilityStatus? availabilityStatus = default(Azure.ResourceManager.NetApp.Models.ElasticResourceAvailabilityStatus?), Azure.Core.ResourceIdentifier snapshotResourceId = null, System.Collections.Generic.IEnumerable mountTargets = null, Azure.ResourceManager.NetApp.Models.ElasticVolumeDataProtectionProperties dataProtection = null, Azure.ResourceManager.NetApp.Models.SnapshotDirectoryVisibility? snapshotDirectoryVisibility = default(Azure.ResourceManager.NetApp.Models.SnapshotDirectoryVisibility?), Azure.ResourceManager.NetApp.Models.ElasticSmbEncryption? smbEncryption = default(Azure.ResourceManager.NetApp.Models.ElasticSmbEncryption?), Azure.Core.ResourceIdentifier backupResourceId = null, Azure.ResourceManager.NetApp.Models.ElasticVolumeRestorationState? restorationState = default(Azure.ResourceManager.NetApp.Models.ElasticVolumeRestorationState?)) { throw null; } public static Azure.ResourceManager.NetApp.Models.GetGroupIdListForLdapUserResult GetGroupIdListForLdapUserResult(System.Collections.Generic.IEnumerable groupIdsForLdapUser = null) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppAccountActiveDirectory NetAppAccountActiveDirectory(string activeDirectoryId = null, string username = null, string password = null, string domain = null, string dns = null, Azure.ResourceManager.NetApp.Models.NetAppAccountActiveDirectoryStatus? status = default(Azure.ResourceManager.NetApp.Models.NetAppAccountActiveDirectoryStatus?), string statusDetails = null, string smbServerName = null, string organizationalUnit = null, string site = null, System.Collections.Generic.IEnumerable backupOperators = null, System.Collections.Generic.IEnumerable administrators = null, System.Net.IPAddress kdcIP = null, string adName = null, string serverRootCACertificate = null, bool? isAesEncryptionEnabled = default(bool?), bool? isLdapSigningEnabled = default(bool?), System.Collections.Generic.IEnumerable securityOperators = null, bool? isLdapOverTlsEnabled = default(bool?), bool? allowLocalNfsUsersWithLdap = default(bool?), bool? encryptDCConnections = default(bool?), Azure.ResourceManager.NetApp.Models.NetAppLdapSearchScopeConfiguration ldapSearchScope = null, string preferredServersForLdapClient = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetApp.NetAppAccountData NetAppAccountData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ETag? etag, Azure.ResourceManager.Models.ManagedServiceIdentity identity, string provisioningState, System.Collections.Generic.IEnumerable activeDirectories, Azure.ResourceManager.NetApp.Models.NetAppAccountEncryption encryption, bool? disableShowmount) { throw null; } - public static Azure.ResourceManager.NetApp.NetAppAccountData NetAppAccountData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string provisioningState = null, System.Collections.Generic.IEnumerable activeDirectories = null, Azure.ResourceManager.NetApp.Models.NetAppAccountEncryption encryption = null, bool? disableShowmount = default(bool?), string nfsV4IdDomain = null, Azure.ResourceManager.NetApp.Models.MultiAdStatus? multiAdStatus = default(Azure.ResourceManager.NetApp.Models.MultiAdStatus?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.NetApp.NetAppAccountData NetAppAccountData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ETag? etag, Azure.ResourceManager.Models.ManagedServiceIdentity identity, string provisioningState, System.Collections.Generic.IEnumerable activeDirectories, Azure.ResourceManager.NetApp.Models.NetAppAccountEncryption encryption, bool? disableShowmount, string nfsV4IdDomain, Azure.ResourceManager.NetApp.Models.MultiAdStatus? multiAdStatus) { throw null; } + public static Azure.ResourceManager.NetApp.NetAppAccountData NetAppAccountData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string provisioningState = null, System.Collections.Generic.IEnumerable activeDirectories = null, Azure.ResourceManager.NetApp.Models.NetAppAccountEncryption encryption = null, bool? disableShowmount = default(bool?), string nfsV4IdDomain = null, Azure.ResourceManager.NetApp.Models.MultiAdStatus? multiAdStatus = default(Azure.ResourceManager.NetApp.Models.MultiAdStatus?), Azure.ResourceManager.NetApp.Models.LdapConfiguration ldapConfiguration = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetApp.Models.NetAppAccountPatch NetAppAccountPatch(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, string provisioningState, System.Collections.Generic.IEnumerable activeDirectories, Azure.ResourceManager.NetApp.Models.NetAppAccountEncryption encryption, bool? disableShowmount) { throw null; } - public static Azure.ResourceManager.NetApp.Models.NetAppAccountPatch NetAppAccountPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string provisioningState = null, System.Collections.Generic.IEnumerable activeDirectories = null, Azure.ResourceManager.NetApp.Models.NetAppAccountEncryption encryption = null, bool? disableShowmount = default(bool?), string nfsV4IdDomain = null, Azure.ResourceManager.NetApp.Models.MultiAdStatus? multiAdStatus = default(Azure.ResourceManager.NetApp.Models.MultiAdStatus?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.NetApp.Models.NetAppAccountPatch NetAppAccountPatch(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, string provisioningState, System.Collections.Generic.IEnumerable activeDirectories, Azure.ResourceManager.NetApp.Models.NetAppAccountEncryption encryption, bool? disableShowmount, string nfsV4IdDomain, Azure.ResourceManager.NetApp.Models.MultiAdStatus? multiAdStatus) { throw null; } + public static Azure.ResourceManager.NetApp.Models.NetAppAccountPatch NetAppAccountPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string provisioningState = null, System.Collections.Generic.IEnumerable activeDirectories = null, Azure.ResourceManager.NetApp.Models.NetAppAccountEncryption encryption = null, bool? disableShowmount = default(bool?), string nfsV4IdDomain = null, Azure.ResourceManager.NetApp.Models.MultiAdStatus? multiAdStatus = default(Azure.ResourceManager.NetApp.Models.MultiAdStatus?), Azure.ResourceManager.NetApp.Models.LdapConfiguration ldapConfiguration = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetApp.NetAppBackupData NetAppBackupData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.Core.AzureLocation location, string backupId = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string provisioningState = null, long? size = default(long?), string label = null, Azure.ResourceManager.NetApp.Models.NetAppBackupType? backupType = default(Azure.ResourceManager.NetApp.Models.NetAppBackupType?), string failureReason = null, string volumeName = null, bool? useExistingSnapshot = default(bool?)) { throw null; } public static Azure.ResourceManager.NetApp.NetAppBackupData NetAppBackupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string backupId = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? snapshotCreationOn = default(System.DateTimeOffset?), System.DateTimeOffset? completionOn = default(System.DateTimeOffset?), string provisioningState = null, long? size = default(long?), string label = null, Azure.ResourceManager.NetApp.Models.NetAppBackupType? backupType = default(Azure.ResourceManager.NetApp.Models.NetAppBackupType?), string failureReason = null, Azure.Core.ResourceIdentifier volumeResourceId = null, bool? useExistingSnapshot = default(bool?), string snapshotName = null, Azure.Core.ResourceIdentifier backupPolicyArmResourceId = null, bool? isLargeVolume = default(bool?)) { throw null; } @@ -1085,6 +1909,10 @@ public static partial class ArmNetAppModelFactory public static Azure.ResourceManager.NetApp.NetAppBackupPolicyData NetAppBackupPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.Core.ResourceIdentifier backupPolicyId = null, string provisioningState = null, int? dailyBackupsToKeep = default(int?), int? weeklyBackupsToKeep = default(int?), int? monthlyBackupsToKeep = default(int?), int? volumesAssigned = default(int?), bool? isEnabled = default(bool?), System.Collections.Generic.IEnumerable volumeBackups = null) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppBackupPolicyPatch NetAppBackupPolicyPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.Core.ResourceIdentifier backupPolicyId = null, string provisioningState = null, int? dailyBackupsToKeep = default(int?), int? weeklyBackupsToKeep = default(int?), int? monthlyBackupsToKeep = default(int?), int? volumesAssigned = default(int?), bool? isEnabled = default(bool?), System.Collections.Generic.IEnumerable volumeBackups = null) { throw null; } public static Azure.ResourceManager.NetApp.NetAppBackupVaultData NetAppBackupVaultData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string provisioningState = null) { throw null; } + public static Azure.ResourceManager.NetApp.NetAppBucketData NetAppBucketData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string path = null, Azure.ResourceManager.NetApp.Models.NetAppBucketFileSystemUser fileSystemUser = null, Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? provisioningState = default(Azure.ResourceManager.NetApp.Models.NetAppProvisioningState?), Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialStatus? status = default(Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialStatus?), Azure.ResourceManager.NetApp.Models.NetAppBucketServerProperties server = null, Azure.ResourceManager.NetApp.Models.NetAppBucketPermission? permissions = default(Azure.ResourceManager.NetApp.Models.NetAppBucketPermission?)) { throw null; } + public static Azure.ResourceManager.NetApp.Models.NetAppBucketGenerateCredentials NetAppBucketGenerateCredentials(string accessKey = null, string secretKey = null, System.DateTimeOffset? keyPairExpiry = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.NetApp.Models.NetAppBucketPatch NetAppBucketPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string path = null, Azure.ResourceManager.NetApp.Models.NetAppBucketFileSystemUser fileSystemUser = null, Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? provisioningState = default(Azure.ResourceManager.NetApp.Models.NetAppProvisioningState?), Azure.ResourceManager.NetApp.Models.NetAppBucketServerPatchProperties server = null, Azure.ResourceManager.NetApp.Models.NetAppBucketPatchPermission? permissions = default(Azure.ResourceManager.NetApp.Models.NetAppBucketPatchPermission?)) { throw null; } + public static Azure.ResourceManager.NetApp.Models.NetAppBucketServerProperties NetAppBucketServerProperties(string fqdn = null, string certificateCommonName = null, System.DateTimeOffset? certificateExpiryOn = default(System.DateTimeOffset?), string ipAddress = null, string certificateObject = null) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppChangeKeyVault NetAppChangeKeyVault(System.Uri keyVaultUri = null, string keyName = null, Azure.Core.ResourceIdentifier keyVaultResourceId = null, System.Collections.Generic.IEnumerable keyVaultPrivateEndpoints = null) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppCheckAvailabilityResult NetAppCheckAvailabilityResult(bool? isAvailable = default(bool?), Azure.ResourceManager.NetApp.Models.NetAppNameUnavailableReason? reason = default(Azure.ResourceManager.NetApp.Models.NetAppNameUnavailableReason?), string message = null) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppDestinationReplication NetAppDestinationReplication(Azure.Core.ResourceIdentifier resourceId = null, Azure.ResourceManager.NetApp.Models.NetAppReplicationType? replicationType = default(Azure.ResourceManager.NetApp.Models.NetAppReplicationType?), string region = null, string zone = null) { throw null; } @@ -1098,7 +1926,9 @@ public static partial class ArmNetAppModelFactory public static Azure.ResourceManager.NetApp.Models.NetAppRegionInfo NetAppRegionInfo(Azure.ResourceManager.NetApp.Models.RegionStorageToNetworkProximity? storageToNetworkProximity = default(Azure.ResourceManager.NetApp.Models.RegionStorageToNetworkProximity?), System.Collections.Generic.IEnumerable availabilityZoneMappings = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetApp.Models.NetAppReplicationObject NetAppReplicationObject(string replicationId, Azure.ResourceManager.NetApp.Models.NetAppEndpointType? endpointType, Azure.ResourceManager.NetApp.Models.NetAppReplicationSchedule? replicationSchedule, Azure.Core.ResourceIdentifier remoteVolumeResourceId, Azure.ResourceManager.NetApp.Models.RemotePath remotePath, string remoteVolumeRegion) { throw null; } - public static Azure.ResourceManager.NetApp.Models.NetAppReplicationObject NetAppReplicationObject(string replicationId = null, Azure.ResourceManager.NetApp.Models.NetAppEndpointType? endpointType = default(Azure.ResourceManager.NetApp.Models.NetAppEndpointType?), Azure.ResourceManager.NetApp.Models.NetAppReplicationSchedule? replicationSchedule = default(Azure.ResourceManager.NetApp.Models.NetAppReplicationSchedule?), Azure.Core.ResourceIdentifier remoteVolumeResourceId = null, Azure.ResourceManager.NetApp.Models.RemotePath remotePath = null, string remoteVolumeRegion = null, System.Collections.Generic.IEnumerable destinationReplications = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.NetApp.Models.NetAppReplicationObject NetAppReplicationObject(string replicationId, Azure.ResourceManager.NetApp.Models.NetAppEndpointType? endpointType, Azure.ResourceManager.NetApp.Models.NetAppReplicationSchedule? replicationSchedule, Azure.Core.ResourceIdentifier remoteVolumeResourceId, Azure.ResourceManager.NetApp.Models.RemotePath remotePath, string remoteVolumeRegion, System.Collections.Generic.IEnumerable destinationReplications) { throw null; } + public static Azure.ResourceManager.NetApp.Models.NetAppReplicationObject NetAppReplicationObject(string replicationId = null, Azure.ResourceManager.NetApp.Models.NetAppEndpointType? endpointType = default(Azure.ResourceManager.NetApp.Models.NetAppEndpointType?), Azure.ResourceManager.NetApp.Models.NetAppReplicationSchedule? replicationSchedule = default(Azure.ResourceManager.NetApp.Models.NetAppReplicationSchedule?), Azure.Core.ResourceIdentifier remoteVolumeResourceId = null, Azure.ResourceManager.NetApp.Models.RemotePath remotePath = null, string remoteVolumeRegion = null, System.Collections.Generic.IEnumerable destinationReplications = null, Azure.ResourceManager.NetApp.Models.ExternalReplicationSetupStatus? externalReplicationSetupStatus = default(Azure.ResourceManager.NetApp.Models.ExternalReplicationSetupStatus?), string externalReplicationSetupInfo = null, Azure.ResourceManager.NetApp.Models.NetAppMirrorState? mirrorState = default(Azure.ResourceManager.NetApp.Models.NetAppMirrorState?), Azure.ResourceManager.NetApp.Models.VolumeReplicationRelationshipStatus? relationshipStatus = default(Azure.ResourceManager.NetApp.Models.VolumeReplicationRelationshipStatus?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetApp.Models.NetAppReplicationObject NetAppReplicationObject(string replicationId, Azure.ResourceManager.NetApp.Models.NetAppEndpointType? endpointType, Azure.ResourceManager.NetApp.Models.NetAppReplicationSchedule? replicationSchedule, Azure.Core.ResourceIdentifier remoteVolumeResourceId, string remoteVolumeRegion) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppRestoreStatus NetAppRestoreStatus(bool? isHealthy = default(bool?), Azure.ResourceManager.NetApp.Models.NetAppRelationshipStatus? relationshipStatus = default(Azure.ResourceManager.NetApp.Models.NetAppRelationshipStatus?), Azure.ResourceManager.NetApp.Models.NetAppMirrorState? mirrorState = default(Azure.ResourceManager.NetApp.Models.NetAppMirrorState?), string unhealthyReason = null, string errorMessage = null, long? totalTransferBytes = default(long?)) { throw null; } @@ -1118,7 +1948,9 @@ public static partial class ArmNetAppModelFactory public static Azure.ResourceManager.NetApp.Models.NetAppVolumeBackupStatus NetAppVolumeBackupStatus(bool? isHealthy, Azure.ResourceManager.NetApp.Models.NetAppRelationshipStatus? relationshipStatus, Azure.ResourceManager.NetApp.Models.NetAppMirrorState? mirrorState, string unhealthyReason, string errorMessage, long? lastTransferSize, string lastTransferType, long? totalTransferBytes) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppVolumeBackupStatus NetAppVolumeBackupStatus(bool? isHealthy = default(bool?), Azure.ResourceManager.NetApp.Models.NetAppRelationshipStatus? relationshipStatus = default(Azure.ResourceManager.NetApp.Models.NetAppRelationshipStatus?), Azure.ResourceManager.NetApp.Models.NetAppMirrorState? mirrorState = default(Azure.ResourceManager.NetApp.Models.NetAppMirrorState?), string unhealthyReason = null, string errorMessage = null, long? lastTransferSize = default(long?), string lastTransferType = null, long? totalTransferBytes = default(long?), long? transferProgressBytes = default(long?)) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppVolumeBackupStatus NetAppVolumeBackupStatus(bool? isHealthy = default(bool?), Azure.ResourceManager.NetApp.Models.VolumeBackupRelationshipStatus? volumeBackupRelationshipStatus = default(Azure.ResourceManager.NetApp.Models.VolumeBackupRelationshipStatus?), Azure.ResourceManager.NetApp.Models.NetAppMirrorState? mirrorState = default(Azure.ResourceManager.NetApp.Models.NetAppMirrorState?), string unhealthyReason = null, string errorMessage = null, long? lastTransferSize = default(long?), string lastTransferType = null, long? totalTransferBytes = default(long?), long? transferProgressBytes = default(long?)) { throw null; } - public static Azure.ResourceManager.NetApp.NetAppVolumeData NetAppVolumeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable zones = null, System.Guid? fileSystemId = default(System.Guid?), string creationToken = null, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel? serviceLevel = default(Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel?), long usageThreshold = (long)0, System.Collections.Generic.IEnumerable exportRules = null, System.Collections.Generic.IEnumerable protocolTypes = null, string provisioningState = null, string snapshotId = null, bool? deleteBaseSnapshot = default(bool?), string backupId = null, string baremetalTenantId = null, Azure.Core.ResourceIdentifier subnetId = null, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? networkFeatures = default(Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature?), Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? effectiveNetworkFeatures = default(Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature?), System.Guid? networkSiblingSetId = default(System.Guid?), Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity?), System.Collections.Generic.IEnumerable mountTargets = null, string volumeType = null, Azure.ResourceManager.NetApp.Models.NetAppVolumeDataProtection dataProtection = null, Azure.ResourceManager.NetApp.Models.AcceptGrowCapacityPoolForShortTermCloneSplit? acceptGrowCapacityPoolForShortTermCloneSplit = default(Azure.ResourceManager.NetApp.Models.AcceptGrowCapacityPoolForShortTermCloneSplit?), bool? isRestoring = default(bool?), bool? isSnapshotDirectoryVisible = default(bool?), bool? isKerberosEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle? securityStyle = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle?), bool? isSmbEncryptionEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration? smbAccessBasedEnumeration = default(Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration?), Azure.ResourceManager.NetApp.Models.SmbNonBrowsable? smbNonBrowsable = default(Azure.ResourceManager.NetApp.Models.SmbNonBrowsable?), bool? isSmbContinuouslyAvailable = default(bool?), float? throughputMibps = default(float?), float? actualThroughputMibps = default(float?), Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource? encryptionKeySource = default(Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource?), Azure.Core.ResourceIdentifier keyVaultPrivateEndpointResourceId = null, bool? isLdapEnabled = default(bool?), bool? isCoolAccessEnabled = default(bool?), int? coolnessPeriod = default(int?), Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy = default(Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy?), Azure.ResourceManager.NetApp.Models.CoolAccessTieringPolicy? coolAccessTieringPolicy = default(Azure.ResourceManager.NetApp.Models.CoolAccessTieringPolicy?), string unixPermissions = null, int? cloneProgress = default(int?), Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog? fileAccessLogs = default(Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog?), Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore? avsDataStore = default(Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore?), System.Collections.Generic.IEnumerable dataStoreResourceId = null, bool? isDefaultQuotaEnabled = default(bool?), long? defaultUserQuotaInKiBs = default(long?), long? defaultGroupQuotaInKiBs = default(long?), long? maximumNumberOfFiles = default(long?), string volumeGroupName = null, Azure.Core.ResourceIdentifier capacityPoolResourceId = null, Azure.Core.ResourceIdentifier proximityPlacementGroupId = null, string t2Network = null, string volumeSpecName = null, bool? isEncrypted = default(bool?), System.Collections.Generic.IEnumerable placementRules = null, Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume? enableSubvolumes = default(Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume?), string provisionedAvailabilityZone = null, bool? isLargeVolume = default(bool?), Azure.Core.ResourceIdentifier originatingResourceId = null, long? inheritedSizeInBytes = default(long?)) { throw null; } + public static Azure.ResourceManager.NetApp.NetAppVolumeData NetAppVolumeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable zones = null, System.Guid? fileSystemId = default(System.Guid?), string creationToken = null, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel? serviceLevel = default(Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel?), long usageThreshold = (long)0, System.Collections.Generic.IEnumerable exportRules = null, System.Collections.Generic.IEnumerable protocolTypes = null, string provisioningState = null, string snapshotId = null, bool? deleteBaseSnapshot = default(bool?), string backupId = null, string baremetalTenantId = null, Azure.Core.ResourceIdentifier subnetId = null, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? networkFeatures = default(Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature?), Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? effectiveNetworkFeatures = default(Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature?), System.Guid? networkSiblingSetId = default(System.Guid?), Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity?), System.Collections.Generic.IEnumerable mountTargets = null, string volumeType = null, Azure.ResourceManager.NetApp.Models.NetAppVolumeDataProtection dataProtection = null, Azure.ResourceManager.NetApp.Models.AcceptGrowCapacityPoolForShortTermCloneSplit? acceptGrowCapacityPoolForShortTermCloneSplit = default(Azure.ResourceManager.NetApp.Models.AcceptGrowCapacityPoolForShortTermCloneSplit?), bool? isRestoring = default(bool?), bool? isSnapshotDirectoryVisible = default(bool?), bool? isKerberosEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle? securityStyle = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle?), bool? isSmbEncryptionEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration? smbAccessBasedEnumeration = default(Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration?), Azure.ResourceManager.NetApp.Models.SmbNonBrowsable? smbNonBrowsable = default(Azure.ResourceManager.NetApp.Models.SmbNonBrowsable?), bool? isSmbContinuouslyAvailable = default(bool?), float? throughputMibps = default(float?), float? actualThroughputMibps = default(float?), Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource? encryptionKeySource = default(Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource?), Azure.Core.ResourceIdentifier keyVaultPrivateEndpointResourceId = null, bool? isLdapEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.LdapServerType? ldapServerType = default(Azure.ResourceManager.NetApp.Models.LdapServerType?), bool? isCoolAccessEnabled = default(bool?), int? coolnessPeriod = default(int?), Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy = default(Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy?), Azure.ResourceManager.NetApp.Models.CoolAccessTieringPolicy? coolAccessTieringPolicy = default(Azure.ResourceManager.NetApp.Models.CoolAccessTieringPolicy?), string unixPermissions = null, int? cloneProgress = default(int?), Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog? fileAccessLogs = default(Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog?), Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore? avsDataStore = default(Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore?), System.Collections.Generic.IEnumerable dataStoreResourceId = null, bool? isDefaultQuotaEnabled = default(bool?), long? defaultUserQuotaInKiBs = default(long?), long? defaultGroupQuotaInKiBs = default(long?), long? maximumNumberOfFiles = default(long?), string volumeGroupName = null, Azure.Core.ResourceIdentifier capacityPoolResourceId = null, Azure.Core.ResourceIdentifier proximityPlacementGroupId = null, string t2Network = null, string volumeSpecName = null, bool? isEncrypted = default(bool?), System.Collections.Generic.IEnumerable placementRules = null, Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume? enableSubvolumes = default(Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume?), string provisionedAvailabilityZone = null, bool? isLargeVolume = default(bool?), Azure.ResourceManager.NetApp.Models.LargeVolumeType? largeVolumeType = default(Azure.ResourceManager.NetApp.Models.LargeVolumeType?), Azure.Core.ResourceIdentifier originatingResourceId = null, long? inheritedSizeInBytes = default(long?), Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage? language = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage?), Azure.ResourceManager.NetApp.Models.BreakthroughMode? breakthroughMode = default(Azure.ResourceManager.NetApp.Models.BreakthroughMode?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.NetApp.NetAppVolumeData NetAppVolumeData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ETag? etag, System.Collections.Generic.IEnumerable zones, System.Guid? fileSystemId, string creationToken, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel? serviceLevel, long usageThreshold, System.Collections.Generic.IEnumerable exportRules, System.Collections.Generic.IEnumerable protocolTypes, string provisioningState, string snapshotId, bool? deleteBaseSnapshot, string backupId, string baremetalTenantId, Azure.Core.ResourceIdentifier subnetId, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? networkFeatures, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? effectiveNetworkFeatures, System.Guid? networkSiblingSetId, Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity, System.Collections.Generic.IEnumerable mountTargets, string volumeType, Azure.ResourceManager.NetApp.Models.NetAppVolumeDataProtection dataProtection, Azure.ResourceManager.NetApp.Models.AcceptGrowCapacityPoolForShortTermCloneSplit? acceptGrowCapacityPoolForShortTermCloneSplit, bool? isRestoring, bool? isSnapshotDirectoryVisible, bool? isKerberosEnabled, Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle? securityStyle, bool? isSmbEncryptionEnabled, Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration? smbAccessBasedEnumeration, Azure.ResourceManager.NetApp.Models.SmbNonBrowsable? smbNonBrowsable, bool? isSmbContinuouslyAvailable, float? throughputMibps, float? actualThroughputMibps, Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource? encryptionKeySource, Azure.Core.ResourceIdentifier keyVaultPrivateEndpointResourceId, bool? isLdapEnabled, bool? isCoolAccessEnabled, int? coolnessPeriod, Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy, Azure.ResourceManager.NetApp.Models.CoolAccessTieringPolicy? coolAccessTieringPolicy, string unixPermissions, int? cloneProgress, Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog? fileAccessLogs, Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore? avsDataStore, System.Collections.Generic.IEnumerable dataStoreResourceId, bool? isDefaultQuotaEnabled, long? defaultUserQuotaInKiBs, long? defaultGroupQuotaInKiBs, long? maximumNumberOfFiles, string volumeGroupName, Azure.Core.ResourceIdentifier capacityPoolResourceId, Azure.Core.ResourceIdentifier proximityPlacementGroupId, string t2Network, string volumeSpecName, bool? isEncrypted, System.Collections.Generic.IEnumerable placementRules, Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume? enableSubvolumes, string provisionedAvailabilityZone, bool? isLargeVolume, Azure.Core.ResourceIdentifier originatingResourceId, long? inheritedSizeInBytes) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetApp.NetAppVolumeData NetAppVolumeData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ETag? etag, System.Collections.Generic.IEnumerable zones, System.Guid? fileSystemId, string creationToken, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel? serviceLevel, long usageThreshold, System.Collections.Generic.IEnumerable exportRules, System.Collections.Generic.IEnumerable protocolTypes, string provisioningState, string snapshotId, bool? deleteBaseSnapshot, string backupId, string baremetalTenantId, Azure.Core.ResourceIdentifier subnetId, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? networkFeatures, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? effectiveNetworkFeatures, System.Guid? networkSiblingSetId, Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity, System.Collections.Generic.IEnumerable mountTargets, string volumeType, Azure.ResourceManager.NetApp.Models.NetAppVolumeDataProtection dataProtection, bool? isRestoring, bool? isSnapshotDirectoryVisible, bool? isKerberosEnabled, Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle? securityStyle, bool? isSmbEncryptionEnabled, Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration? smbAccessBasedEnumeration, Azure.ResourceManager.NetApp.Models.SmbNonBrowsable? smbNonBrowsable, bool? isSmbContinuouslyAvailable, float? throughputMibps, float? actualThroughputMibps, Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource? encryptionKeySource, Azure.Core.ResourceIdentifier keyVaultPrivateEndpointResourceId, bool? isLdapEnabled, bool? isCoolAccessEnabled, int? coolnessPeriod, Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy, Azure.ResourceManager.NetApp.Models.CoolAccessTieringPolicy? coolAccessTieringPolicy, string unixPermissions, int? cloneProgress, Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog? fileAccessLogs, Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore? avsDataStore, System.Collections.Generic.IEnumerable dataStoreResourceId, bool? isDefaultQuotaEnabled, long? defaultUserQuotaInKiBs, long? defaultGroupQuotaInKiBs, long? maximumNumberOfFiles, string volumeGroupName, Azure.Core.ResourceIdentifier capacityPoolResourceId, Azure.Core.ResourceIdentifier proximityPlacementGroupId, string t2Network, string volumeSpecName, bool? isEncrypted, System.Collections.Generic.IEnumerable placementRules, Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume? enableSubvolumes, string provisionedAvailabilityZone, bool? isLargeVolume, Azure.Core.ResourceIdentifier originatingResourceId) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -1132,7 +1964,9 @@ public static partial class ArmNetAppModelFactory [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetApp.Models.NetAppVolumeGroupMetadata NetAppVolumeGroupMetadata(string groupDescription, Azure.ResourceManager.NetApp.Models.NetAppApplicationType? applicationType, string applicationIdentifier, System.Collections.Generic.IEnumerable globalPlacementRules, string deploymentSpecId, long? volumesCount) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppVolumeGroupResult NetAppVolumeGroupResult(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string provisioningState = null, Azure.ResourceManager.NetApp.Models.NetAppVolumeGroupMetadata groupMetaData = null) { throw null; } - public static Azure.ResourceManager.NetApp.Models.NetAppVolumeGroupVolume NetAppVolumeGroupVolume(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IEnumerable zones = null, System.Guid? fileSystemId = default(System.Guid?), string creationToken = null, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel? serviceLevel = default(Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel?), long usageThreshold = (long)0, System.Collections.Generic.IEnumerable exportRules = null, System.Collections.Generic.IEnumerable protocolTypes = null, string provisioningState = null, string snapshotId = null, bool? deleteBaseSnapshot = default(bool?), string backupId = null, string baremetalTenantId = null, Azure.Core.ResourceIdentifier subnetId = null, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? networkFeatures = default(Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature?), Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? effectiveNetworkFeatures = default(Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature?), System.Guid? networkSiblingSetId = default(System.Guid?), Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity?), System.Collections.Generic.IEnumerable mountTargets = null, string volumeType = null, Azure.ResourceManager.NetApp.Models.NetAppVolumeDataProtection dataProtection = null, Azure.ResourceManager.NetApp.Models.AcceptGrowCapacityPoolForShortTermCloneSplit? acceptGrowCapacityPoolForShortTermCloneSplit = default(Azure.ResourceManager.NetApp.Models.AcceptGrowCapacityPoolForShortTermCloneSplit?), bool? isRestoring = default(bool?), bool? isSnapshotDirectoryVisible = default(bool?), bool? isKerberosEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle? securityStyle = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle?), bool? isSmbEncryptionEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration? smbAccessBasedEnumeration = default(Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration?), Azure.ResourceManager.NetApp.Models.SmbNonBrowsable? smbNonBrowsable = default(Azure.ResourceManager.NetApp.Models.SmbNonBrowsable?), bool? isSmbContinuouslyAvailable = default(bool?), float? throughputMibps = default(float?), float? actualThroughputMibps = default(float?), Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource? encryptionKeySource = default(Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource?), Azure.Core.ResourceIdentifier keyVaultPrivateEndpointResourceId = null, bool? isLdapEnabled = default(bool?), bool? isCoolAccessEnabled = default(bool?), int? coolnessPeriod = default(int?), Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy = default(Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy?), Azure.ResourceManager.NetApp.Models.CoolAccessTieringPolicy? coolAccessTieringPolicy = default(Azure.ResourceManager.NetApp.Models.CoolAccessTieringPolicy?), string unixPermissions = null, int? cloneProgress = default(int?), Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog? fileAccessLogs = default(Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog?), Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore? avsDataStore = default(Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore?), System.Collections.Generic.IEnumerable dataStoreResourceId = null, bool? isDefaultQuotaEnabled = default(bool?), long? defaultUserQuotaInKiBs = default(long?), long? defaultGroupQuotaInKiBs = default(long?), long? maximumNumberOfFiles = default(long?), string volumeGroupName = null, Azure.Core.ResourceIdentifier capacityPoolResourceId = null, Azure.Core.ResourceIdentifier proximityPlacementGroupId = null, string t2Network = null, string volumeSpecName = null, bool? isEncrypted = default(bool?), System.Collections.Generic.IEnumerable placementRules = null, Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume? enableSubvolumes = default(Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume?), string provisionedAvailabilityZone = null, bool? isLargeVolume = default(bool?), Azure.Core.ResourceIdentifier originatingResourceId = null, long? inheritedSizeInBytes = default(long?)) { throw null; } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeGroupVolume NetAppVolumeGroupVolume(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IEnumerable zones = null, System.Guid? fileSystemId = default(System.Guid?), string creationToken = null, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel? serviceLevel = default(Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel?), long usageThreshold = (long)0, System.Collections.Generic.IEnumerable exportRules = null, System.Collections.Generic.IEnumerable protocolTypes = null, string provisioningState = null, string snapshotId = null, bool? deleteBaseSnapshot = default(bool?), string backupId = null, string baremetalTenantId = null, Azure.Core.ResourceIdentifier subnetId = null, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? networkFeatures = default(Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature?), Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? effectiveNetworkFeatures = default(Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature?), System.Guid? networkSiblingSetId = default(System.Guid?), Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity?), System.Collections.Generic.IEnumerable mountTargets = null, string volumeType = null, Azure.ResourceManager.NetApp.Models.NetAppVolumeDataProtection dataProtection = null, Azure.ResourceManager.NetApp.Models.AcceptGrowCapacityPoolForShortTermCloneSplit? acceptGrowCapacityPoolForShortTermCloneSplit = default(Azure.ResourceManager.NetApp.Models.AcceptGrowCapacityPoolForShortTermCloneSplit?), bool? isRestoring = default(bool?), bool? isSnapshotDirectoryVisible = default(bool?), bool? isKerberosEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle? securityStyle = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle?), bool? isSmbEncryptionEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration? smbAccessBasedEnumeration = default(Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration?), Azure.ResourceManager.NetApp.Models.SmbNonBrowsable? smbNonBrowsable = default(Azure.ResourceManager.NetApp.Models.SmbNonBrowsable?), bool? isSmbContinuouslyAvailable = default(bool?), float? throughputMibps = default(float?), float? actualThroughputMibps = default(float?), Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource? encryptionKeySource = default(Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource?), Azure.Core.ResourceIdentifier keyVaultPrivateEndpointResourceId = null, bool? isLdapEnabled = default(bool?), Azure.ResourceManager.NetApp.Models.LdapServerType? ldapServerType = default(Azure.ResourceManager.NetApp.Models.LdapServerType?), bool? isCoolAccessEnabled = default(bool?), int? coolnessPeriod = default(int?), Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy = default(Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy?), Azure.ResourceManager.NetApp.Models.CoolAccessTieringPolicy? coolAccessTieringPolicy = default(Azure.ResourceManager.NetApp.Models.CoolAccessTieringPolicy?), string unixPermissions = null, int? cloneProgress = default(int?), Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog? fileAccessLogs = default(Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog?), Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore? avsDataStore = default(Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore?), System.Collections.Generic.IEnumerable dataStoreResourceId = null, bool? isDefaultQuotaEnabled = default(bool?), long? defaultUserQuotaInKiBs = default(long?), long? defaultGroupQuotaInKiBs = default(long?), long? maximumNumberOfFiles = default(long?), string volumeGroupName = null, Azure.Core.ResourceIdentifier capacityPoolResourceId = null, Azure.Core.ResourceIdentifier proximityPlacementGroupId = null, string t2Network = null, string volumeSpecName = null, bool? isEncrypted = default(bool?), System.Collections.Generic.IEnumerable placementRules = null, Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume? enableSubvolumes = default(Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume?), string provisionedAvailabilityZone = null, bool? isLargeVolume = default(bool?), Azure.ResourceManager.NetApp.Models.LargeVolumeType? largeVolumeType = default(Azure.ResourceManager.NetApp.Models.LargeVolumeType?), Azure.Core.ResourceIdentifier originatingResourceId = null, long? inheritedSizeInBytes = default(long?), Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage? language = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage?), Azure.ResourceManager.NetApp.Models.BreakthroughMode? breakthroughMode = default(Azure.ResourceManager.NetApp.Models.BreakthroughMode?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeGroupVolume NetAppVolumeGroupVolume(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType? resourceType, System.Collections.Generic.IDictionary tags, System.Collections.Generic.IEnumerable zones, System.Guid? fileSystemId, string creationToken, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel? serviceLevel, long usageThreshold, System.Collections.Generic.IEnumerable exportRules, System.Collections.Generic.IEnumerable protocolTypes, string provisioningState, string snapshotId, bool? deleteBaseSnapshot, string backupId, string baremetalTenantId, Azure.Core.ResourceIdentifier subnetId, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? networkFeatures, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? effectiveNetworkFeatures, System.Guid? networkSiblingSetId, Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity, System.Collections.Generic.IEnumerable mountTargets, string volumeType, Azure.ResourceManager.NetApp.Models.NetAppVolumeDataProtection dataProtection, Azure.ResourceManager.NetApp.Models.AcceptGrowCapacityPoolForShortTermCloneSplit? acceptGrowCapacityPoolForShortTermCloneSplit, bool? isRestoring, bool? isSnapshotDirectoryVisible, bool? isKerberosEnabled, Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle? securityStyle, bool? isSmbEncryptionEnabled, Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration? smbAccessBasedEnumeration, Azure.ResourceManager.NetApp.Models.SmbNonBrowsable? smbNonBrowsable, bool? isSmbContinuouslyAvailable, float? throughputMibps, float? actualThroughputMibps, Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource? encryptionKeySource, Azure.Core.ResourceIdentifier keyVaultPrivateEndpointResourceId, bool? isLdapEnabled, bool? isCoolAccessEnabled, int? coolnessPeriod, Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy, Azure.ResourceManager.NetApp.Models.CoolAccessTieringPolicy? coolAccessTieringPolicy, string unixPermissions, int? cloneProgress, Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog? fileAccessLogs, Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore? avsDataStore, System.Collections.Generic.IEnumerable dataStoreResourceId, bool? isDefaultQuotaEnabled, long? defaultUserQuotaInKiBs, long? defaultGroupQuotaInKiBs, long? maximumNumberOfFiles, string volumeGroupName, Azure.Core.ResourceIdentifier capacityPoolResourceId, Azure.Core.ResourceIdentifier proximityPlacementGroupId, string t2Network, string volumeSpecName, bool? isEncrypted, System.Collections.Generic.IEnumerable placementRules, Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume? enableSubvolumes, string provisionedAvailabilityZone, bool? isLargeVolume, Azure.Core.ResourceIdentifier originatingResourceId, long? inheritedSizeInBytes) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetApp.Models.NetAppVolumeGroupVolume NetAppVolumeGroupVolume(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType? resourceType, System.Collections.Generic.IDictionary tags, System.Collections.Generic.IEnumerable zones, System.Guid? fileSystemId, string creationToken, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel? serviceLevel, long usageThreshold, System.Collections.Generic.IEnumerable exportRules, System.Collections.Generic.IEnumerable protocolTypes, string provisioningState, string snapshotId, bool? deleteBaseSnapshot, string backupId, string baremetalTenantId, Azure.Core.ResourceIdentifier subnetId, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? networkFeatures, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? effectiveNetworkFeatures, System.Guid? networkSiblingSetId, Azure.ResourceManager.NetApp.Models.NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity, System.Collections.Generic.IEnumerable mountTargets, string volumeType, Azure.ResourceManager.NetApp.Models.NetAppVolumeDataProtection dataProtection, bool? isRestoring, bool? isSnapshotDirectoryVisible, bool? isKerberosEnabled, Azure.ResourceManager.NetApp.Models.NetAppVolumeSecurityStyle? securityStyle, bool? isSmbEncryptionEnabled, Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration? smbAccessBasedEnumeration, Azure.ResourceManager.NetApp.Models.SmbNonBrowsable? smbNonBrowsable, bool? isSmbContinuouslyAvailable, float? throughputMibps, float? actualThroughputMibps, Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource? encryptionKeySource, Azure.Core.ResourceIdentifier keyVaultPrivateEndpointResourceId, bool? isLdapEnabled, bool? isCoolAccessEnabled, int? coolnessPeriod, Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy, Azure.ResourceManager.NetApp.Models.CoolAccessTieringPolicy? coolAccessTieringPolicy, string unixPermissions, int? cloneProgress, Azure.ResourceManager.NetApp.Models.NetAppFileAccessLog? fileAccessLogs, Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore? avsDataStore, System.Collections.Generic.IEnumerable dataStoreResourceId, bool? isDefaultQuotaEnabled, long? defaultUserQuotaInKiBs, long? defaultGroupQuotaInKiBs, long? maximumNumberOfFiles, string volumeGroupName, Azure.Core.ResourceIdentifier capacityPoolResourceId, Azure.Core.ResourceIdentifier proximityPlacementGroupId, string t2Network, string volumeSpecName, bool? isEncrypted, System.Collections.Generic.IEnumerable placementRules, Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume? enableSubvolumes, string provisionedAvailabilityZone, bool? isLargeVolume, Azure.Core.ResourceIdentifier originatingResourceId) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -1147,6 +1981,8 @@ public static partial class ArmNetAppModelFactory public static Azure.ResourceManager.NetApp.Models.NetAppVolumePatch NetAppVolumePatch(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel? serviceLevel, long? usageThreshold, System.Collections.Generic.IEnumerable exportRules, System.Collections.Generic.IEnumerable protocolTypes, float? throughputMibps, Azure.ResourceManager.NetApp.Models.NetAppVolumePatchDataProtection dataProtection, bool? isDefaultQuotaEnabled, long? defaultUserQuotaInKiBs, long? defaultGroupQuotaInKiBs, string unixPermissions, bool? isCoolAccessEnabled, int? coolnessPeriod, Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy, bool? isSnapshotDirectoryVisible, Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration? smbAccessBasedEnumeration, Azure.ResourceManager.NetApp.Models.SmbNonBrowsable? smbNonBrowsable) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.NetApp.Models.NetAppVolumePatch NetAppVolumePatch(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.NetApp.Models.NetAppFileServiceLevel? serviceLevel, long? usageThreshold, System.Collections.Generic.IEnumerable exportRules, float? throughputMibps, Azure.Core.ResourceIdentifier snapshotPolicyId = null, bool? isDefaultQuotaEnabled = default(bool?), long? defaultUserQuotaInKiBs = default(long?), long? defaultGroupQuotaInKiBs = default(long?), string unixPermissions = null, bool? isCoolAccessEnabled = default(bool?), int? coolnessPeriod = default(int?), Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy = default(Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy?), bool? isSnapshotDirectoryVisible = default(bool?), Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration? smbAccessBasedEnumeration = default(Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration?), Azure.ResourceManager.NetApp.Models.SmbNonBrowsable? smbNonBrowsable = default(Azure.ResourceManager.NetApp.Models.SmbNonBrowsable?)) { throw null; } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeQuotaReport NetAppVolumeQuotaReport(Azure.ResourceManager.NetApp.Models.NetAppVolumeQuotaType? quotaType = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeQuotaType?), string quotaTarget = null, long? quotaLimitUsedInKiBs = default(long?), long? quotaLimitTotalInKiBs = default(long?), float? percentageUsed = default(float?), bool? isDerivedQuota = default(bool?)) { throw null; } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeQuotaReportListResult NetAppVolumeQuotaReportListResult(System.Collections.Generic.IEnumerable value = null) { throw null; } public static Azure.ResourceManager.NetApp.NetAppVolumeQuotaRuleData NetAppVolumeQuotaRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? provisioningState = default(Azure.ResourceManager.NetApp.Models.NetAppProvisioningState?), long? quotaSizeInKiBs = default(long?), Azure.ResourceManager.NetApp.Models.NetAppVolumeQuotaType? quotaType = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeQuotaType?), string quotaTarget = null) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppVolumeQuotaRulePatch NetAppVolumeQuotaRulePatch(System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? provisioningState = default(Azure.ResourceManager.NetApp.Models.NetAppProvisioningState?), long? quotaSizeInKiBs = default(long?), Azure.ResourceManager.NetApp.Models.NetAppVolumeQuotaType? quotaType = default(Azure.ResourceManager.NetApp.Models.NetAppVolumeQuotaType?), string quotaTarget = null) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetAppVolumeRelocationProperties NetAppVolumeRelocationProperties(bool? isRelocationRequested = default(bool?), bool? isReadyToBeFinalized = default(bool?)) { throw null; } @@ -1160,9 +1996,16 @@ public static partial class ArmNetAppModelFactory public static Azure.ResourceManager.NetApp.NetAppVolumeSnapshotData NetAppVolumeSnapshotData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string snapshotId = null, System.DateTimeOffset? created = default(System.DateTimeOffset?), string provisioningState = null) { throw null; } public static Azure.ResourceManager.NetApp.Models.NetworkSiblingSet NetworkSiblingSet(string networkSiblingSetId = null, Azure.Core.ResourceIdentifier subnetId = null, string networkSiblingSetStateId = null, Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature? networkFeatures = default(Azure.ResourceManager.NetApp.Models.NetAppNetworkFeature?), Azure.ResourceManager.NetApp.Models.NetworkSiblingSetProvisioningState? provisioningState = default(Azure.ResourceManager.NetApp.Models.NetworkSiblingSetProvisioningState?), System.Collections.Generic.IEnumerable nicInfoList = null) { throw null; } public static Azure.ResourceManager.NetApp.Models.NicInfo NicInfo(string ipAddress = null, System.Collections.Generic.IEnumerable volumeResourceIds = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.PeeringPassphrases PeeringPassphrases(string clusterPeeringCommand = null, string clusterPeeringPassphrase = null, string vserverPeeringCommand = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.RansomwareProtectionSettings RansomwareProtectionSettings(Azure.ResourceManager.NetApp.Models.DesiredRansomwareProtectionState? desiredRansomwareProtectionState = default(Azure.ResourceManager.NetApp.Models.DesiredRansomwareProtectionState?), Azure.ResourceManager.NetApp.Models.ActualRansomwareProtectionState? actualRansomwareProtectionState = default(Azure.ResourceManager.NetApp.Models.ActualRansomwareProtectionState?)) { throw null; } + public static Azure.ResourceManager.NetApp.RansomwareReportData RansomwareReportData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NetApp.Models.RansomwareReportProperties properties = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.RansomwareReportProperties RansomwareReportProperties(System.DateTimeOffset? eventOn = default(System.DateTimeOffset?), Azure.ResourceManager.NetApp.Models.RansomwareReportState? state = default(Azure.ResourceManager.NetApp.Models.RansomwareReportState?), Azure.ResourceManager.NetApp.Models.RansomwareReportSeverity? severity = default(Azure.ResourceManager.NetApp.Models.RansomwareReportSeverity?), int? clearedCount = default(int?), int? reportedCount = default(int?), System.Collections.Generic.IEnumerable suspects = null, string provisioningState = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.RansomwareSuspects RansomwareSuspects(string extension = null, Azure.ResourceManager.NetApp.Models.RansomwareSuspectResolution? resolution = default(Azure.ResourceManager.NetApp.Models.RansomwareSuspectResolution?), int? fileCount = default(int?), System.Collections.Generic.IEnumerable suspectFiles = null) { throw null; } public static Azure.ResourceManager.NetApp.RegionInfoResourceData RegionInfoResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NetApp.Models.RegionStorageToNetworkProximity? storageToNetworkProximity = default(Azure.ResourceManager.NetApp.Models.RegionStorageToNetworkProximity?), System.Collections.Generic.IEnumerable availabilityZoneMappings = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.SecretPasswordIdentity SecretPasswordIdentity(string principalId = null, string userAssignedIdentity = null) { throw null; } public static Azure.ResourceManager.NetApp.SnapshotPolicyData SnapshotPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.NetApp.Models.SnapshotPolicyHourlySchedule hourlySchedule = null, Azure.ResourceManager.NetApp.Models.SnapshotPolicyDailySchedule dailySchedule = null, Azure.ResourceManager.NetApp.Models.SnapshotPolicyWeeklySchedule weeklySchedule = null, Azure.ResourceManager.NetApp.Models.SnapshotPolicyMonthlySchedule monthlySchedule = null, bool? isEnabled = default(bool?), string provisioningState = null) { throw null; } public static Azure.ResourceManager.NetApp.Models.SnapshotPolicyPatch SnapshotPolicyPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetApp.Models.SnapshotPolicyHourlySchedule hourlySchedule = null, Azure.ResourceManager.NetApp.Models.SnapshotPolicyDailySchedule dailySchedule = null, Azure.ResourceManager.NetApp.Models.SnapshotPolicyWeeklySchedule weeklySchedule = null, Azure.ResourceManager.NetApp.Models.SnapshotPolicyMonthlySchedule monthlySchedule = null, bool? isEnabled = default(bool?), string provisioningState = null) { throw null; } + public static Azure.ResourceManager.NetApp.Models.SuspectFile SuspectFile(string suspectFileName = null, System.DateTimeOffset? fileTimestamp = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.NetApp.Models.SvmPeerCommandResult SvmPeerCommandResult(string svmPeeringCommand = null) { throw null; } } public partial class AvailabilityZoneMapping : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel @@ -1177,6 +2020,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class AzureResourceManagerCommonTypesManagedServiceIdentityUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AzureResourceManagerCommonTypesManagedServiceIdentityUpdate() { } + public Azure.ResourceManager.NetApp.Models.ManagedServiceIdentityType? ManagedServiceIdentityType { get { throw null; } set { } } + public System.Collections.Generic.IDictionary UserAssignedIdentities { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.AzureResourceManagerCommonTypesManagedServiceIdentityUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.AzureResourceManagerCommonTypesManagedServiceIdentityUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class BackupsMigrationContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public BackupsMigrationContent(string backupVaultId) { } @@ -1189,75 +2044,302 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct CapacityPoolEncryptionType : System.IEquatable + public readonly partial struct BreakthroughMode : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public CapacityPoolEncryptionType(string value) { throw null; } - public static Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType Double { get { throw null; } } - public static Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType Single { get { throw null; } } - public bool Equals(Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType other) { throw null; } + public BreakthroughMode(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.BreakthroughMode Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.BreakthroughMode Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.BreakthroughMode other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType left, Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType right) { throw null; } - public static implicit operator Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType left, Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.BreakthroughMode left, Azure.ResourceManager.NetApp.Models.BreakthroughMode right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.BreakthroughMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.BreakthroughMode left, Azure.ResourceManager.NetApp.Models.BreakthroughMode right) { throw null; } public override string ToString() { throw null; } } - public partial class CapacityPoolPatch : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CapacityPoolPatch(Azure.Core.AzureLocation location) { } - public float? CustomThroughputMibps { get { throw null; } set { } } - public int? CustomThroughputMibpsInt { get { throw null; } set { } } - public bool? IsCoolAccessEnabled { get { throw null; } set { } } - public Azure.ResourceManager.NetApp.Models.CapacityPoolQosType? QosType { get { throw null; } set { } } - public long? Size { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.NetApp.Models.CapacityPoolPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.NetApp.Models.CapacityPoolPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct CapacityPoolQosType : System.IEquatable + public readonly partial struct CacheLifeCycleState : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public CapacityPoolQosType(string value) { throw null; } - public static Azure.ResourceManager.NetApp.Models.CapacityPoolQosType Auto { get { throw null; } } - public static Azure.ResourceManager.NetApp.Models.CapacityPoolQosType Manual { get { throw null; } } - public bool Equals(Azure.ResourceManager.NetApp.Models.CapacityPoolQosType other) { throw null; } + public CacheLifeCycleState(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.CacheLifeCycleState ClusterPeeringOfferSent { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.CacheLifeCycleState Creating { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.CacheLifeCycleState Failed { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.CacheLifeCycleState Succeeded { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.CacheLifeCycleState VserverPeeringOfferSent { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.CacheLifeCycleState other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.NetApp.Models.CapacityPoolQosType left, Azure.ResourceManager.NetApp.Models.CapacityPoolQosType right) { throw null; } - public static implicit operator Azure.ResourceManager.NetApp.Models.CapacityPoolQosType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.NetApp.Models.CapacityPoolQosType left, Azure.ResourceManager.NetApp.Models.CapacityPoolQosType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.CacheLifeCycleState left, Azure.ResourceManager.NetApp.Models.CacheLifeCycleState right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.CacheLifeCycleState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.CacheLifeCycleState left, Azure.ResourceManager.NetApp.Models.CacheLifeCycleState right) { throw null; } public override string ToString() { throw null; } } - public partial class ClusterPeerCommandResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class CacheMountTargetProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal ClusterPeerCommandResult() { } - public string PeerAcceptCommand { get { throw null; } } + internal CacheMountTargetProperties() { } + public string IPAddress { get { throw null; } } + public string MountTargetId { get { throw null; } } + public string SmbServerFqdn { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.NetApp.Models.ClusterPeerCommandResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.NetApp.Models.ClusterPeerCommandResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.NetApp.Models.CacheMountTargetProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.CacheMountTargetProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct CoolAccessRetrievalPolicy : System.IEquatable + public partial class CachePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public CoolAccessRetrievalPolicy(string value) { throw null; } - public static Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy Default { get { throw null; } } - public static Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy Never { get { throw null; } } + public CachePatch() { } + public Azure.ResourceManager.NetApp.Models.CacheUpdateProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.CachePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.CachePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CacheProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CacheProperties(string filepath, long size, Azure.Core.ResourceIdentifier cacheSubnetResourceId, Azure.Core.ResourceIdentifier peeringSubnetResourceId, Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource encryptionKeySource, Azure.ResourceManager.NetApp.Models.OriginClusterInformation originClusterInformation) { } + public float? ActualThroughputMibps { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.CacheLifeCycleState? CacheState { get { throw null; } } + public Azure.Core.ResourceIdentifier CacheSubnetResourceId { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.CifsChangeNotifyState? CifsChangeNotifications { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.EncryptionState? Encryption { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.NetAppEncryptionKeySource EncryptionKeySource { get { throw null; } set { } } + public System.Collections.Generic.IList ExportPolicy { get { throw null; } } + public string Filepath { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.GlobalFileLockingState? GlobalFileLocking { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.KerberosState? Kerberos { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier KeyVaultPrivateEndpointResourceId { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage? Language { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.LdapState? Ldap { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.LdapServerType? LdapServerType { get { throw null; } set { } } + public long? MaximumNumberOfFiles { get { throw null; } } + public System.Collections.Generic.IReadOnlyList MountTargets { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.OriginClusterInformation OriginClusterInformation { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier PeeringSubnetResourceId { get { throw null; } set { } } + public System.Collections.Generic.IList ProtocolTypes { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.CacheProvisioningState? ProvisioningState { get { throw null; } } + public long Size { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.SmbSettings SmbSettings { get { throw null; } set { } } + public float? ThroughputMibps { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.EnableWriteBackState? WriteBack { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.CacheProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.CacheProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CacheProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CacheProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.CacheProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.CacheProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.CacheProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.CacheProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.CacheProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.CacheProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.CacheProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.CacheProvisioningState left, Azure.ResourceManager.NetApp.Models.CacheProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.CacheProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.CacheProvisioningState left, Azure.ResourceManager.NetApp.Models.CacheProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CacheUpdateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CacheUpdateProperties() { } + public Azure.ResourceManager.NetApp.Models.CifsChangeNotifyState? CifsChangeNotifications { get { throw null; } set { } } + public System.Collections.Generic.IList ExportPolicy { get { throw null; } } + public Azure.Core.ResourceIdentifier KeyVaultPrivateEndpointResourceId { get { throw null; } set { } } + public System.Collections.Generic.IList ProtocolTypes { get { throw null; } } + public long? Size { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.SmbSettings SmbSettings { get { throw null; } set { } } + public float? ThroughputMibps { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.EnableWriteBackState? WriteBack { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.CacheUpdateProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.CacheUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CapacityPoolEncryptionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CapacityPoolEncryptionType(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType Double { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType Single { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType left, Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType left, Azure.ResourceManager.NetApp.Models.CapacityPoolEncryptionType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CapacityPoolPatch : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CapacityPoolPatch(Azure.Core.AzureLocation location) { } + public float? CustomThroughputMibps { get { throw null; } set { } } + public int? CustomThroughputMibpsInt { get { throw null; } set { } } + public bool? IsCoolAccessEnabled { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.CapacityPoolQosType? QosType { get { throw null; } set { } } + public long? Size { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.CapacityPoolPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.CapacityPoolPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CapacityPoolQosType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CapacityPoolQosType(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.CapacityPoolQosType Auto { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.CapacityPoolQosType Manual { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.CapacityPoolQosType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.CapacityPoolQosType left, Azure.ResourceManager.NetApp.Models.CapacityPoolQosType right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.CapacityPoolQosType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.CapacityPoolQosType left, Azure.ResourceManager.NetApp.Models.CapacityPoolQosType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ChangeZoneContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ChangeZoneContent(string newZone) { } + public string NewZone { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ChangeZoneContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ChangeZoneContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CheckElasticResourceAvailabilityReason : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CheckElasticResourceAvailabilityReason(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityReason AlreadyExists { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityReason Invalid { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityReason other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityReason left, Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityReason right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityReason (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityReason left, Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityReason right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CheckElasticResourceAvailabilityResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CheckElasticResourceAvailabilityResult() { } + public Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityStatus? IsAvailable { get { throw null; } } + public string Message { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityReason? Reason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CheckElasticResourceAvailabilityStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CheckElasticResourceAvailabilityStatus(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityStatus False { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityStatus True { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityStatus left, Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityStatus left, Azure.ResourceManager.NetApp.Models.CheckElasticResourceAvailabilityStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CheckElasticVolumeFilePathAvailabilityContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CheckElasticVolumeFilePathAvailabilityContent(string filePath) { } + public string FilePath { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.CheckElasticVolumeFilePathAvailabilityContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.CheckElasticVolumeFilePathAvailabilityContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CifsChangeNotifyState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CifsChangeNotifyState(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.CifsChangeNotifyState Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.CifsChangeNotifyState Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.CifsChangeNotifyState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.CifsChangeNotifyState left, Azure.ResourceManager.NetApp.Models.CifsChangeNotifyState right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.CifsChangeNotifyState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.CifsChangeNotifyState left, Azure.ResourceManager.NetApp.Models.CifsChangeNotifyState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ClusterPeerCommandResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ClusterPeerCommandResult() { } + public string PeerAcceptCommand { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ClusterPeerCommandResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ClusterPeerCommandResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CoolAccessRetrievalPolicy : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CoolAccessRetrievalPolicy(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy Default { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy Never { get { throw null; } } public static Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy OnRead { get { throw null; } } public bool Equals(Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -1288,63 +2370,964 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct EnableNetAppSubvolume : System.IEquatable + public readonly partial struct DayOfWeek : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DayOfWeek(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.DayOfWeek Friday { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.DayOfWeek Monday { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.DayOfWeek Saturday { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.DayOfWeek Sunday { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.DayOfWeek Thursday { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.DayOfWeek Tuesday { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.DayOfWeek Wednesday { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.DayOfWeek other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.DayOfWeek left, Azure.ResourceManager.NetApp.Models.DayOfWeek right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.DayOfWeek (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.DayOfWeek left, Azure.ResourceManager.NetApp.Models.DayOfWeek right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DesiredRansomwareProtectionState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DesiredRansomwareProtectionState(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.DesiredRansomwareProtectionState Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.DesiredRansomwareProtectionState Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.DesiredRansomwareProtectionState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.DesiredRansomwareProtectionState left, Azure.ResourceManager.NetApp.Models.DesiredRansomwareProtectionState right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.DesiredRansomwareProtectionState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.DesiredRansomwareProtectionState left, Azure.ResourceManager.NetApp.Models.DesiredRansomwareProtectionState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ElasticAccountPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticAccountPatch() { } + public Azure.ResourceManager.NetApp.Models.ElasticEncryption ElasticAccountUpdateEncryption { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.AzureResourceManagerCommonTypesManagedServiceIdentityUpdate Identity { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticAccountPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticAccountPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticAccountProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticAccountProperties() { } + public Azure.ResourceManager.NetApp.Models.ElasticEncryption Encryption { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticAccountProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticAccountProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticBackupPatch : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticBackupPatch() { } + public string ElasticBackupPropertiesUpdateLabel { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticBackupPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticBackupPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticBackupPolicyPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticBackupPolicyPatch() { } + public Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyUpdateProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticBackupPolicyProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticBackupPolicyProperties() { } + public int? AssignedVolumesCount { get { throw null; } } + public int? DailyBackupsToKeep { get { throw null; } set { } } + public int? MonthlyBackupsToKeep { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyState? PolicyState { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? ProvisioningState { get { throw null; } } + public int? WeeklyBackupsToKeep { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ElasticBackupPolicyState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ElasticBackupPolicyState(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyState Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyState Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyState left, Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyState right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyState left, Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ElasticBackupPolicyUpdateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticBackupPolicyUpdateProperties() { } + public int? DailyBackupsToKeep { get { throw null; } set { } } + public int? MonthlyBackupsToKeep { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyState? PolicyState { get { throw null; } set { } } + public int? WeeklyBackupsToKeep { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyUpdateProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticBackupPolicyUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticBackupProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticBackupProperties(Azure.Core.ResourceIdentifier elasticVolumeResourceId) { } + public Azure.ResourceManager.NetApp.Models.ElasticBackupType? BackupType { get { throw null; } } + public System.DateTimeOffset? CompletionOn { get { throw null; } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public Azure.Core.ResourceIdentifier ElasticBackupPolicyResourceId { get { throw null; } } + public Azure.Core.ResourceIdentifier ElasticSnapshotResourceId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ElasticVolumeResourceId { get { throw null; } set { } } + public string FailureReason { get { throw null; } } + public string Label { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? ProvisioningState { get { throw null; } } + public long? Size { get { throw null; } } + public System.DateTimeOffset? SnapshotCreationOn { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.SnapshotUsage? SnapshotUsage { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.VolumeSize? VolumeSize { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticBackupProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticBackupProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ElasticBackupType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ElasticBackupType(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticBackupType Manual { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticBackupType Scheduled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ElasticBackupType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ElasticBackupType left, Azure.ResourceManager.NetApp.Models.ElasticBackupType right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ElasticBackupType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ElasticBackupType left, Azure.ResourceManager.NetApp.Models.ElasticBackupType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ElasticBackupVaultPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticBackupVaultPatch() { } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticBackupVaultPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticBackupVaultPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticCapacityPoolPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticCapacityPoolPatch() { } + public Azure.ResourceManager.NetApp.Models.ElasticCapacityPoolUpdateProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticCapacityPoolPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticCapacityPoolPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticCapacityPoolProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticCapacityPoolProperties(long size, Azure.ResourceManager.NetApp.Models.ElasticServiceLevel serviceLevel, Azure.Core.ResourceIdentifier subnetResourceId) { } + public Azure.Core.ResourceIdentifier ActiveDirectoryConfigResourceId { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticResourceAvailabilityStatus? AvailabilityStatus { get { throw null; } } + public string CurrentZone { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.ElasticEncryptionConfiguration Encryption { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.ElasticServiceLevel ServiceLevel { get { throw null; } set { } } + public long Size { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SubnetResourceId { get { throw null; } set { } } + public double? TotalThroughputMibps { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticCapacityPoolProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticCapacityPoolProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticCapacityPoolUpdateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticCapacityPoolUpdateProperties() { } + public Azure.Core.ResourceIdentifier ActiveDirectoryConfigResourceId { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticEncryptionConfigurationUpdate Encryption { get { throw null; } set { } } + public long? Size { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticCapacityPoolUpdateProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticCapacityPoolUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticEncryption : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticEncryption() { } + public Azure.ResourceManager.NetApp.Models.ElasticEncryptionIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppKeySource? KeySource { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticKeyVaultProperties KeyVaultProperties { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticEncryption System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticEncryption System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticEncryptionConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticEncryptionConfiguration(Azure.ResourceManager.NetApp.Models.ElasticPoolEncryptionKeySource elasticPoolEncryptionKeySource, Azure.Core.ResourceIdentifier keyVaultPrivateEndpointResourceId) { } + public Azure.ResourceManager.NetApp.Models.ElasticPoolEncryptionKeySource ElasticPoolEncryptionKeySource { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier KeyVaultPrivateEndpointResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticEncryptionConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticEncryptionConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticEncryptionConfigurationUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticEncryptionConfigurationUpdate() { } + public Azure.ResourceManager.NetApp.Models.ElasticPoolEncryptionKeySource? ElasticPoolEncryptionKeySource { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier KeyVaultPrivateEndpointResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticEncryptionConfigurationUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticEncryptionConfigurationUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticEncryptionIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticEncryptionIdentity() { } + public string PrincipalId { get { throw null; } } + public Azure.Core.ResourceIdentifier UserAssignedIdentity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticEncryptionIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticEncryptionIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticExportPolicyRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticExportPolicyRule() { } + public System.Collections.Generic.IList AllowedClients { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.ElasticNfsv3Access? Nfsv3 { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticNfsv4Access? Nfsv4 { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticRootAccess? RootAccess { get { throw null; } set { } } + public int? RuleIndex { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticUnixAccessRule? UnixAccessRule { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticExportPolicyRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticExportPolicyRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticKeyVaultProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticKeyVaultProperties() { } + public string KeyName { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier KeyVaultResourceId { get { throw null; } set { } } + public System.Uri KeyVaultUri { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticKeyVaultStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticKeyVaultProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticKeyVaultProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ElasticKeyVaultStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ElasticKeyVaultStatus(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticKeyVaultStatus Created { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticKeyVaultStatus Deleted { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticKeyVaultStatus Error { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticKeyVaultStatus InUse { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticKeyVaultStatus Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ElasticKeyVaultStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ElasticKeyVaultStatus left, Azure.ResourceManager.NetApp.Models.ElasticKeyVaultStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ElasticKeyVaultStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ElasticKeyVaultStatus left, Azure.ResourceManager.NetApp.Models.ElasticKeyVaultStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ElasticMountTargetProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ElasticMountTargetProperties() { } + public string IPAddress { get { throw null; } } + public string SmbServerFqdn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticMountTargetProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticMountTargetProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ElasticNfsv3Access : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ElasticNfsv3Access(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticNfsv3Access Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticNfsv3Access Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ElasticNfsv3Access other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ElasticNfsv3Access left, Azure.ResourceManager.NetApp.Models.ElasticNfsv3Access right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ElasticNfsv3Access (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ElasticNfsv3Access left, Azure.ResourceManager.NetApp.Models.ElasticNfsv3Access right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ElasticNfsv4Access : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ElasticNfsv4Access(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticNfsv4Access Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticNfsv4Access Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ElasticNfsv4Access other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ElasticNfsv4Access left, Azure.ResourceManager.NetApp.Models.ElasticNfsv4Access right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ElasticNfsv4Access (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ElasticNfsv4Access left, Azure.ResourceManager.NetApp.Models.ElasticNfsv4Access right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ElasticPoolEncryptionKeySource : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ElasticPoolEncryptionKeySource(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticPoolEncryptionKeySource KeyVault { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticPoolEncryptionKeySource NetApp { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ElasticPoolEncryptionKeySource other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ElasticPoolEncryptionKeySource left, Azure.ResourceManager.NetApp.Models.ElasticPoolEncryptionKeySource right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ElasticPoolEncryptionKeySource (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ElasticPoolEncryptionKeySource left, Azure.ResourceManager.NetApp.Models.ElasticPoolEncryptionKeySource right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ElasticProtocolType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ElasticProtocolType(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticProtocolType NFSv3 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticProtocolType NFSv4 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticProtocolType SMB { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ElasticProtocolType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ElasticProtocolType left, Azure.ResourceManager.NetApp.Models.ElasticProtocolType right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ElasticProtocolType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ElasticProtocolType left, Azure.ResourceManager.NetApp.Models.ElasticProtocolType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ElasticResourceAvailabilityStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ElasticResourceAvailabilityStatus(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticResourceAvailabilityStatus Offline { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticResourceAvailabilityStatus Online { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ElasticResourceAvailabilityStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ElasticResourceAvailabilityStatus left, Azure.ResourceManager.NetApp.Models.ElasticResourceAvailabilityStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ElasticResourceAvailabilityStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ElasticResourceAvailabilityStatus left, Azure.ResourceManager.NetApp.Models.ElasticResourceAvailabilityStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ElasticRootAccess : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ElasticRootAccess(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticRootAccess Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticRootAccess Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ElasticRootAccess other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ElasticRootAccess left, Azure.ResourceManager.NetApp.Models.ElasticRootAccess right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ElasticRootAccess (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ElasticRootAccess left, Azure.ResourceManager.NetApp.Models.ElasticRootAccess right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ElasticServiceLevel : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ElasticServiceLevel(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticServiceLevel ZoneRedundant { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ElasticServiceLevel other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ElasticServiceLevel left, Azure.ResourceManager.NetApp.Models.ElasticServiceLevel right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ElasticServiceLevel (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ElasticServiceLevel left, Azure.ResourceManager.NetApp.Models.ElasticServiceLevel right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ElasticSmbEncryption : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ElasticSmbEncryption(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticSmbEncryption Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticSmbEncryption Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ElasticSmbEncryption other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ElasticSmbEncryption left, Azure.ResourceManager.NetApp.Models.ElasticSmbEncryption right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ElasticSmbEncryption (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ElasticSmbEncryption left, Azure.ResourceManager.NetApp.Models.ElasticSmbEncryption right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ElasticSnapshotPolicyDailySchedule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticSnapshotPolicyDailySchedule() { } + public int? Hour { get { throw null; } set { } } + public int? Minute { get { throw null; } set { } } + public int? SnapshotsToKeep { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyDailySchedule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyDailySchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticSnapshotPolicyHourlySchedule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticSnapshotPolicyHourlySchedule() { } + public int? Minute { get { throw null; } set { } } + public int? SnapshotsToKeep { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyHourlySchedule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyHourlySchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticSnapshotPolicyMonthlySchedule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticSnapshotPolicyMonthlySchedule() { } + public System.Collections.Generic.IList DaysOfMonth { get { throw null; } } + public int? Hour { get { throw null; } set { } } + public int? Minute { get { throw null; } set { } } + public int? SnapshotsToKeep { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyMonthlySchedule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyMonthlySchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticSnapshotPolicyPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticSnapshotPolicyPatch() { } + public Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyUpdateProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticSnapshotPolicyProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticSnapshotPolicyProperties() { } + public Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyDailySchedule DailySchedule { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyHourlySchedule HourlySchedule { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyMonthlySchedule MonthlySchedule { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.PolicyStatus? PolicyStatus { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyWeeklySchedule WeeklySchedule { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticSnapshotPolicyUpdateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticSnapshotPolicyUpdateProperties() { } + public Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyDailySchedule DailySchedule { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyHourlySchedule HourlySchedule { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyMonthlySchedule MonthlySchedule { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.PolicyStatus? PolicyStatus { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyWeeklySchedule WeeklySchedule { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyUpdateProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticSnapshotPolicyWeeklySchedule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticSnapshotPolicyWeeklySchedule() { } + public System.Collections.Generic.IList Days { get { throw null; } } + public int? Hour { get { throw null; } set { } } + public int? Minute { get { throw null; } set { } } + public int? SnapshotsToKeep { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyWeeklySchedule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticSnapshotPolicyWeeklySchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ElasticUnixAccessRule : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ElasticUnixAccessRule(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticUnixAccessRule NoAccess { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticUnixAccessRule ReadOnly { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticUnixAccessRule ReadWrite { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ElasticUnixAccessRule other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ElasticUnixAccessRule left, Azure.ResourceManager.NetApp.Models.ElasticUnixAccessRule right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ElasticUnixAccessRule (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ElasticUnixAccessRule left, Azure.ResourceManager.NetApp.Models.ElasticUnixAccessRule right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ElasticVolumeBackupProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticVolumeBackupProperties() { } + public Azure.Core.ResourceIdentifier ElasticBackupPolicyResourceId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ElasticBackupVaultResourceId { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticVolumePolicyEnforcement? PolicyEnforcement { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticVolumeBackupProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticVolumeBackupProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticVolumeDataProtectionPatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticVolumeDataProtectionPatchProperties() { } + public Azure.ResourceManager.NetApp.Models.ElasticVolumeBackupProperties Backup { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SnapshotPolicyResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticVolumeDataProtectionPatchProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticVolumeDataProtectionPatchProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticVolumeDataProtectionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticVolumeDataProtectionProperties() { } + public Azure.ResourceManager.NetApp.Models.ElasticVolumeBackupProperties Backup { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SnapshotPolicyResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticVolumeDataProtectionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticVolumeDataProtectionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticVolumePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticVolumePatch() { } + public Azure.ResourceManager.NetApp.Models.ElasticVolumeUpdateProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticVolumePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticVolumePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ElasticVolumePolicyEnforcement : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ElasticVolumePolicyEnforcement(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticVolumePolicyEnforcement Enforced { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticVolumePolicyEnforcement NotEnforced { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ElasticVolumePolicyEnforcement other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ElasticVolumePolicyEnforcement left, Azure.ResourceManager.NetApp.Models.ElasticVolumePolicyEnforcement right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ElasticVolumePolicyEnforcement (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ElasticVolumePolicyEnforcement left, Azure.ResourceManager.NetApp.Models.ElasticVolumePolicyEnforcement right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ElasticVolumeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticVolumeProperties(string filePath, long size, System.Collections.Generic.IEnumerable protocolTypes) { } + public Azure.ResourceManager.NetApp.Models.ElasticResourceAvailabilityStatus? AvailabilityStatus { get { throw null; } } + public Azure.Core.ResourceIdentifier BackupResourceId { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticVolumeDataProtectionProperties DataProtection { get { throw null; } set { } } + public System.Collections.Generic.IList ExportRules { get { throw null; } } + public string FilePath { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList MountTargets { get { throw null; } } + public System.Collections.Generic.IList ProtocolTypes { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.ElasticVolumeRestorationState? RestorationState { get { throw null; } } + public long Size { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticSmbEncryption? SmbEncryption { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.SnapshotDirectoryVisibility? SnapshotDirectoryVisibility { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SnapshotResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticVolumeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticVolumeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ElasticVolumeRestorationState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ElasticVolumeRestorationState(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ElasticVolumeRestorationState Failed { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticVolumeRestorationState Restored { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ElasticVolumeRestorationState Restoring { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ElasticVolumeRestorationState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ElasticVolumeRestorationState left, Azure.ResourceManager.NetApp.Models.ElasticVolumeRestorationState right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ElasticVolumeRestorationState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ElasticVolumeRestorationState left, Azure.ResourceManager.NetApp.Models.ElasticVolumeRestorationState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ElasticVolumeRevert : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticVolumeRevert() { } + public Azure.Core.ResourceIdentifier SnapshotResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticVolumeRevert System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticVolumeRevert System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ElasticVolumeUpdateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ElasticVolumeUpdateProperties() { } + public Azure.ResourceManager.NetApp.Models.ElasticVolumeDataProtectionPatchProperties DataProtection { get { throw null; } set { } } + public System.Collections.Generic.IList ExportRules { get { throw null; } } + public long? Size { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.ElasticSmbEncryption? SmbEncryption { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.SnapshotDirectoryVisibility? SnapshotDirectoryVisibility { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticVolumeUpdateProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.ElasticVolumeUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EnableNetAppSubvolume : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EnableNetAppSubvolume(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume left, Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume left, Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EnableWriteBackState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EnableWriteBackState(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.EnableWriteBackState Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.EnableWriteBackState Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.EnableWriteBackState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.EnableWriteBackState left, Azure.ResourceManager.NetApp.Models.EnableWriteBackState right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.EnableWriteBackState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.EnableWriteBackState left, Azure.ResourceManager.NetApp.Models.EnableWriteBackState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EncryptionState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EncryptionState(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.EncryptionState Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.EncryptionState Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.EncryptionState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.EncryptionState left, Azure.ResourceManager.NetApp.Models.EncryptionState right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.EncryptionState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.EncryptionState left, Azure.ResourceManager.NetApp.Models.EncryptionState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ExcludeReplicationsFilter : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ExcludeReplicationsFilter(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter Deleted { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter None { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter left, Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter left, Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ExternalReplicationSetupStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ExternalReplicationSetupStatus(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ExternalReplicationSetupStatus ClusterPeerPending { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ExternalReplicationSetupStatus ClusterPeerRequired { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ExternalReplicationSetupStatus NoActionRequired { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ExternalReplicationSetupStatus ReplicationCreateRequired { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ExternalReplicationSetupStatus VServerPeerRequired { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ExternalReplicationSetupStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ExternalReplicationSetupStatus left, Azure.ResourceManager.NetApp.Models.ExternalReplicationSetupStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ExternalReplicationSetupStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ExternalReplicationSetupStatus left, Azure.ResourceManager.NetApp.Models.ExternalReplicationSetupStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class GetGroupIdListForLdapUserContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GetGroupIdListForLdapUserContent(string username) { } + public string Username { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.GetGroupIdListForLdapUserContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.GetGroupIdListForLdapUserContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class GetGroupIdListForLdapUserResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal GetGroupIdListForLdapUserResult() { } + public System.Collections.Generic.IReadOnlyList GroupIdsForLdapUser { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.GetGroupIdListForLdapUserResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.GetGroupIdListForLdapUserResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct GlobalFileLockingState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public GlobalFileLockingState(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.GlobalFileLockingState Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.GlobalFileLockingState Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.GlobalFileLockingState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.GlobalFileLockingState left, Azure.ResourceManager.NetApp.Models.GlobalFileLockingState right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.GlobalFileLockingState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.GlobalFileLockingState left, Azure.ResourceManager.NetApp.Models.GlobalFileLockingState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct KerberosState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public KerberosState(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.KerberosState Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.KerberosState Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.KerberosState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.KerberosState left, Azure.ResourceManager.NetApp.Models.KerberosState right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.KerberosState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.KerberosState left, Azure.ResourceManager.NetApp.Models.KerberosState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct LargeVolumeType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public LargeVolumeType(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.LargeVolumeType ExtraLargeVolume7Dot2PiB { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.LargeVolumeType LargeVolume { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.LargeVolumeType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.LargeVolumeType left, Azure.ResourceManager.NetApp.Models.LargeVolumeType right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.LargeVolumeType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.LargeVolumeType left, Azure.ResourceManager.NetApp.Models.LargeVolumeType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class LdapConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public LdapConfiguration() { } + public string CertificateCNHost { get { throw null; } set { } } + public string Domain { get { throw null; } set { } } + public bool? LdapOverTls { get { throw null; } set { } } + public System.Collections.Generic.IList LdapServers { get { throw null; } } + public string ServerCACertificate { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.LdapConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.LdapConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct LdapServerType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public EnableNetAppSubvolume(string value) { throw null; } - public static Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume Disabled { get { throw null; } } - public static Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume Enabled { get { throw null; } } - public bool Equals(Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume other) { throw null; } + public LdapServerType(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.LdapServerType ActiveDirectory { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.LdapServerType OpenLdap { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.LdapServerType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume left, Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume right) { throw null; } - public static implicit operator Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume left, Azure.ResourceManager.NetApp.Models.EnableNetAppSubvolume right) { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.LdapServerType left, Azure.ResourceManager.NetApp.Models.LdapServerType right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.LdapServerType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.LdapServerType left, Azure.ResourceManager.NetApp.Models.LdapServerType right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ExcludeReplicationsFilter : System.IEquatable + public readonly partial struct LdapState : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ExcludeReplicationsFilter(string value) { throw null; } - public static Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter Deleted { get { throw null; } } - public static Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter None { get { throw null; } } - public bool Equals(Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter other) { throw null; } + public LdapState(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.LdapState Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.LdapState Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.LdapState other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter left, Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter right) { throw null; } - public static implicit operator Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter left, Azure.ResourceManager.NetApp.Models.ExcludeReplicationsFilter right) { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.LdapState left, Azure.ResourceManager.NetApp.Models.LdapState right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.LdapState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.LdapState left, Azure.ResourceManager.NetApp.Models.LdapState right) { throw null; } public override string ToString() { throw null; } } - public partial class GetGroupIdListForLdapUserContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public GetGroupIdListForLdapUserContent(string username) { } - public string Username { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.NetApp.Models.GetGroupIdListForLdapUserContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.NetApp.Models.GetGroupIdListForLdapUserContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class GetGroupIdListForLdapUserResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal GetGroupIdListForLdapUserResult() { } - public System.Collections.Generic.IReadOnlyList GroupIdsForLdapUser { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.NetApp.Models.GetGroupIdListForLdapUserResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.NetApp.Models.GetGroupIdListForLdapUserResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class ListReplicationsContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ListReplicationsContent() { } @@ -1357,6 +3340,26 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ManagedServiceIdentityType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ManagedServiceIdentityType(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ManagedServiceIdentityType None { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ManagedServiceIdentityType SystemAssigned { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ManagedServiceIdentityType SystemAssignedUserAssigned { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ManagedServiceIdentityType UserAssigned { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ManagedServiceIdentityType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ManagedServiceIdentityType left, Azure.ResourceManager.NetApp.Models.ManagedServiceIdentityType right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ManagedServiceIdentityType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ManagedServiceIdentityType left, Azure.ResourceManager.NetApp.Models.ManagedServiceIdentityType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct MultiAdStatus : System.IEquatable { private readonly object _dummy; @@ -1448,6 +3451,7 @@ public NetAppAccountPatch(Azure.Core.AzureLocation location) { } public bool? DisableShowmount { get { throw null; } } public Azure.ResourceManager.NetApp.Models.NetAppAccountEncryption Encryption { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.LdapConfiguration LdapConfiguration { get { throw null; } set { } } public Azure.ResourceManager.NetApp.Models.MultiAdStatus? MultiAdStatus { get { throw null; } } public string NfsV4IdDomain { get { throw null; } set { } } public string ProvisioningState { get { throw null; } } @@ -1553,6 +3557,151 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class NetAppBucketCredentialsExpiry : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NetAppBucketCredentialsExpiry() { } + public int? KeyPairExpiryDays { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialsExpiry System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialsExpiry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NetAppBucketCredentialStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NetAppBucketCredentialStatus(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialStatus Active { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialStatus CredentialsExpired { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialStatus NoCredentialsSet { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialStatus left, Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialStatus left, Azure.ResourceManager.NetApp.Models.NetAppBucketCredentialStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class NetAppBucketFileSystemUser : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NetAppBucketFileSystemUser() { } + public string CifsUserUsername { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppBucketNfsUser NfsUser { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppBucketFileSystemUser System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppBucketFileSystemUser System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NetAppBucketGenerateCredentials : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NetAppBucketGenerateCredentials() { } + public string AccessKey { get { throw null; } } + public System.DateTimeOffset? KeyPairExpiry { get { throw null; } } + public string SecretKey { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppBucketGenerateCredentials System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppBucketGenerateCredentials System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NetAppBucketNfsUser : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NetAppBucketNfsUser() { } + public long? GroupId { get { throw null; } set { } } + public long? UserId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppBucketNfsUser System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppBucketNfsUser System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NetAppBucketPatch : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NetAppBucketPatch() { } + public Azure.ResourceManager.NetApp.Models.NetAppBucketFileSystemUser FileSystemUser { get { throw null; } set { } } + public string Path { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppBucketPatchPermission? Permissions { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.NetAppBucketServerPatchProperties Server { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppBucketPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppBucketPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NetAppBucketPatchPermission : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NetAppBucketPatchPermission(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.NetAppBucketPatchPermission ReadOnly { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppBucketPatchPermission ReadWrite { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.NetAppBucketPatchPermission other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.NetAppBucketPatchPermission left, Azure.ResourceManager.NetApp.Models.NetAppBucketPatchPermission right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.NetAppBucketPatchPermission (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.NetAppBucketPatchPermission left, Azure.ResourceManager.NetApp.Models.NetAppBucketPatchPermission right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NetAppBucketPermission : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NetAppBucketPermission(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.NetAppBucketPermission ReadOnly { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppBucketPermission ReadWrite { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.NetAppBucketPermission other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.NetAppBucketPermission left, Azure.ResourceManager.NetApp.Models.NetAppBucketPermission right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.NetAppBucketPermission (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.NetAppBucketPermission left, Azure.ResourceManager.NetApp.Models.NetAppBucketPermission right) { throw null; } + public override string ToString() { throw null; } + } + public partial class NetAppBucketServerPatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NetAppBucketServerPatchProperties() { } + public string CertificateObject { get { throw null; } set { } } + public string Fqdn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppBucketServerPatchProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppBucketServerPatchProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NetAppBucketServerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NetAppBucketServerProperties() { } + public string CertificateCommonName { get { throw null; } } + public System.DateTimeOffset? CertificateExpiryOn { get { throw null; } } + public string CertificateObject { get { throw null; } set { } } + public string Fqdn { get { throw null; } set { } } + public string IPAddress { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppBucketServerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppBucketServerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class NetAppChangeKeyVault : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NetAppChangeKeyVault(System.Uri keyVaultUri, string keyName, System.Collections.Generic.IEnumerable keyVaultPrivateEndpoints) { } @@ -2001,6 +4150,10 @@ public NetAppReplicationObject() { } public NetAppReplicationObject(Azure.Core.ResourceIdentifier remoteVolumeResourceId) { } public System.Collections.Generic.IReadOnlyList DestinationReplications { get { throw null; } } public Azure.ResourceManager.NetApp.Models.NetAppEndpointType? EndpointType { get { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] set { } } + public string ExternalReplicationSetupInfo { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.ExternalReplicationSetupStatus? ExternalReplicationSetupStatus { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.NetAppMirrorState? MirrorState { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.VolumeReplicationRelationshipStatus? RelationshipStatus { get { throw null; } } public Azure.ResourceManager.NetApp.Models.RemotePath RemotePath { get { throw null; } set { } } public string RemoteVolumeRegion { get { throw null; } set { } } public Azure.Core.ResourceIdentifier RemoteVolumeResourceId { get { throw null; } set { } } @@ -2276,6 +4429,7 @@ public partial class NetAppVolumeDataProtection : System.ClientModel.Primitives. { public NetAppVolumeDataProtection() { } public Azure.ResourceManager.NetApp.Models.NetAppVolumeBackupConfiguration Backup { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.RansomwareProtectionSettings RansomwareProtection { get { throw null; } set { } } public Azure.ResourceManager.NetApp.Models.NetAppReplicationObject Replication { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SnapshotPolicyId { get { throw null; } set { } } public Azure.ResourceManager.NetApp.Models.NetAppVolumeRelocationProperties VolumeRelocation { get { throw null; } set { } } @@ -2349,6 +4503,7 @@ public NetAppVolumeGroupVolume(string creationToken, long usageThreshold, Azure. public Azure.ResourceManager.NetApp.Models.NetAppAvsDataStore? AvsDataStore { get { throw null; } set { } } public string BackupId { get { throw null; } set { } } public string BaremetalTenantId { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.BreakthroughMode? BreakthroughMode { get { throw null; } set { } } public Azure.Core.ResourceIdentifier CapacityPoolResourceId { get { throw null; } set { } } public int? CloneProgress { get { throw null; } } public Azure.ResourceManager.NetApp.Models.CoolAccessRetrievalPolicy? CoolAccessRetrievalPolicy { get { throw null; } set { } } @@ -2379,6 +4534,9 @@ public NetAppVolumeGroupVolume(string creationToken, long usageThreshold, Azure. public bool? IsSmbEncryptionEnabled { get { throw null; } set { } } public bool? IsSnapshotDirectoryVisible { get { throw null; } set { } } public Azure.Core.ResourceIdentifier KeyVaultPrivateEndpointResourceId { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage? Language { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.LargeVolumeType? LargeVolumeType { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.LdapServerType? LdapServerType { get { throw null; } set { } } public long? MaximumNumberOfFiles { get { throw null; } } public System.Collections.Generic.IReadOnlyList MountTargets { get { throw null; } } public string Name { get { throw null; } set { } } @@ -2414,6 +4572,91 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NetAppVolumeLanguage : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NetAppVolumeLanguage(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Ar { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage ArUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage C { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Cs { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage CsUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage CUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Da { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage DaUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage De { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage DeUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage En { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage EnUs { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage EnUsUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage EnUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Es { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage EsUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Fi { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage FiUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Fr { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage FrUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage He { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage HeUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Hr { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage HrUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Hu { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage HuUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage It { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage ItUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Ja { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage JaJp932 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage JaJp932Utf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage JaJpPck { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage JaJpPckUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage JaJpPckV2 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage JaJpPckV2Utf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage JaUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage JaV1 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage JaV1Utf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Ko { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage KoUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Nl { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage NlUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage No { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage NoUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Pl { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage PlUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Pt { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage PtUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Ro { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage RoUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Ru { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage RuUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Sk { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage SkUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Sl { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage SlUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Sv { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage SvUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Tr { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage TrUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Utf8Mb4 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage Zh { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage ZhGbk { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage ZhGbkUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage ZhTw { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage ZhTwBig5 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage ZhTwBig5Utf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage ZhTwUtf8 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage ZhUtf8 { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage left, Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage left, Azure.ResourceManager.NetApp.Models.NetAppVolumeLanguage right) { throw null; } + public override string ToString() { throw null; } + } public partial class NetAppVolumeMountTarget : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal NetAppVolumeMountTarget() { } @@ -2461,6 +4704,7 @@ public partial class NetAppVolumePatchDataProtection : System.ClientModel.Primit { public NetAppVolumePatchDataProtection() { } public Azure.ResourceManager.NetApp.Models.NetAppVolumeBackupConfiguration Backup { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.DesiredRansomwareProtectionState? DesiredRansomwareProtectionState { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SnapshotPolicyId { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.NetApp.Models.NetAppVolumePatchDataProtection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2492,6 +4736,33 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class NetAppVolumeQuotaReport : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NetAppVolumeQuotaReport() { } + public bool? IsDerivedQuota { get { throw null; } } + public float? PercentageUsed { get { throw null; } } + public long? QuotaLimitTotalInKiBs { get { throw null; } } + public long? QuotaLimitUsedInKiBs { get { throw null; } } + public string QuotaTarget { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.NetAppVolumeQuotaType? QuotaType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppVolumeQuotaReport System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppVolumeQuotaReport System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NetAppVolumeQuotaReportListResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NetAppVolumeQuotaReportListResult() { } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppVolumeQuotaReportListResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.NetAppVolumeQuotaReportListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class NetAppVolumeQuotaRulePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NetAppVolumeQuotaRulePatch() { } @@ -2694,6 +4965,20 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class OriginClusterInformation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OriginClusterInformation(string peerClusterName, System.Collections.Generic.IEnumerable peerAddresses, string peerVserverName, string peerVolumeName) { } + public System.Collections.Generic.IList PeerAddresses { get { throw null; } } + public string PeerClusterName { get { throw null; } set { } } + public string PeerVolumeName { get { throw null; } set { } } + public string PeerVserverName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.OriginClusterInformation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.OriginClusterInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class PeerClusterForVolumeMigrationContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public PeerClusterForVolumeMigrationContent(System.Collections.Generic.IEnumerable peerIPAddresses) { } @@ -2705,6 +4990,56 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class PeeringPassphrases : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PeeringPassphrases() { } + public string ClusterPeeringCommand { get { throw null; } } + public string ClusterPeeringPassphrase { get { throw null; } } + public string VserverPeeringCommand { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.PeeringPassphrases System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.PeeringPassphrases System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PolicyStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PolicyStatus(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.PolicyStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.PolicyStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.PolicyStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.PolicyStatus left, Azure.ResourceManager.NetApp.Models.PolicyStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.PolicyStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.PolicyStatus left, Azure.ResourceManager.NetApp.Models.PolicyStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProtocolType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProtocolType(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.ProtocolType NFSv3 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ProtocolType NFSv4 { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.ProtocolType SMB { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.ProtocolType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.ProtocolType left, Azure.ResourceManager.NetApp.Models.ProtocolType right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.ProtocolType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.ProtocolType left, Azure.ResourceManager.NetApp.Models.ProtocolType right) { throw null; } + public override string ToString() { throw null; } + } public partial class QueryNetworkSiblingSetContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public QueryNetworkSiblingSetContent(string networkSiblingSetId, Azure.Core.ResourceIdentifier subnetId) { } @@ -2717,6 +5052,117 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class RansomwareProtectionSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RansomwareProtectionSettings() { } + public Azure.ResourceManager.NetApp.Models.ActualRansomwareProtectionState? ActualRansomwareProtectionState { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.DesiredRansomwareProtectionState? DesiredRansomwareProtectionState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.RansomwareProtectionSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.RansomwareProtectionSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RansomwareReportProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RansomwareReportProperties() { } + public int? ClearedCount { get { throw null; } } + public System.DateTimeOffset? EventOn { get { throw null; } } + public string ProvisioningState { get { throw null; } } + public int? ReportedCount { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.RansomwareReportSeverity? Severity { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.RansomwareReportState? State { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Suspects { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.RansomwareReportProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.RansomwareReportProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RansomwareReportSeverity : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RansomwareReportSeverity(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.RansomwareReportSeverity High { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.RansomwareReportSeverity Low { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.RansomwareReportSeverity Moderate { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.RansomwareReportSeverity None { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.RansomwareReportSeverity other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.RansomwareReportSeverity left, Azure.ResourceManager.NetApp.Models.RansomwareReportSeverity right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.RansomwareReportSeverity (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.RansomwareReportSeverity left, Azure.ResourceManager.NetApp.Models.RansomwareReportSeverity right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RansomwareReportState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RansomwareReportState(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.RansomwareReportState Active { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.RansomwareReportState Resolved { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.RansomwareReportState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.RansomwareReportState left, Azure.ResourceManager.NetApp.Models.RansomwareReportState right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.RansomwareReportState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.RansomwareReportState left, Azure.ResourceManager.NetApp.Models.RansomwareReportState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RansomwareSuspectResolution : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RansomwareSuspectResolution(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.RansomwareSuspectResolution FalsePositive { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.RansomwareSuspectResolution PotentialThreat { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.RansomwareSuspectResolution other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.RansomwareSuspectResolution left, Azure.ResourceManager.NetApp.Models.RansomwareSuspectResolution right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.RansomwareSuspectResolution (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.RansomwareSuspectResolution left, Azure.ResourceManager.NetApp.Models.RansomwareSuspectResolution right) { throw null; } + public override string ToString() { throw null; } + } + public partial class RansomwareSuspects : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RansomwareSuspects() { } + public string Extension { get { throw null; } } + public int? FileCount { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.RansomwareSuspectResolution? Resolution { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SuspectFiles { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.RansomwareSuspects System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.RansomwareSuspects System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RansomwareSuspectsClearContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RansomwareSuspectsClearContent(Azure.ResourceManager.NetApp.Models.RansomwareSuspectResolution resolution, System.Collections.Generic.IEnumerable extensions) { } + public System.Collections.Generic.IList Extensions { get { throw null; } } + public Azure.ResourceManager.NetApp.Models.RansomwareSuspectResolution Resolution { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.RansomwareSuspectsClearContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.RansomwareSuspectsClearContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct RegionStorageToNetworkProximity : System.IEquatable { @@ -2784,6 +5230,66 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.NetApp.Models.ReplicationMirrorState left, Azure.ResourceManager.NetApp.Models.ReplicationMirrorState right) { throw null; } public override string ToString() { throw null; } } + public partial class SecretPassword : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SecretPassword() { } + public Azure.ResourceManager.NetApp.Models.SecretPasswordIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.SecretPasswordKeyVaultProperties KeyVaultProperties { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.SecretPassword System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.SecretPassword System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SecretPasswordIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SecretPasswordIdentity() { } + public string PrincipalId { get { throw null; } } + public string UserAssignedIdentity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.SecretPasswordIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.SecretPasswordIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SecretPasswordKeyVaultProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SecretPasswordKeyVaultProperties(System.Uri keyVaultUri, string secretName) { } + public System.Uri KeyVaultUri { get { throw null; } set { } } + public string SecretName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.SecretPasswordKeyVaultProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.SecretPasswordKeyVaultProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SecretPasswordKeyVaultPropertiesUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SecretPasswordKeyVaultPropertiesUpdate() { } + public System.Uri KeyVaultUri { get { throw null; } set { } } + public string SecretName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.SecretPasswordKeyVaultPropertiesUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.SecretPasswordKeyVaultPropertiesUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SecretPasswordUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SecretPasswordUpdate() { } + public Azure.ResourceManager.NetApp.Models.SecretPasswordIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.SecretPasswordKeyVaultPropertiesUpdate KeyVaultProperties { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.SecretPasswordUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.SecretPasswordUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct SmbAccessBasedEnumeration : System.IEquatable { @@ -2803,6 +5309,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SmbEncryptionState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SmbEncryptionState(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.SmbEncryptionState Disabled { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.SmbEncryptionState Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.SmbEncryptionState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.SmbEncryptionState left, Azure.ResourceManager.NetApp.Models.SmbEncryptionState right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.SmbEncryptionState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.SmbEncryptionState left, Azure.ResourceManager.NetApp.Models.SmbEncryptionState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct SmbNonBrowsable : System.IEquatable { private readonly object _dummy; @@ -2820,6 +5344,37 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.NetApp.Models.SmbNonBrowsable left, Azure.ResourceManager.NetApp.Models.SmbNonBrowsable right) { throw null; } public override string ToString() { throw null; } } + public partial class SmbSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SmbSettings() { } + public Azure.ResourceManager.NetApp.Models.SmbAccessBasedEnumeration? SmbAccessBasedEnumerations { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.SmbEncryptionState? SmbEncryption { get { throw null; } set { } } + public Azure.ResourceManager.NetApp.Models.SmbNonBrowsable? SmbNonBrowsable { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.SmbSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.SmbSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SnapshotDirectoryVisibility : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SnapshotDirectoryVisibility(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.SnapshotDirectoryVisibility Hidden { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.SnapshotDirectoryVisibility Visible { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.SnapshotDirectoryVisibility other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.SnapshotDirectoryVisibility left, Azure.ResourceManager.NetApp.Models.SnapshotDirectoryVisibility right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.SnapshotDirectoryVisibility (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.SnapshotDirectoryVisibility left, Azure.ResourceManager.NetApp.Models.SnapshotDirectoryVisibility right) { throw null; } + public override string ToString() { throw null; } + } public partial class SnapshotPolicyDailySchedule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SnapshotPolicyDailySchedule() { } @@ -2893,6 +5448,36 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SnapshotUsage : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SnapshotUsage(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.SnapshotUsage CreateNewSnapshot { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.SnapshotUsage UseExistingSnapshot { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.SnapshotUsage other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.SnapshotUsage left, Azure.ResourceManager.NetApp.Models.SnapshotUsage right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.SnapshotUsage (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.SnapshotUsage left, Azure.ResourceManager.NetApp.Models.SnapshotUsage right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SuspectFile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SuspectFile() { } + public System.DateTimeOffset? FileTimestamp { get { throw null; } } + public string SuspectFileName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.SuspectFile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NetApp.Models.SuspectFile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class SvmPeerCommandResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal SvmPeerCommandResult() { } @@ -2976,4 +5561,22 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.NetApp.Models.VolumeRestoreRelationshipStatus left, Azure.ResourceManager.NetApp.Models.VolumeRestoreRelationshipStatus right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct VolumeSize : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public VolumeSize(string value) { throw null; } + public static Azure.ResourceManager.NetApp.Models.VolumeSize Large { get { throw null; } } + public static Azure.ResourceManager.NetApp.Models.VolumeSize Regular { get { throw null; } } + public bool Equals(Azure.ResourceManager.NetApp.Models.VolumeSize other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NetApp.Models.VolumeSize left, Azure.ResourceManager.NetApp.Models.VolumeSize right) { throw null; } + public static implicit operator Azure.ResourceManager.NetApp.Models.VolumeSize (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NetApp.Models.VolumeSize left, Azure.ResourceManager.NetApp.Models.VolumeSize right) { throw null; } + public override string ToString() { throw null; } + } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/assets.json b/sdk/netapp/Azure.ResourceManager.NetApp/assets.json index 9e9e0a5e86b4..872774b3c49c 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/assets.json +++ b/sdk/netapp/Azure.ResourceManager.NetApp/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/netapp/Azure.ResourceManager.NetApp", - "Tag": "net/netapp/Azure.ResourceManager.NetApp_09461a0154" + "Tag": "net/netapp/Azure.ResourceManager.NetApp_90c6601ea6" } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Custom/ArmNetAppModelFactory.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Custom/ArmNetAppModelFactory.cs index a06e24400f8f..0e9657b666fc 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Custom/ArmNetAppModelFactory.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Custom/ArmNetAppModelFactory.cs @@ -118,7 +118,7 @@ public static NetAppVolumePatch NetAppVolumePatch(ResourceIdentifier id, string exportRules, null, //protocolTypes throughputMibps, - snapshotPolicyId != null ? new NetAppVolumePatchDataProtection(null, new VolumeSnapshotProperties(snapshotPolicyId, serializedAdditionalRawData: null), serializedAdditionalRawData: null) : null, + snapshotPolicyId != null ? new NetAppVolumePatchDataProtection() { Snapshot = new VolumeSnapshotProperties() {SnapshotPolicyId = snapshotPolicyId } } : null, isDefaultQuotaEnabled, defaultUserQuotaInKiBs, defaultGroupQuotaInKiBs, diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ActiveDirectoryConfigCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ActiveDirectoryConfigCollection.cs new file mode 100644 index 000000000000..d7c1b8056bfa --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ActiveDirectoryConfigCollection.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetActiveDirectoryConfigs method from an instance of . + /// + public partial class ActiveDirectoryConfigCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _activeDirectoryConfigClientDiagnostics; + private readonly ActiveDirectoryConfigsRestOperations _activeDirectoryConfigRestClient; + + /// Initializes a new instance of the class for mocking. + protected ActiveDirectoryConfigCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ActiveDirectoryConfigCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _activeDirectoryConfigClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NetApp", ActiveDirectoryConfigResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ActiveDirectoryConfigResource.ResourceType, out string activeDirectoryConfigApiVersion); + _activeDirectoryConfigRestClient = new ActiveDirectoryConfigsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, activeDirectoryConfigApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Create or update the specified active directory configuration + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName} + /// + /// + /// Operation Id + /// ActiveDirectoryConfigs_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the ActiveDirectoryConfig. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string activeDirectoryConfigName, ActiveDirectoryConfigData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(activeDirectoryConfigName, nameof(activeDirectoryConfigName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _activeDirectoryConfigClientDiagnostics.CreateScope("ActiveDirectoryConfigCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _activeDirectoryConfigRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, activeDirectoryConfigName, data, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(new ActiveDirectoryConfigOperationSource(Client), _activeDirectoryConfigClientDiagnostics, Pipeline, _activeDirectoryConfigRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, activeDirectoryConfigName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update the specified active directory configuration + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName} + /// + /// + /// Operation Id + /// ActiveDirectoryConfigs_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the ActiveDirectoryConfig. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string activeDirectoryConfigName, ActiveDirectoryConfigData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(activeDirectoryConfigName, nameof(activeDirectoryConfigName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _activeDirectoryConfigClientDiagnostics.CreateScope("ActiveDirectoryConfigCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _activeDirectoryConfigRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, activeDirectoryConfigName, data, cancellationToken); + var operation = new NetAppArmOperation(new ActiveDirectoryConfigOperationSource(Client), _activeDirectoryConfigClientDiagnostics, Pipeline, _activeDirectoryConfigRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, activeDirectoryConfigName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the details of the specified active directory configuration + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName} + /// + /// + /// Operation Id + /// ActiveDirectoryConfigs_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ActiveDirectoryConfig. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string activeDirectoryConfigName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(activeDirectoryConfigName, nameof(activeDirectoryConfigName)); + + using var scope = _activeDirectoryConfigClientDiagnostics.CreateScope("ActiveDirectoryConfigCollection.Get"); + scope.Start(); + try + { + var response = await _activeDirectoryConfigRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, activeDirectoryConfigName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ActiveDirectoryConfigResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the details of the specified active directory configuration + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName} + /// + /// + /// Operation Id + /// ActiveDirectoryConfigs_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ActiveDirectoryConfig. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string activeDirectoryConfigName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(activeDirectoryConfigName, nameof(activeDirectoryConfigName)); + + using var scope = _activeDirectoryConfigClientDiagnostics.CreateScope("ActiveDirectoryConfigCollection.Get"); + scope.Start(); + try + { + var response = _activeDirectoryConfigRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, activeDirectoryConfigName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ActiveDirectoryConfigResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List all active directory configurations within the resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs + /// + /// + /// Operation Id + /// ActiveDirectoryConfigs_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _activeDirectoryConfigRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _activeDirectoryConfigRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ActiveDirectoryConfigResource(Client, ActiveDirectoryConfigData.DeserializeActiveDirectoryConfigData(e)), _activeDirectoryConfigClientDiagnostics, Pipeline, "ActiveDirectoryConfigCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List all active directory configurations within the resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs + /// + /// + /// Operation Id + /// ActiveDirectoryConfigs_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _activeDirectoryConfigRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _activeDirectoryConfigRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ActiveDirectoryConfigResource(Client, ActiveDirectoryConfigData.DeserializeActiveDirectoryConfigData(e)), _activeDirectoryConfigClientDiagnostics, Pipeline, "ActiveDirectoryConfigCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName} + /// + /// + /// Operation Id + /// ActiveDirectoryConfigs_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ActiveDirectoryConfig. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string activeDirectoryConfigName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(activeDirectoryConfigName, nameof(activeDirectoryConfigName)); + + using var scope = _activeDirectoryConfigClientDiagnostics.CreateScope("ActiveDirectoryConfigCollection.Exists"); + scope.Start(); + try + { + var response = await _activeDirectoryConfigRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, activeDirectoryConfigName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName} + /// + /// + /// Operation Id + /// ActiveDirectoryConfigs_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ActiveDirectoryConfig. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string activeDirectoryConfigName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(activeDirectoryConfigName, nameof(activeDirectoryConfigName)); + + using var scope = _activeDirectoryConfigClientDiagnostics.CreateScope("ActiveDirectoryConfigCollection.Exists"); + scope.Start(); + try + { + var response = _activeDirectoryConfigRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, activeDirectoryConfigName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName} + /// + /// + /// Operation Id + /// ActiveDirectoryConfigs_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ActiveDirectoryConfig. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string activeDirectoryConfigName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(activeDirectoryConfigName, nameof(activeDirectoryConfigName)); + + using var scope = _activeDirectoryConfigClientDiagnostics.CreateScope("ActiveDirectoryConfigCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _activeDirectoryConfigRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, activeDirectoryConfigName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ActiveDirectoryConfigResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName} + /// + /// + /// Operation Id + /// ActiveDirectoryConfigs_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ActiveDirectoryConfig. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string activeDirectoryConfigName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(activeDirectoryConfigName, nameof(activeDirectoryConfigName)); + + using var scope = _activeDirectoryConfigClientDiagnostics.CreateScope("ActiveDirectoryConfigCollection.GetIfExists"); + scope.Start(); + try + { + var response = _activeDirectoryConfigRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, activeDirectoryConfigName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ActiveDirectoryConfigResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ActiveDirectoryConfigData.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ActiveDirectoryConfigData.Serialization.cs new file mode 100644 index 000000000000..6a3a62a3d551 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ActiveDirectoryConfigData.Serialization.cs @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + public partial class ActiveDirectoryConfigData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ActiveDirectoryConfigData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("etag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + ((IJsonModel)Identity).Write(writer, ModelSerializationExtensions.WireV3Options); + } + } + + ActiveDirectoryConfigData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ActiveDirectoryConfigData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeActiveDirectoryConfigData(document.RootElement, options); + } + + internal static ActiveDirectoryConfigData DeserializeActiveDirectoryConfigData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ActiveDirectoryConfigProperties properties = default; + ETag? etag = default; + ManagedServiceIdentity identity = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ActiveDirectoryConfigProperties.DeserializeActiveDirectoryConfigProperties(property.Value, options); + continue; + } + if (property.NameEquals("etag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(property.Value.GetString()); + continue; + } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireV3Options, AzureResourceManagerNetAppContext.Default); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerNetAppContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ActiveDirectoryConfigData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + etag, + identity, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ActiveDirectoryConfigData)} does not support writing '{options.Format}' format."); + } + } + + ActiveDirectoryConfigData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeActiveDirectoryConfigData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ActiveDirectoryConfigData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ActiveDirectoryConfigData.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ActiveDirectoryConfigData.cs new file mode 100644 index 000000000000..07b1c7489547 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ActiveDirectoryConfigData.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A class representing the ActiveDirectoryConfig data model. + /// Active Directory Configuration resource + /// + public partial class ActiveDirectoryConfigData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public ActiveDirectoryConfigData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// "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."). + /// The managed service identities assigned to this resource. + /// Keeps track of any properties unknown to the library. + internal ActiveDirectoryConfigData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ActiveDirectoryConfigProperties properties, ETag? etag, ManagedServiceIdentity identity, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + ETag = etag; + Identity = identity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ActiveDirectoryConfigData() + { + } + + /// The resource-specific properties for this resource. + public ActiveDirectoryConfigProperties Properties { get; set; } + /// "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."). + public ETag? ETag { get; } + /// The managed service identities assigned to this resource. + public ManagedServiceIdentity Identity { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ActiveDirectoryConfigResource.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ActiveDirectoryConfigResource.Serialization.cs new file mode 100644 index 000000000000..5df74449b77e --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ActiveDirectoryConfigResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.NetApp +{ + public partial class ActiveDirectoryConfigResource : IJsonModel + { + private static ActiveDirectoryConfigData s_dataDeserializationInstance; + private static ActiveDirectoryConfigData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ActiveDirectoryConfigData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetAppContext.Default); + + ActiveDirectoryConfigData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetAppContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ActiveDirectoryConfigResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ActiveDirectoryConfigResource.cs new file mode 100644 index 000000000000..0f3654c3172e --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ActiveDirectoryConfigResource.cs @@ -0,0 +1,707 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NetApp.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A Class representing an ActiveDirectoryConfig along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetActiveDirectoryConfigResource method. + /// Otherwise you can get one from its parent resource using the GetActiveDirectoryConfig method. + /// + public partial class ActiveDirectoryConfigResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The activeDirectoryConfigName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string activeDirectoryConfigName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _activeDirectoryConfigClientDiagnostics; + private readonly ActiveDirectoryConfigsRestOperations _activeDirectoryConfigRestClient; + private readonly ActiveDirectoryConfigData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.NetApp/activeDirectoryConfigs"; + + /// Initializes a new instance of the class for mocking. + protected ActiveDirectoryConfigResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ActiveDirectoryConfigResource(ArmClient client, ActiveDirectoryConfigData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ActiveDirectoryConfigResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _activeDirectoryConfigClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NetApp", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string activeDirectoryConfigApiVersion); + _activeDirectoryConfigRestClient = new ActiveDirectoryConfigsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, activeDirectoryConfigApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ActiveDirectoryConfigData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get the details of the specified active directory configuration + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName} + /// + /// + /// Operation Id + /// ActiveDirectoryConfigs_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _activeDirectoryConfigClientDiagnostics.CreateScope("ActiveDirectoryConfigResource.Get"); + scope.Start(); + try + { + var response = await _activeDirectoryConfigRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ActiveDirectoryConfigResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the details of the specified active directory configuration + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName} + /// + /// + /// Operation Id + /// ActiveDirectoryConfigs_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _activeDirectoryConfigClientDiagnostics.CreateScope("ActiveDirectoryConfigResource.Get"); + scope.Start(); + try + { + var response = _activeDirectoryConfigRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ActiveDirectoryConfigResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the specified Active Directory configuration + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName} + /// + /// + /// Operation Id + /// ActiveDirectoryConfigs_Delete + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _activeDirectoryConfigClientDiagnostics.CreateScope("ActiveDirectoryConfigResource.Delete"); + scope.Start(); + try + { + var response = await _activeDirectoryConfigRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(_activeDirectoryConfigClientDiagnostics, Pipeline, _activeDirectoryConfigRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the specified Active Directory configuration + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName} + /// + /// + /// Operation Id + /// ActiveDirectoryConfigs_Delete + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _activeDirectoryConfigClientDiagnostics.CreateScope("ActiveDirectoryConfigResource.Delete"); + scope.Start(); + try + { + var response = _activeDirectoryConfigRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new NetAppArmOperation(_activeDirectoryConfigClientDiagnostics, Pipeline, _activeDirectoryConfigRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Patch the specified active directory configuration + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName} + /// + /// + /// Operation Id + /// ActiveDirectoryConfigs_Update + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ActiveDirectoryConfigPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _activeDirectoryConfigClientDiagnostics.CreateScope("ActiveDirectoryConfigResource.Update"); + scope.Start(); + try + { + var response = await _activeDirectoryConfigRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(new ActiveDirectoryConfigOperationSource(Client), _activeDirectoryConfigClientDiagnostics, Pipeline, _activeDirectoryConfigRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Patch the specified active directory configuration + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName} + /// + /// + /// Operation Id + /// ActiveDirectoryConfigs_Update + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ActiveDirectoryConfigPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _activeDirectoryConfigClientDiagnostics.CreateScope("ActiveDirectoryConfigResource.Update"); + scope.Start(); + try + { + var response = _activeDirectoryConfigRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new NetAppArmOperation(new ActiveDirectoryConfigOperationSource(Client), _activeDirectoryConfigClientDiagnostics, Pipeline, _activeDirectoryConfigRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName} + /// + /// + /// Operation Id + /// ActiveDirectoryConfigs_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _activeDirectoryConfigClientDiagnostics.CreateScope("ActiveDirectoryConfigResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _activeDirectoryConfigRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ActiveDirectoryConfigResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ActiveDirectoryConfigPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName} + /// + /// + /// Operation Id + /// ActiveDirectoryConfigs_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _activeDirectoryConfigClientDiagnostics.CreateScope("ActiveDirectoryConfigResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _activeDirectoryConfigRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ActiveDirectoryConfigResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ActiveDirectoryConfigPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName} + /// + /// + /// Operation Id + /// ActiveDirectoryConfigs_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _activeDirectoryConfigClientDiagnostics.CreateScope("ActiveDirectoryConfigResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _activeDirectoryConfigRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ActiveDirectoryConfigResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ActiveDirectoryConfigPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName} + /// + /// + /// Operation Id + /// ActiveDirectoryConfigs_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _activeDirectoryConfigClientDiagnostics.CreateScope("ActiveDirectoryConfigResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _activeDirectoryConfigRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ActiveDirectoryConfigResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ActiveDirectoryConfigPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName} + /// + /// + /// Operation Id + /// ActiveDirectoryConfigs_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _activeDirectoryConfigClientDiagnostics.CreateScope("ActiveDirectoryConfigResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _activeDirectoryConfigRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ActiveDirectoryConfigResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ActiveDirectoryConfigPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName} + /// + /// + /// Operation Id + /// ActiveDirectoryConfigs_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _activeDirectoryConfigClientDiagnostics.CreateScope("ActiveDirectoryConfigResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _activeDirectoryConfigRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ActiveDirectoryConfigResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ActiveDirectoryConfigPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ArmNetAppModelFactory.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ArmNetAppModelFactory.cs index fb11bebab395..ab30ea22f8a6 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ArmNetAppModelFactory.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ArmNetAppModelFactory.cs @@ -18,6 +18,137 @@ namespace Azure.ResourceManager.NetApp.Models /// Model factory for models. public static partial class ArmNetAppModelFactory { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// "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."). + /// The managed service identities assigned to this resource. + /// A new instance for mocking. + public static ActiveDirectoryConfigData ActiveDirectoryConfigData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ActiveDirectoryConfigProperties properties = null, ETag? etag = null, ManagedServiceIdentity identity = null) + { + tags ??= new Dictionary(); + + return new ActiveDirectoryConfigData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + etag, + identity, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// A domain user account with permission to create machine accounts. + /// An array of DNS server IP addresses(IPv4 only) for the Active Directory. + /// NetBIOS name of the SMB server. This name will be registered as a computer account in the AD and used to mount volumes. + /// The Organizational Unit (OU) within the Windows Active Directory. + /// The Active Directory site the service will limit Domain Controller discovery to. + /// Users to be added to the Built-in Backup Operator active directory group. A list of unique usernames without domain specifier. + /// Users to be added to the Built-in Administrators active directory group. A list of unique usernames without domain specifier. + /// 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. + /// Status of the Active Directory. + /// Azure lifecycle management. + /// Name of the Active Directory domain. + /// Access password from Azure KeyVault Secrets to connect Active Directory. + /// A new instance for mocking. + public static ActiveDirectoryConfigProperties ActiveDirectoryConfigProperties(string userName = null, IEnumerable dns = null, string smbServerName = null, string organizationalUnit = null, string site = null, IEnumerable backupOperators = null, IEnumerable administrators = null, IEnumerable securityOperators = null, NetAppAccountActiveDirectoryStatus? activeDirectoryStatus = null, NetAppProvisioningState? provisioningState = null, string domain = null, SecretPassword secretPassword = null) + { + dns ??= new List(); + backupOperators ??= new List(); + administrators ??= new List(); + securityOperators ??= new List(); + + return new ActiveDirectoryConfigProperties( + userName, + dns?.ToList(), + smbServerName, + organizationalUnit, + site, + backupOperators?.ToList(), + administrators?.ToList(), + securityOperators?.ToList(), + activeDirectoryStatus, + provisioningState, + domain, + secretPassword, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The principal ID (object ID) of the identity used to authenticate with key vault. Read-only. + /// 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. + /// A new instance for mocking. + public static SecretPasswordIdentity SecretPasswordIdentity(string principalId = null, string userAssignedIdentity = null) + { + return new SecretPasswordIdentity(principalId, userAssignedIdentity, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// 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. + /// The managed service identities assigned to this resource. + /// A new instance for mocking. + public static ElasticAccountData ElasticAccountData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ElasticAccountProperties properties = null, ETag? etag = null, ManagedServiceIdentity identity = null) + { + tags ??= new Dictionary(); + + return new ElasticAccountData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + etag, + identity, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Azure lifecycle management. + /// Encryption settings. + /// A new instance for mocking. + public static ElasticAccountProperties ElasticAccountProperties(NetAppProvisioningState? provisioningState = null, ElasticEncryption encryption = null) + { + return new ElasticAccountProperties(provisioningState, encryption, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The Uri of KeyVault. + /// The name of KeyVault key. + /// The resource ID of KeyVault. + /// Status of the KeyVault connection. + /// A new instance for mocking. + public static ElasticKeyVaultProperties ElasticKeyVaultProperties(Uri keyVaultUri = null, string keyName = null, ResourceIdentifier keyVaultResourceId = null, ElasticKeyVaultStatus? status = null) + { + return new ElasticKeyVaultProperties(keyVaultUri, keyName, keyVaultResourceId, status, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The principal ID (object ID) of the identity used to authenticate with key vault. Read-only. + /// 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. + /// A new instance for mocking. + public static ElasticEncryptionIdentity ElasticEncryptionIdentity(string principalId = null, ResourceIdentifier userAssignedIdentity = null) + { + return new ElasticEncryptionIdentity(principalId, userAssignedIdentity, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// File path to verify. /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. @@ -61,7 +192,7 @@ public static NetworkSiblingSet NetworkSiblingSet(string networkSiblingSetId = n } /// Initializes a new instance of . - /// ipAddress. + /// IP Address. /// Volume resource Ids. /// A new instance for mocking. public static NicInfo NicInfo(string ipAddress = null, IEnumerable volumeResourceIds = null) @@ -168,8 +299,9 @@ public static NetAppUsageName NetAppUsageName(string value = null, string locali /// Shows the status of disableShowmount for all volumes under the subscription, null equals false. /// Domain for NFSv4 user ID mapping. This property will be set for all NetApp accounts in the subscription and region and only affect non ldap NFSv4 volumes. /// MultiAD Status for the account. + /// LDAP Configuration for the account. /// A new instance for mocking. - public static NetAppAccountData NetAppAccountData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, ManagedServiceIdentity identity = null, string provisioningState = null, IEnumerable activeDirectories = null, NetAppAccountEncryption encryption = null, bool? disableShowmount = null, string nfsV4IdDomain = null, MultiAdStatus? multiAdStatus = null) + public static NetAppAccountData NetAppAccountData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, ManagedServiceIdentity identity = null, string provisioningState = null, IEnumerable activeDirectories = null, NetAppAccountEncryption encryption = null, bool? disableShowmount = null, string nfsV4IdDomain = null, MultiAdStatus? multiAdStatus = null, LdapConfiguration ldapConfiguration = null) { tags ??= new Dictionary(); activeDirectories ??= new List(); @@ -189,6 +321,7 @@ public static NetAppAccountData NetAppAccountData(ResourceIdentifier id = null, disableShowmount, nfsV4IdDomain, multiAdStatus, + ldapConfiguration, serializedAdditionalRawData: null); } @@ -278,6 +411,353 @@ public static NetAppEncryptionIdentity NetAppEncryptionIdentity(string principal return new NetAppEncryptionIdentity(principalId, userAssignedIdentity, federatedClientId, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// 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. + /// A new instance for mocking. + public static ElasticBackupPolicyData ElasticBackupPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ElasticBackupPolicyProperties properties = null, ETag? etag = null) + { + tags ??= new Dictionary(); + + return new ElasticBackupPolicyData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + etag, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Azure lifecycle management. + /// Daily backups count to keep. + /// Weekly backups count to keep. + /// Monthly backups count to keep. + /// The number of volumes currently using this Backup Policy. + /// The property to identify whether Backup Policy is enabled or not. + /// A new instance for mocking. + public static ElasticBackupPolicyProperties ElasticBackupPolicyProperties(NetAppProvisioningState? provisioningState = null, int? dailyBackupsToKeep = null, int? weeklyBackupsToKeep = null, int? monthlyBackupsToKeep = null, int? assignedVolumesCount = null, ElasticBackupPolicyState? policyState = null) + { + return new ElasticBackupPolicyProperties( + provisioningState, + dailyBackupsToKeep, + weeklyBackupsToKeep, + monthlyBackupsToKeep, + assignedVolumesCount, + policyState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// 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. + /// A new instance for mocking. + public static ElasticBackupVaultData ElasticBackupVaultData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, NetAppProvisioningState? elasticBackupVaultProvisioningState = null, ETag? etag = null) + { + tags ??= new Dictionary(); + + return new ElasticBackupVaultData( + id, + name, + resourceType, + systemData, + tags, + location, + elasticBackupVaultProvisioningState != null ? new ElasticBackupVaultProperties(elasticBackupVaultProvisioningState, serializedAdditionalRawData: null) : null, + etag, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static ElasticBackupData ElasticBackupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ElasticBackupProperties properties = null) + { + return new ElasticBackupData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The creation date of the backup. + /// The snapshot creation date of the backup. + /// The completion date of the backup. + /// Azure lifecycle management. + /// Size of backup in bytes. + /// Label for backup. + /// Type of backup Manual or Scheduled. + /// Failure reason. + /// ResourceId used to identify the Elastic Volume. + /// Manual backup using an already existing snapshot. This will always be CreateNewSnapshot for scheduled backups and UseExistingSnapshot/CreateNewSnapshot for manual backups. + /// ResourceId used to identify the elastic snapshot resource. This is required when an existing snapshot needs to be used for creating a manual backup. + /// ResourceId used to identify the elastic backup policy. + /// Specifies if the backup is for a large volume. + /// A new instance for mocking. + public static ElasticBackupProperties ElasticBackupProperties(DateTimeOffset? createdOn = null, DateTimeOffset? snapshotCreationOn = null, DateTimeOffset? completionOn = null, NetAppProvisioningState? provisioningState = null, long? size = null, string label = null, ElasticBackupType? backupType = null, string failureReason = null, ResourceIdentifier elasticVolumeResourceId = null, SnapshotUsage? snapshotUsage = null, ResourceIdentifier elasticSnapshotResourceId = null, ResourceIdentifier elasticBackupPolicyResourceId = null, VolumeSize? volumeSize = null) + { + return new ElasticBackupProperties( + createdOn, + snapshotCreationOn, + completionOn, + provisioningState, + size, + label, + backupType, + failureReason, + elasticVolumeResourceId, + snapshotUsage, + elasticSnapshotResourceId, + elasticBackupPolicyResourceId, + volumeSize, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static ElasticBackupPatch ElasticBackupPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string elasticBackupPropertiesUpdateLabel = null) + { + return new ElasticBackupPatch( + id, + name, + resourceType, + systemData, + elasticBackupPropertiesUpdateLabel != null ? new ElasticBackupPropertiesUpdate(elasticBackupPropertiesUpdateLabel, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// 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. + /// The availability zones. + /// A new instance for mocking. + public static ElasticCapacityPoolData ElasticCapacityPoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ElasticCapacityPoolProperties properties = null, ETag? etag = null, IEnumerable zones = null) + { + tags ??= new Dictionary(); + zones ??= new List(); + + return new ElasticCapacityPoolData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + etag, + zones?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// 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. + /// The service level of the elastic capacity pool. + /// Azure lifecycle management. + /// Encryption settings. + /// Total throughput of the pool in MiB/s. + /// 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. + /// Indicates the current zone of the pool. This can be changed for zoneRedundant service level pool with the changeZone action. + /// Current availability status of the resource. + /// The Azure Resource URI for an Active Directory configuration. This is used by all the SMB volumes within the pool. + /// A new instance for mocking. + public static ElasticCapacityPoolProperties ElasticCapacityPoolProperties(long size = default, ElasticServiceLevel serviceLevel = default, NetAppProvisioningState? provisioningState = null, ElasticEncryptionConfiguration encryption = null, double? totalThroughputMibps = null, ResourceIdentifier subnetResourceId = null, string currentZone = null, ElasticResourceAvailabilityStatus? availabilityStatus = null, ResourceIdentifier activeDirectoryConfigResourceId = null) + { + return new ElasticCapacityPoolProperties( + size, + serviceLevel, + provisioningState, + encryption, + totalThroughputMibps, + subnetResourceId, + currentZone, + availabilityStatus, + activeDirectoryConfigResourceId, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// True indicates name is valid and available. False indicates the name is invalid, unavailable, or both. + /// 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. + /// 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. + /// A new instance for mocking. + public static CheckElasticResourceAvailabilityResult CheckElasticResourceAvailabilityResult(CheckElasticResourceAvailabilityStatus? isAvailable = null, CheckElasticResourceAvailabilityReason? reason = null, string message = null) + { + return new CheckElasticResourceAvailabilityResult(isAvailable, reason, message, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// 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. + /// The availability zones. + /// A new instance for mocking. + public static ElasticVolumeData ElasticVolumeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ElasticVolumeProperties properties = null, ETag? etag = null, IEnumerable zones = null) + { + tags ??= new Dictionary(); + zones ??= new List(); + + return new ElasticVolumeData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + etag, + zones?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// A unique file path for the volume. Used when creating mount targets. This needs to be unique within the elastic capacity pool. + /// 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. + /// Set of export policy rules. + /// Set of support protocol types for the elastic volume. + /// Azure lifecycle management. + /// Current availability status of the resource. + /// Resource identifier used to identify the Elastic Snapshot. + /// List of mount targets that can be used to mount this volume. + /// Data protection configuration option for the volume, including snapshot policies and backup. + /// Controls the visibility of the volume's read-only snapshot directory, which provides access to each of the volume's snapshots. + /// SMB Properties. + /// Resource identifier used to identify the Elastic Backup. + /// The current state of the restoration process. + /// A new instance for mocking. + public static ElasticVolumeProperties ElasticVolumeProperties(string filePath = null, long size = default, IEnumerable exportRules = null, IEnumerable protocolTypes = null, NetAppProvisioningState? provisioningState = null, ElasticResourceAvailabilityStatus? availabilityStatus = null, ResourceIdentifier snapshotResourceId = null, IEnumerable mountTargets = null, ElasticVolumeDataProtectionProperties dataProtection = null, SnapshotDirectoryVisibility? snapshotDirectoryVisibility = null, ElasticSmbEncryption? smbEncryption = null, ResourceIdentifier backupResourceId = null, ElasticVolumeRestorationState? restorationState = null) + { + exportRules ??= new List(); + protocolTypes ??= new List(); + mountTargets ??= new List(); + + return new ElasticVolumeProperties( + filePath, + size, + exportRules != null ? new ElasticExportPolicy(exportRules?.ToList(), serializedAdditionalRawData: null) : null, + protocolTypes?.ToList(), + provisioningState, + availabilityStatus, + snapshotResourceId, + mountTargets?.ToList(), + dataProtection, + snapshotDirectoryVisibility, + smbEncryption != null ? new ElasticSmbProperties(smbEncryption, serializedAdditionalRawData: null) : null, + backupResourceId, + restorationState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The mount target's IPv4 address, used to mount the volume. + /// The SMB server's Fully Qualified Domain Name, FQDN. + /// A new instance for mocking. + public static ElasticMountTargetProperties ElasticMountTargetProperties(string ipAddress = null, string smbServerFqdn = null) + { + return new ElasticMountTargetProperties(ipAddress, smbServerFqdn, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static ElasticSnapshotData ElasticSnapshotData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, NetAppProvisioningState? elasticSnapshotProvisioningState = null) + { + return new ElasticSnapshotData( + id, + name, + resourceType, + systemData, + elasticSnapshotProvisioningState != null ? new ElasticSnapshotProperties(elasticSnapshotProvisioningState, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// 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. + /// A new instance for mocking. + public static ElasticSnapshotPolicyData ElasticSnapshotPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ElasticSnapshotPolicyProperties properties = null, ETag? etag = null) + { + tags ??= new Dictionary(); + + return new ElasticSnapshotPolicyData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + etag, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Schedule for hourly snapshots. + /// Schedule for daily snapshots. + /// Schedule for weekly snapshots. + /// Schedule for monthly snapshots. + /// Configures if the snapshot policy is enabled on the volumes connected to the policy. + /// Azure lifecycle management. + /// A new instance for mocking. + public static ElasticSnapshotPolicyProperties ElasticSnapshotPolicyProperties(ElasticSnapshotPolicyHourlySchedule hourlySchedule = null, ElasticSnapshotPolicyDailySchedule dailySchedule = null, ElasticSnapshotPolicyWeeklySchedule weeklySchedule = null, ElasticSnapshotPolicyMonthlySchedule monthlySchedule = null, PolicyStatus? policyStatus = null, NetAppProvisioningState? provisioningState = null) + { + return new ElasticSnapshotPolicyProperties( + hourlySchedule, + dailySchedule, + weeklySchedule, + monthlySchedule, + policyStatus, + provisioningState, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -292,8 +772,9 @@ public static NetAppEncryptionIdentity NetAppEncryptionIdentity(string principal /// Shows the status of disableShowmount for all volumes under the subscription, null equals false. /// Domain for NFSv4 user ID mapping. This property will be set for all NetApp accounts in the subscription and region and only affect non ldap NFSv4 volumes. /// MultiAD Status for the account. + /// LDAP Configuration for the account. /// A new instance for mocking. - public static NetAppAccountPatch NetAppAccountPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string provisioningState = null, IEnumerable activeDirectories = null, NetAppAccountEncryption encryption = null, bool? disableShowmount = null, string nfsV4IdDomain = null, MultiAdStatus? multiAdStatus = null) + public static NetAppAccountPatch NetAppAccountPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string provisioningState = null, IEnumerable activeDirectories = null, NetAppAccountEncryption encryption = null, bool? disableShowmount = null, string nfsV4IdDomain = null, MultiAdStatus? multiAdStatus = null, LdapConfiguration ldapConfiguration = null) { tags ??= new Dictionary(); activeDirectories ??= new List(); @@ -312,6 +793,7 @@ public static NetAppAccountPatch NetAppAccountPatch(ResourceIdentifier id = null disableShowmount, nfsV4IdDomain, multiAdStatus, + ldapConfiguration, serializedAdditionalRawData: null); } @@ -560,6 +1042,115 @@ public static CapacityPoolPatch CapacityPoolPatch(ResourceIdentifier id = null, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Cache 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."). + /// The availability zones. + /// A new instance for mocking. + public static CacheData CacheData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, CacheProperties properties = null, ETag? etag = null, IEnumerable zones = null) + { + tags ??= new Dictionary(); + zones ??= new List(); + + return new CacheData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + etag, + zones?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The file path of the Cache. + /// 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. + /// Set of export policy rules. + /// Set of protocol types, default NFSv3, CIFS for SMB protocol. + /// Azure lifecycle management. + /// Azure NetApp Files Cache lifecycle management. + /// The Azure Resource URI for a delegated cache subnet that will be used to allocate data IPs. + /// The Azure Resource URI for a delegated subnet that will be used for ANF Intercluster Interface IP addresses. + /// List of mount targets that can be used to mount this cache. + /// Describe if a cache is Kerberos enabled. + /// SMB information for the cache. + /// 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. + /// Actual throughput in MiB/s for auto qosType volumes calculated based on size and serviceLevel. + /// 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'. + /// The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + /// Maximum number of files allowed. + /// Specifies if the cache is encryption or not. + /// Language supported for volume. + /// Specifies whether LDAP is enabled or not for flexcache volume. + /// Specifies the type of LDAP server for flexcache volume. + /// Origin cluster information. + /// Flag indicating whether a CIFS change notification is enabled for the cache. + /// Flag indicating whether the global file lock is enabled for the cache. + /// Flag indicating whether writeback is enabled for the cache. + /// A new instance for mocking. + public static CacheProperties CacheProperties(string filepath = null, long size = default, IEnumerable exportPolicy = null, IEnumerable protocolTypes = null, CacheProvisioningState? provisioningState = null, CacheLifeCycleState? cacheState = null, ResourceIdentifier cacheSubnetResourceId = null, ResourceIdentifier peeringSubnetResourceId = null, IEnumerable mountTargets = null, KerberosState? kerberos = null, SmbSettings smbSettings = null, float? throughputMibps = null, float? actualThroughputMibps = null, NetAppEncryptionKeySource encryptionKeySource = default, ResourceIdentifier keyVaultPrivateEndpointResourceId = null, long? maximumNumberOfFiles = null, EncryptionState? encryption = null, NetAppVolumeLanguage? language = null, LdapState? ldap = null, LdapServerType? ldapServerType = null, OriginClusterInformation originClusterInformation = null, CifsChangeNotifyState? cifsChangeNotifications = null, GlobalFileLockingState? globalFileLocking = null, EnableWriteBackState? writeBack = null) + { + exportPolicy ??= new List(); + protocolTypes ??= new List(); + mountTargets ??= new List(); + + return new CacheProperties( + filepath, + size, + exportPolicy?.ToList(), + protocolTypes?.ToList(), + provisioningState, + cacheState, + cacheSubnetResourceId, + peeringSubnetResourceId, + mountTargets?.ToList(), + kerberos, + smbSettings, + throughputMibps, + actualThroughputMibps, + encryptionKeySource, + keyVaultPrivateEndpointResourceId, + maximumNumberOfFiles, + encryption, + language, + ldap, + ldapServerType, + originClusterInformation, + cifsChangeNotifications, + globalFileLocking, + writeBack, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// UUID v4 used to identify the MountTarget. + /// The mount target's IPv4 address, used to mount the cache. + /// The SMB server's Fully Qualified Domain Name, FQDN. + /// A new instance for mocking. + public static CacheMountTargetProperties CacheMountTargetProperties(string mountTargetId = null, string ipAddress = null, string smbServerFqdn = null) + { + return new CacheMountTargetProperties(mountTargetId, ipAddress, smbServerFqdn, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The cluster peering command. + /// The cluster peering passphrase. + /// The vserver peering command. + /// A new instance for mocking. + public static PeeringPassphrases PeeringPassphrases(string clusterPeeringCommand = null, string clusterPeeringPassphrase = null, string vserverPeeringCommand = null) + { + return new PeeringPassphrases(clusterPeeringCommand, clusterPeeringPassphrase, vserverPeeringCommand, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -572,7 +1163,11 @@ public static CapacityPoolPatch CapacityPoolPatch(ResourceIdentifier id = null, /// Unique FileSystem Identifier. /// A unique file path for the volume. Used when creating mount targets. /// The service level of the file system. - /// 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. + /// + /// 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. + /// For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples of 1 GiB. + /// /// Set of export policy rules. /// Set of protocol types, default NFSv3, CIFS for SMB protocol. /// Azure lifecycle management. @@ -602,6 +1197,7 @@ public static CapacityPoolPatch CapacityPoolPatch(ResourceIdentifier id = null, /// Source of key used to encrypt data in volume. Applicable if NetApp account has encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault'. /// The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. /// Specifies whether LDAP is enabled or not for a given NFS volume. + /// Specifies the type of LDAP server for a given NFS volume. /// Specifies whether Cool Access(tiering) is enabled for the volume. /// Specifies the number of days after which data that is not accessed by clients will be tiered. /// @@ -630,10 +1226,17 @@ public static CapacityPoolPatch CapacityPoolPatch(ResourceIdentifier id = null, /// Flag indicating whether subvolume operations are enabled on the volume. /// The availability zone where the volume is provisioned. This refers to the logical availability zone where the volume resides. /// Specifies whether volume is a Large Volume or Regular Volume. + /// + /// 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. + /// /// Id of the snapshot or backup that the volume is restored from. /// Space shared by short term clone volume with parent volume in bytes. + /// Language supported for volume. + /// Specifies whether the volume operates in Breakthrough Mode. /// A new instance for mocking. - public static NetAppVolumeData NetAppVolumeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, IEnumerable zones = null, Guid? fileSystemId = null, string creationToken = null, NetAppFileServiceLevel? serviceLevel = null, long usageThreshold = default, IEnumerable exportRules = null, IEnumerable protocolTypes = null, string provisioningState = null, string snapshotId = null, bool? deleteBaseSnapshot = null, string backupId = null, string baremetalTenantId = null, ResourceIdentifier subnetId = null, NetAppNetworkFeature? networkFeatures = null, NetAppNetworkFeature? effectiveNetworkFeatures = null, Guid? networkSiblingSetId = null, NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity = null, IEnumerable mountTargets = null, string volumeType = null, NetAppVolumeDataProtection dataProtection = null, AcceptGrowCapacityPoolForShortTermCloneSplit? acceptGrowCapacityPoolForShortTermCloneSplit = null, bool? isRestoring = null, bool? isSnapshotDirectoryVisible = null, bool? isKerberosEnabled = null, NetAppVolumeSecurityStyle? securityStyle = null, bool? isSmbEncryptionEnabled = null, SmbAccessBasedEnumeration? smbAccessBasedEnumeration = null, SmbNonBrowsable? smbNonBrowsable = null, bool? isSmbContinuouslyAvailable = null, float? throughputMibps = null, float? actualThroughputMibps = null, NetAppEncryptionKeySource? encryptionKeySource = null, ResourceIdentifier keyVaultPrivateEndpointResourceId = null, bool? isLdapEnabled = null, bool? isCoolAccessEnabled = null, int? coolnessPeriod = null, CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy = null, CoolAccessTieringPolicy? coolAccessTieringPolicy = null, string unixPermissions = null, int? cloneProgress = null, NetAppFileAccessLog? fileAccessLogs = null, NetAppAvsDataStore? avsDataStore = null, IEnumerable dataStoreResourceId = null, bool? isDefaultQuotaEnabled = null, long? defaultUserQuotaInKiBs = null, long? defaultGroupQuotaInKiBs = null, long? maximumNumberOfFiles = null, string volumeGroupName = null, ResourceIdentifier capacityPoolResourceId = null, ResourceIdentifier proximityPlacementGroupId = null, string t2Network = null, string volumeSpecName = null, bool? isEncrypted = null, IEnumerable placementRules = null, EnableNetAppSubvolume? enableSubvolumes = null, string provisionedAvailabilityZone = null, bool? isLargeVolume = null, ResourceIdentifier originatingResourceId = null, long? inheritedSizeInBytes = null) + public static NetAppVolumeData NetAppVolumeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, IEnumerable zones = null, Guid? fileSystemId = null, string creationToken = null, NetAppFileServiceLevel? serviceLevel = null, long usageThreshold = default, IEnumerable exportRules = null, IEnumerable protocolTypes = null, string provisioningState = null, string snapshotId = null, bool? deleteBaseSnapshot = null, string backupId = null, string baremetalTenantId = null, ResourceIdentifier subnetId = null, NetAppNetworkFeature? networkFeatures = null, NetAppNetworkFeature? effectiveNetworkFeatures = null, Guid? networkSiblingSetId = null, NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity = null, IEnumerable mountTargets = null, string volumeType = null, NetAppVolumeDataProtection dataProtection = null, AcceptGrowCapacityPoolForShortTermCloneSplit? acceptGrowCapacityPoolForShortTermCloneSplit = null, bool? isRestoring = null, bool? isSnapshotDirectoryVisible = null, bool? isKerberosEnabled = null, NetAppVolumeSecurityStyle? securityStyle = null, bool? isSmbEncryptionEnabled = null, SmbAccessBasedEnumeration? smbAccessBasedEnumeration = null, SmbNonBrowsable? smbNonBrowsable = null, bool? isSmbContinuouslyAvailable = null, float? throughputMibps = null, float? actualThroughputMibps = null, NetAppEncryptionKeySource? encryptionKeySource = null, ResourceIdentifier keyVaultPrivateEndpointResourceId = null, bool? isLdapEnabled = null, LdapServerType? ldapServerType = null, bool? isCoolAccessEnabled = null, int? coolnessPeriod = null, CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy = null, CoolAccessTieringPolicy? coolAccessTieringPolicy = null, string unixPermissions = null, int? cloneProgress = null, NetAppFileAccessLog? fileAccessLogs = null, NetAppAvsDataStore? avsDataStore = null, IEnumerable dataStoreResourceId = null, bool? isDefaultQuotaEnabled = null, long? defaultUserQuotaInKiBs = null, long? defaultGroupQuotaInKiBs = null, long? maximumNumberOfFiles = null, string volumeGroupName = null, ResourceIdentifier capacityPoolResourceId = null, ResourceIdentifier proximityPlacementGroupId = null, string t2Network = null, string volumeSpecName = null, bool? isEncrypted = null, IEnumerable placementRules = null, EnableNetAppSubvolume? enableSubvolumes = null, string provisionedAvailabilityZone = null, bool? isLargeVolume = null, LargeVolumeType? largeVolumeType = null, ResourceIdentifier originatingResourceId = null, long? inheritedSizeInBytes = null, NetAppVolumeLanguage? language = null, BreakthroughMode? breakthroughMode = null) { tags ??= new Dictionary(); zones ??= new List(); @@ -685,6 +1288,7 @@ public static NetAppVolumeData NetAppVolumeData(ResourceIdentifier id = null, st encryptionKeySource, keyVaultPrivateEndpointResourceId, isLdapEnabled, + ldapServerType, isCoolAccessEnabled, coolnessPeriod, coolAccessRetrievalPolicy, @@ -708,8 +1312,11 @@ public static NetAppVolumeData NetAppVolumeData(ResourceIdentifier id = null, st enableSubvolumes, provisionedAvailabilityZone, isLargeVolume, + largeVolumeType, originatingResourceId, inheritedSizeInBytes, + language, + breakthroughMode, serializedAdditionalRawData: null); } @@ -732,8 +1339,12 @@ public static NetAppVolumeMountTarget NetAppVolumeMountTarget(Guid? mountTargetI /// The full path to a volume that is to be migrated into ANF. Required for Migration volumes. /// The remote region for the other end of the Volume Replication. /// A list of destination replications. + /// Property that only applies to external replications. Provides a machine-readable value for the status of the external replication setup. + /// Contains human-readable instructions on what the next step is to finish the external replication setup. + /// 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. + /// The status of the Volume Replication. /// A new instance for mocking. - public static NetAppReplicationObject NetAppReplicationObject(string replicationId = null, NetAppEndpointType? endpointType = null, NetAppReplicationSchedule? replicationSchedule = null, ResourceIdentifier remoteVolumeResourceId = null, RemotePath remotePath = null, string remoteVolumeRegion = null, IEnumerable destinationReplications = null) + public static NetAppReplicationObject NetAppReplicationObject(string replicationId = null, NetAppEndpointType? endpointType = null, NetAppReplicationSchedule? replicationSchedule = null, ResourceIdentifier remoteVolumeResourceId = null, RemotePath remotePath = null, string remoteVolumeRegion = null, IEnumerable destinationReplications = null, ExternalReplicationSetupStatus? externalReplicationSetupStatus = null, string externalReplicationSetupInfo = null, NetAppMirrorState? mirrorState = null, VolumeReplicationRelationshipStatus? relationshipStatus = null) { destinationReplications ??= new List(); @@ -745,6 +1356,10 @@ public static NetAppReplicationObject NetAppReplicationObject(string replication remotePath, remoteVolumeRegion, destinationReplications?.ToList(), + externalReplicationSetupStatus, + externalReplicationSetupInfo, + mirrorState, + relationshipStatus, serializedAdditionalRawData: null); } @@ -768,6 +1383,15 @@ public static NetAppVolumeRelocationProperties NetAppVolumeRelocationProperties( return new NetAppVolumeRelocationProperties(isRelocationRequested, isReadyToBeFinalized, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The desired value of the Advanced Ransomware Protection feature state available to the volume. + /// The actual state of the Advanced Ransomware Protection feature currently active on the volume. + /// A new instance for mocking. + public static RansomwareProtectionSettings RansomwareProtectionSettings(DesiredRansomwareProtectionState? desiredRansomwareProtectionState = null, ActualRansomwareProtectionState? actualRansomwareProtectionState = null) + { + return new RansomwareProtectionSettings(desiredRansomwareProtectionState, actualRansomwareProtectionState, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -776,7 +1400,11 @@ public static NetAppVolumeRelocationProperties NetAppVolumeRelocationProperties( /// The tags. /// The location. /// The service level of the file system. - /// 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. + /// + /// 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. + /// For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples of 1 GiB. + /// /// Set of export policy rules. /// Set of protocol types, default NFSv3, CIFS for SMB protocol. /// Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for manual qosType volume. @@ -831,12 +1459,100 @@ public static NetAppVolumePatch NetAppVolumePatch(ResourceIdentifier id = null, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// A command that needs to be run on the external ONTAP to accept svm peering. Will only be present if <code>svmPeeringStatus</code> is <code>pending</code>. - /// A new instance for mocking. - public static SvmPeerCommandResult SvmPeerCommandResult(string svmPeeringCommand = null) + /// Initializes a new instance of . + /// A command that needs to be run on the external ONTAP to accept svm peering. Will only be present if <code>svmPeeringStatus</code> is <code>pending</code>. + /// A new instance for mocking. + public static SvmPeerCommandResult SvmPeerCommandResult(string svmPeeringCommand = null) + { + return new SvmPeerCommandResult(svmPeeringCommand, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The volume path mounted inside the bucket. The default is the root path '/' if no value is provided when the bucket is created. + /// 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. + /// Provisioning state of the resource. + /// + /// 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. + /// + /// Properties of the server managing the lifecycle of volume buckets. + /// Access permissions for the bucket. Either ReadOnly or ReadWrite. The default is ReadOnly if no value is provided during bucket creation. + /// A new instance for mocking. + public static NetAppBucketData NetAppBucketData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string path = null, NetAppBucketFileSystemUser fileSystemUser = null, NetAppProvisioningState? provisioningState = null, NetAppBucketCredentialStatus? status = null, NetAppBucketServerProperties server = null, NetAppBucketPermission? permissions = null) + { + return new NetAppBucketData( + id, + name, + resourceType, + systemData, + path, + fileSystemUser, + provisioningState, + status, + server, + permissions, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The host part of the bucket URL, resolving to the bucket IP address and allowed by the server certificate. + /// Certificate Common Name taken from the certificate installed on the bucket server. + /// The bucket server's certificate expiry date. + /// The bucket server's IPv4 address. + /// 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. + /// A new instance for mocking. + public static NetAppBucketServerProperties NetAppBucketServerProperties(string fqdn = null, string certificateCommonName = null, DateTimeOffset? certificateExpiryOn = null, string ipAddress = null, string certificateObject = null) + { + return new NetAppBucketServerProperties( + fqdn, + certificateCommonName, + certificateExpiryOn, + ipAddress, + certificateObject, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The volume path mounted inside the bucket. + /// 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. + /// Provisioning state of the resource. + /// Properties of the server managing the lifecycle of volume buckets. + /// Access permissions for the bucket. Either ReadOnly or ReadWrite. + /// A new instance for mocking. + public static NetAppBucketPatch NetAppBucketPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string path = null, NetAppBucketFileSystemUser fileSystemUser = null, NetAppProvisioningState? provisioningState = null, NetAppBucketServerPatchProperties server = null, NetAppBucketPatchPermission? permissions = null) + { + return new NetAppBucketPatch( + id, + name, + resourceType, + systemData, + path, + fileSystemUser, + provisioningState, + server, + permissions, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The Access Key that is required along with the Secret Key to access the bucket. + /// The Secret Key that is required along with the Access Key to access the bucket. + /// The bucket's Access and Secret key pair expiry date and time (in UTC). + /// A new instance for mocking. + public static NetAppBucketGenerateCredentials NetAppBucketGenerateCredentials(string accessKey = null, string secretKey = null, DateTimeOffset? keyPairExpiry = null) { - return new SvmPeerCommandResult(svmPeeringCommand, serializedAdditionalRawData: null); + return new NetAppBucketGenerateCredentials(accessKey, secretKey, keyPairExpiry, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -895,6 +1611,36 @@ public static NetAppRestoreStatus NetAppRestoreStatus(bool? isHealthy = null, Vo serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// List of quota reports. + /// A new instance for mocking. + public static NetAppVolumeQuotaReportListResult NetAppVolumeQuotaReportListResult(IEnumerable value = null) + { + value ??= new List(); + + return new NetAppVolumeQuotaReportListResult(value?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Type of quota. + /// 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>. + /// Specifies the current usage in kibibytes for the user/group quota. + /// Specifies the total size limit in kibibytes for the user/group quota. + /// Percentage of used size compared to total size. + /// Flag to indicate whether the quota is derived from default quota. + /// A new instance for mocking. + public static NetAppVolumeQuotaReport NetAppVolumeQuotaReport(NetAppVolumeQuotaType? quotaType = null, string quotaTarget = null, long? quotaLimitUsedInKiBs = null, long? quotaLimitTotalInKiBs = null, float? percentageUsed = null, bool? isDerivedQuota = null) + { + return new NetAppVolumeQuotaReport( + quotaType, + quotaTarget, + quotaLimitUsedInKiBs, + quotaLimitTotalInKiBs, + percentageUsed, + isDerivedQuota, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// UUID v4 used to identify the replication. /// Indicates whether the local volume is the source or destination for the Volume Replication. @@ -927,6 +1673,70 @@ public static ClusterPeerCommandResult ClusterPeerCommandResult(string peerAccep return new ClusterPeerCommandResult(peerAcceptCommand, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Advanced Ransomware Protection reports Properties. + /// A new instance for mocking. + public static RansomwareReportData RansomwareReportData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, RansomwareReportProperties properties = null) + { + return new RansomwareReportData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The creation date and time of the report. + /// State of the Advanced Ransomware Protection (ARP) report. + /// Severity of the Advanced Ransomware Protection (ARP) report. + /// The number of cleared suspects identified by the ARP report. + /// The number of suspects identified by the ARP report. + /// Suspects identified in an ARP report. + /// Azure lifecycle management. + /// A new instance for mocking. + public static RansomwareReportProperties RansomwareReportProperties(DateTimeOffset? eventOn = null, RansomwareReportState? state = null, RansomwareReportSeverity? severity = null, int? clearedCount = null, int? reportedCount = null, IEnumerable suspects = null, string provisioningState = null) + { + suspects ??= new List(); + + return new RansomwareReportProperties( + eventOn, + state, + severity, + clearedCount, + reportedCount, + suspects?.ToList(), + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Suspect File extension. + /// ARP report suspect resolution. + /// The number of suspect files at the time of ARP report, this number can change as files get created and report status progresses. + /// Suspect files. + /// A new instance for mocking. + public static RansomwareSuspects RansomwareSuspects(string extension = null, RansomwareSuspectResolution? resolution = null, int? fileCount = null, IEnumerable suspectFiles = null) + { + suspectFiles ??= new List(); + + return new RansomwareSuspects(extension, resolution, fileCount, suspectFiles?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Suspect filename. + /// The creation date and time of the file. + /// A new instance for mocking. + public static SuspectFile SuspectFile(string suspectFileName = null, DateTimeOffset? fileTimestamp = null) + { + return new SuspectFile(suspectFileName, fileTimestamp, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// Replication health check. /// Status of the mirror relationship. @@ -1252,7 +2062,11 @@ public static NetAppVolumeGroupData NetAppVolumeGroupData(ResourceIdentifier id /// Unique FileSystem Identifier. /// A unique file path for the volume. Used when creating mount targets. /// The service level of the file system. - /// 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. + /// + /// 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. + /// For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples of 1 GiB. + /// /// Set of export policy rules. /// Set of protocol types, default NFSv3, CIFS for SMB protocol. /// Azure lifecycle management. @@ -1282,6 +2096,7 @@ public static NetAppVolumeGroupData NetAppVolumeGroupData(ResourceIdentifier id /// Source of key used to encrypt data in volume. Applicable if NetApp account has encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault'. /// The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. /// Specifies whether LDAP is enabled or not for a given NFS volume. + /// Specifies the type of LDAP server for a given NFS volume. /// Specifies whether Cool Access(tiering) is enabled for the volume. /// Specifies the number of days after which data that is not accessed by clients will be tiered. /// @@ -1310,10 +2125,17 @@ public static NetAppVolumeGroupData NetAppVolumeGroupData(ResourceIdentifier id /// Flag indicating whether subvolume operations are enabled on the volume. /// The availability zone where the volume is provisioned. This refers to the logical availability zone where the volume resides. /// Specifies whether volume is a Large Volume or Regular Volume. + /// + /// 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. + /// /// Id of the snapshot or backup that the volume is restored from. /// Space shared by short term clone volume with parent volume in bytes. + /// Language supported for volume. + /// Specifies whether the volume operates in Breakthrough Mode. /// A new instance for mocking. - public static NetAppVolumeGroupVolume NetAppVolumeGroupVolume(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, IDictionary tags = null, IEnumerable zones = null, Guid? fileSystemId = null, string creationToken = null, NetAppFileServiceLevel? serviceLevel = null, long usageThreshold = default, IEnumerable exportRules = null, IEnumerable protocolTypes = null, string provisioningState = null, string snapshotId = null, bool? deleteBaseSnapshot = null, string backupId = null, string baremetalTenantId = null, ResourceIdentifier subnetId = null, NetAppNetworkFeature? networkFeatures = null, NetAppNetworkFeature? effectiveNetworkFeatures = null, Guid? networkSiblingSetId = null, NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity = null, IEnumerable mountTargets = null, string volumeType = null, NetAppVolumeDataProtection dataProtection = null, AcceptGrowCapacityPoolForShortTermCloneSplit? acceptGrowCapacityPoolForShortTermCloneSplit = null, bool? isRestoring = null, bool? isSnapshotDirectoryVisible = null, bool? isKerberosEnabled = null, NetAppVolumeSecurityStyle? securityStyle = null, bool? isSmbEncryptionEnabled = null, SmbAccessBasedEnumeration? smbAccessBasedEnumeration = null, SmbNonBrowsable? smbNonBrowsable = null, bool? isSmbContinuouslyAvailable = null, float? throughputMibps = null, float? actualThroughputMibps = null, NetAppEncryptionKeySource? encryptionKeySource = null, ResourceIdentifier keyVaultPrivateEndpointResourceId = null, bool? isLdapEnabled = null, bool? isCoolAccessEnabled = null, int? coolnessPeriod = null, CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy = null, CoolAccessTieringPolicy? coolAccessTieringPolicy = null, string unixPermissions = null, int? cloneProgress = null, NetAppFileAccessLog? fileAccessLogs = null, NetAppAvsDataStore? avsDataStore = null, IEnumerable dataStoreResourceId = null, bool? isDefaultQuotaEnabled = null, long? defaultUserQuotaInKiBs = null, long? defaultGroupQuotaInKiBs = null, long? maximumNumberOfFiles = null, string volumeGroupName = null, ResourceIdentifier capacityPoolResourceId = null, ResourceIdentifier proximityPlacementGroupId = null, string t2Network = null, string volumeSpecName = null, bool? isEncrypted = null, IEnumerable placementRules = null, EnableNetAppSubvolume? enableSubvolumes = null, string provisionedAvailabilityZone = null, bool? isLargeVolume = null, ResourceIdentifier originatingResourceId = null, long? inheritedSizeInBytes = null) + public static NetAppVolumeGroupVolume NetAppVolumeGroupVolume(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, IDictionary tags = null, IEnumerable zones = null, Guid? fileSystemId = null, string creationToken = null, NetAppFileServiceLevel? serviceLevel = null, long usageThreshold = default, IEnumerable exportRules = null, IEnumerable protocolTypes = null, string provisioningState = null, string snapshotId = null, bool? deleteBaseSnapshot = null, string backupId = null, string baremetalTenantId = null, ResourceIdentifier subnetId = null, NetAppNetworkFeature? networkFeatures = null, NetAppNetworkFeature? effectiveNetworkFeatures = null, Guid? networkSiblingSetId = null, NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity = null, IEnumerable mountTargets = null, string volumeType = null, NetAppVolumeDataProtection dataProtection = null, AcceptGrowCapacityPoolForShortTermCloneSplit? acceptGrowCapacityPoolForShortTermCloneSplit = null, bool? isRestoring = null, bool? isSnapshotDirectoryVisible = null, bool? isKerberosEnabled = null, NetAppVolumeSecurityStyle? securityStyle = null, bool? isSmbEncryptionEnabled = null, SmbAccessBasedEnumeration? smbAccessBasedEnumeration = null, SmbNonBrowsable? smbNonBrowsable = null, bool? isSmbContinuouslyAvailable = null, float? throughputMibps = null, float? actualThroughputMibps = null, NetAppEncryptionKeySource? encryptionKeySource = null, ResourceIdentifier keyVaultPrivateEndpointResourceId = null, bool? isLdapEnabled = null, LdapServerType? ldapServerType = null, bool? isCoolAccessEnabled = null, int? coolnessPeriod = null, CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy = null, CoolAccessTieringPolicy? coolAccessTieringPolicy = null, string unixPermissions = null, int? cloneProgress = null, NetAppFileAccessLog? fileAccessLogs = null, NetAppAvsDataStore? avsDataStore = null, IEnumerable dataStoreResourceId = null, bool? isDefaultQuotaEnabled = null, long? defaultUserQuotaInKiBs = null, long? defaultGroupQuotaInKiBs = null, long? maximumNumberOfFiles = null, string volumeGroupName = null, ResourceIdentifier capacityPoolResourceId = null, ResourceIdentifier proximityPlacementGroupId = null, string t2Network = null, string volumeSpecName = null, bool? isEncrypted = null, IEnumerable placementRules = null, EnableNetAppSubvolume? enableSubvolumes = null, string provisionedAvailabilityZone = null, bool? isLargeVolume = null, LargeVolumeType? largeVolumeType = null, ResourceIdentifier originatingResourceId = null, long? inheritedSizeInBytes = null, NetAppVolumeLanguage? language = null, BreakthroughMode? breakthroughMode = null) { tags ??= new Dictionary(); zones ??= new List(); @@ -1362,6 +2184,7 @@ public static NetAppVolumeGroupVolume NetAppVolumeGroupVolume(ResourceIdentifier encryptionKeySource, keyVaultPrivateEndpointResourceId, isLdapEnabled, + ldapServerType, isCoolAccessEnabled, coolnessPeriod, coolAccessRetrievalPolicy, @@ -1385,11 +2208,227 @@ public static NetAppVolumeGroupVolume NetAppVolumeGroupVolume(ResourceIdentifier enableSubvolumes, provisionedAvailabilityZone, isLargeVolume, + largeVolumeType, originatingResourceId, inheritedSizeInBytes, + language, + breakthroughMode, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// "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."). + /// The managed service identities assigned to this resource. + /// Azure lifecycle management. + /// Active Directories. + /// Encryption settings. + /// Shows the status of disableShowmount for all volumes under the subscription, null equals false. + /// Domain for NFSv4 user ID mapping. This property will be set for all NetApp accounts in the subscription and region and only affect non ldap NFSv4 volumes. + /// MultiAD Status for the account. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static NetAppAccountData NetAppAccountData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, ManagedServiceIdentity identity, string provisioningState, IEnumerable activeDirectories, NetAppAccountEncryption encryption, bool? disableShowmount, string nfsV4IdDomain, MultiAdStatus? multiAdStatus) + { + return NetAppAccountData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, etag: etag, identity: identity, provisioningState: provisioningState, activeDirectories: activeDirectories, encryption: encryption, disableShowmount: disableShowmount, nfsV4IdDomain: nfsV4IdDomain, multiAdStatus: multiAdStatus, ldapConfiguration: default); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The identity used for the resource. + /// Azure lifecycle management. + /// Active Directories. + /// Encryption settings. + /// Shows the status of disableShowmount for all volumes under the subscription, null equals false. + /// Domain for NFSv4 user ID mapping. This property will be set for all NetApp accounts in the subscription and region and only affect non ldap NFSv4 volumes. + /// MultiAD Status for the account. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static NetAppAccountPatch NetAppAccountPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string provisioningState, IEnumerable activeDirectories, NetAppAccountEncryption encryption, bool? disableShowmount, string nfsV4IdDomain, MultiAdStatus? multiAdStatus) + { + return NetAppAccountPatch(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, identity: identity, provisioningState: provisioningState, activeDirectories: activeDirectories, encryption: encryption, disableShowmount: disableShowmount, nfsV4IdDomain: nfsV4IdDomain, multiAdStatus: multiAdStatus, ldapConfiguration: default); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// "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."). + /// The availability zones. + /// Unique FileSystem Identifier. + /// A unique file path for the volume. Used when creating mount targets. + /// The service level of the file system. + /// 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. + /// Set of export policy rules. + /// Set of protocol types, default NFSv3, CIFS for SMB protocol. + /// Azure lifecycle management. + /// Resource identifier used to identify the Snapshot. + /// If enabled (true) the snapshot the volume was created from will be automatically deleted after the volume create operation has finished. Defaults to false. + /// Resource identifier used to identify the Backup. + /// Unique Baremetal Tenant Identifier. + /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. + /// The original value of the network features type available to the volume at the time it was created. + /// The effective value of the network features type available to the volume, or current effective state of update. + /// Network Sibling Set ID for the the group of volumes sharing networking resources. + /// Provides storage to network proximity information for the volume. + /// List of mount targets. + /// What type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection. For creating clone volume, set type to ShortTermClone. + /// DataProtection type volumes include an object containing details of the replication. + /// While auto splitting the short term clone volume, if the parent pool does not have enough space to accommodate the volume after split, it will be automatically resized, which will lead to increased billing. To accept capacity pool size auto grow and create a short term clone volume, set the property as accepted. + /// Restoring. + /// If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's snapshots (defaults to true). + /// Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later. + /// The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol. + /// Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol volume. To be used with swagger version 2020-08-01 or later. + /// Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume. + /// Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. + /// Enables continuously available share property for smb volume. Only applicable for SMB volume. + /// Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for manual qosType volume. + /// Actual throughput in MiB/s for auto qosType volumes calculated based on size and serviceLevel. + /// Source of key used to encrypt data in volume. Applicable if NetApp account has encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault'. + /// The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + /// Specifies whether LDAP is enabled or not for a given NFS volume. + /// Specifies whether Cool Access(tiering) is enabled for the volume. + /// Specifies the number of days after which data that is not accessed by clients will be tiered. + /// + /// coolAccessRetrievalPolicy determines the data retrieval behavior from the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible values for this field are: + /// Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. + /// OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random reads. + /// Never - No client-driven data is pulled from cool tier to standard storage. + /// + /// coolAccessTieringPolicy determines which cold data blocks are moved to cool tier. The possible values for this field are: Auto - Moves cold user data blocks in both the Snapshot copies and the active file system to the cool tier tier. This policy is the default. SnapshotOnly - Moves user data blocks of the Volume Snapshot copies that are not associated with the active file system to the cool tier. + /// UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users. + /// When a volume is being restored from another volume's snapshot, will show the percentage completion of this cloning process. When this value is empty/null there is no cloning process currently happening on this volume. This value will update every 5 minutes during cloning. + /// Flag indicating whether file access logs are enabled for the volume, based on active diagnostic settings present on the volume. + /// Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose. + /// Data store resource unique identifier. + /// Specifies if default quota is enabled for the volume. + /// Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . + /// Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. + /// Maximum number of files allowed. Needs a service request in order to be changed. Only allowed to be changed if volume quota is more than 4TiB. + /// Volume Group Name. + /// Pool Resource Id used in case of creating a volume through volume group. + /// Proximity placement group associated with the volume. + /// T2 network information. + /// Volume spec name is the application specific designation or identifier for the particular volume in a volume group for e.g. data, log. + /// Specifies if the volume is encrypted or not. Only available on volumes created or updated after 2022-01-01. + /// Application specific placement rules for the particular volume. + /// Flag indicating whether subvolume operations are enabled on the volume. + /// The availability zone where the volume is provisioned. This refers to the logical availability zone where the volume resides. + /// Specifies whether volume is a Large Volume or Regular Volume. + /// Id of the snapshot or backup that the volume is restored from. + /// Space shared by short term clone volume with parent volume in bytes. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static NetAppVolumeData NetAppVolumeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, IEnumerable zones, Guid? fileSystemId, string creationToken, NetAppFileServiceLevel? serviceLevel, long usageThreshold, IEnumerable exportRules, IEnumerable protocolTypes, string provisioningState, string snapshotId, bool? deleteBaseSnapshot, string backupId, string baremetalTenantId, ResourceIdentifier subnetId, NetAppNetworkFeature? networkFeatures, NetAppNetworkFeature? effectiveNetworkFeatures, Guid? networkSiblingSetId, NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity, IEnumerable mountTargets, string volumeType, NetAppVolumeDataProtection dataProtection, AcceptGrowCapacityPoolForShortTermCloneSplit? acceptGrowCapacityPoolForShortTermCloneSplit, bool? isRestoring, bool? isSnapshotDirectoryVisible, bool? isKerberosEnabled, NetAppVolumeSecurityStyle? securityStyle, bool? isSmbEncryptionEnabled, SmbAccessBasedEnumeration? smbAccessBasedEnumeration, SmbNonBrowsable? smbNonBrowsable, bool? isSmbContinuouslyAvailable, float? throughputMibps, float? actualThroughputMibps, NetAppEncryptionKeySource? encryptionKeySource, ResourceIdentifier keyVaultPrivateEndpointResourceId, bool? isLdapEnabled, bool? isCoolAccessEnabled, int? coolnessPeriod, CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy, CoolAccessTieringPolicy? coolAccessTieringPolicy, string unixPermissions, int? cloneProgress, NetAppFileAccessLog? fileAccessLogs, NetAppAvsDataStore? avsDataStore, IEnumerable dataStoreResourceId, bool? isDefaultQuotaEnabled, long? defaultUserQuotaInKiBs, long? defaultGroupQuotaInKiBs, long? maximumNumberOfFiles, string volumeGroupName, ResourceIdentifier capacityPoolResourceId, ResourceIdentifier proximityPlacementGroupId, string t2Network, string volumeSpecName, bool? isEncrypted, IEnumerable placementRules, EnableNetAppSubvolume? enableSubvolumes, string provisionedAvailabilityZone, bool? isLargeVolume, ResourceIdentifier originatingResourceId, long? inheritedSizeInBytes) + { + return NetAppVolumeData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, etag: etag, zones: zones, fileSystemId: fileSystemId, creationToken: creationToken, serviceLevel: serviceLevel, usageThreshold: usageThreshold, exportRules: exportRules, protocolTypes: protocolTypes, provisioningState: provisioningState, snapshotId: snapshotId, deleteBaseSnapshot: deleteBaseSnapshot, backupId: backupId, baremetalTenantId: baremetalTenantId, subnetId: subnetId, networkFeatures: networkFeatures, effectiveNetworkFeatures: effectiveNetworkFeatures, networkSiblingSetId: networkSiblingSetId, storageToNetworkProximity: storageToNetworkProximity, mountTargets: mountTargets, volumeType: volumeType, dataProtection: dataProtection, acceptGrowCapacityPoolForShortTermCloneSplit: acceptGrowCapacityPoolForShortTermCloneSplit, isRestoring: isRestoring, isSnapshotDirectoryVisible: isSnapshotDirectoryVisible, isKerberosEnabled: isKerberosEnabled, securityStyle: securityStyle, isSmbEncryptionEnabled: isSmbEncryptionEnabled, smbAccessBasedEnumeration: smbAccessBasedEnumeration, smbNonBrowsable: smbNonBrowsable, isSmbContinuouslyAvailable: isSmbContinuouslyAvailable, throughputMibps: throughputMibps, actualThroughputMibps: actualThroughputMibps, encryptionKeySource: encryptionKeySource, keyVaultPrivateEndpointResourceId: keyVaultPrivateEndpointResourceId, isLdapEnabled: isLdapEnabled, ldapServerType: default, isCoolAccessEnabled: isCoolAccessEnabled, coolnessPeriod: coolnessPeriod, coolAccessRetrievalPolicy: coolAccessRetrievalPolicy, coolAccessTieringPolicy: coolAccessTieringPolicy, unixPermissions: unixPermissions, cloneProgress: cloneProgress, fileAccessLogs: fileAccessLogs, avsDataStore: avsDataStore, dataStoreResourceId: dataStoreResourceId, isDefaultQuotaEnabled: isDefaultQuotaEnabled, defaultUserQuotaInKiBs: defaultUserQuotaInKiBs, defaultGroupQuotaInKiBs: defaultGroupQuotaInKiBs, maximumNumberOfFiles: maximumNumberOfFiles, volumeGroupName: volumeGroupName, capacityPoolResourceId: capacityPoolResourceId, proximityPlacementGroupId: proximityPlacementGroupId, t2Network: t2Network, volumeSpecName: volumeSpecName, isEncrypted: isEncrypted, placementRules: placementRules, enableSubvolumes: enableSubvolumes, provisionedAvailabilityZone: provisionedAvailabilityZone, isLargeVolume: isLargeVolume, largeVolumeType: default, originatingResourceId: originatingResourceId, inheritedSizeInBytes: inheritedSizeInBytes, language: default, breakthroughMode: default); + } + + /// Initializes a new instance of . + /// Id. + /// Indicates whether the local volume is the source or destination for the Volume Replication. + /// Schedule. + /// The resource ID of the remote volume. Required for cross region and cross zone replication. + /// The full path to a volume that is to be migrated into ANF. Required for Migration volumes. + /// The remote region for the other end of the Volume Replication. + /// A list of destination replications. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static NetAppReplicationObject NetAppReplicationObject(string replicationId, NetAppEndpointType? endpointType, NetAppReplicationSchedule? replicationSchedule, ResourceIdentifier remoteVolumeResourceId, RemotePath remotePath, string remoteVolumeRegion, IEnumerable destinationReplications) + { + return NetAppReplicationObject(replicationId: replicationId, endpointType: endpointType, replicationSchedule: replicationSchedule, remoteVolumeResourceId: remoteVolumeResourceId, remotePath: remotePath, remoteVolumeRegion: remoteVolumeRegion, destinationReplications: destinationReplications, externalReplicationSetupStatus: default, externalReplicationSetupInfo: default, mirrorState: default, relationshipStatus: default); + } + + /// Initializes a new instance of . + /// Resource Id. + /// Resource name. + /// Resource type. + /// Resource tags. + /// Availability Zone. + /// Unique FileSystem Identifier. + /// A unique file path for the volume. Used when creating mount targets. + /// The service level of the file system. + /// 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. + /// Set of export policy rules. + /// Set of protocol types, default NFSv3, CIFS for SMB protocol. + /// Azure lifecycle management. + /// Resource identifier used to identify the Snapshot. + /// If enabled (true) the snapshot the volume was created from will be automatically deleted after the volume create operation has finished. Defaults to false. + /// Resource identifier used to identify the Backup. + /// Unique Baremetal Tenant Identifier. + /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. + /// The original value of the network features type available to the volume at the time it was created. + /// The effective value of the network features type available to the volume, or current effective state of update. + /// Network Sibling Set ID for the the group of volumes sharing networking resources. + /// Provides storage to network proximity information for the volume. + /// List of mount targets. + /// What type of volume is this. For destination volumes in Cross Region Replication, set type to DataProtection. For creating clone volume, set type to ShortTermClone. + /// DataProtection type volumes include an object containing details of the replication. + /// While auto splitting the short term clone volume, if the parent pool does not have enough space to accommodate the volume after split, it will be automatically resized, which will lead to increased billing. To accept capacity pool size auto grow and create a short term clone volume, set the property as accepted. + /// Restoring. + /// If enabled (true) the volume will contain a read-only snapshot directory which provides access to each of the volume's snapshots (defaults to true). + /// Describe if a volume is KerberosEnabled. To be use with swagger version 2020-05-01 or later. + /// The security style of volume, default unix, defaults to ntfs for dual protocol or CIFS protocol. + /// Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol volume. To be used with swagger version 2020-08-01 or later. + /// Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume. + /// Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. + /// Enables continuously available share property for smb volume. Only applicable for SMB volume. + /// Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for manual qosType volume. + /// Actual throughput in MiB/s for auto qosType volumes calculated based on size and serviceLevel. + /// Source of key used to encrypt data in volume. Applicable if NetApp account has encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault'. + /// The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + /// Specifies whether LDAP is enabled or not for a given NFS volume. + /// Specifies whether Cool Access(tiering) is enabled for the volume. + /// Specifies the number of days after which data that is not accessed by clients will be tiered. + /// + /// coolAccessRetrievalPolicy determines the data retrieval behavior from the cool tier to standard storage based on the read pattern for cool access enabled volumes. The possible values for this field are: + /// Default - Data will be pulled from cool tier to standard storage on random reads. This policy is the default. + /// OnRead - All client-driven data read is pulled from cool tier to standard storage on both sequential and random reads. + /// Never - No client-driven data is pulled from cool tier to standard storage. + /// + /// coolAccessTieringPolicy determines which cold data blocks are moved to cool tier. The possible values for this field are: Auto - Moves cold user data blocks in both the Snapshot copies and the active file system to the cool tier tier. This policy is the default. SnapshotOnly - Moves user data blocks of the Volume Snapshot copies that are not associated with the active file system to the cool tier. + /// UNIX permissions for NFS volume accepted in octal 4 digit format. First digit selects the set user ID(4), set group ID (2) and sticky (1) attributes. Second digit selects permission for the owner of the file: read (4), write (2) and execute (1). Third selects permissions for other users in the same group. the fourth for other users not in the group. 0755 - gives read/write/execute permissions to owner and read/execute to group and other users. + /// When a volume is being restored from another volume's snapshot, will show the percentage completion of this cloning process. When this value is empty/null there is no cloning process currently happening on this volume. This value will update every 5 minutes during cloning. + /// Flag indicating whether file access logs are enabled for the volume, based on active diagnostic settings present on the volume. + /// Specifies whether the volume is enabled for Azure VMware Solution (AVS) datastore purpose. + /// Data store resource unique identifier. + /// Specifies if default quota is enabled for the volume. + /// Default user quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies . + /// Default group quota for volume in KiBs. If isDefaultQuotaEnabled is set, the minimum value of 4 KiBs applies. + /// Maximum number of files allowed. Needs a service request in order to be changed. Only allowed to be changed if volume quota is more than 4TiB. + /// Volume Group Name. + /// Pool Resource Id used in case of creating a volume through volume group. + /// Proximity placement group associated with the volume. + /// T2 network information. + /// Volume spec name is the application specific designation or identifier for the particular volume in a volume group for e.g. data, log. + /// Specifies if the volume is encrypted or not. Only available on volumes created or updated after 2022-01-01. + /// Application specific placement rules for the particular volume. + /// Flag indicating whether subvolume operations are enabled on the volume. + /// The availability zone where the volume is provisioned. This refers to the logical availability zone where the volume resides. + /// Specifies whether volume is a Large Volume or Regular Volume. + /// Id of the snapshot or backup that the volume is restored from. + /// Space shared by short term clone volume with parent volume in bytes. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static NetAppVolumeGroupVolume NetAppVolumeGroupVolume(ResourceIdentifier id, string name, ResourceType? resourceType, IDictionary tags, IEnumerable zones, Guid? fileSystemId, string creationToken, NetAppFileServiceLevel? serviceLevel, long usageThreshold, IEnumerable exportRules, IEnumerable protocolTypes, string provisioningState, string snapshotId, bool? deleteBaseSnapshot, string backupId, string baremetalTenantId, ResourceIdentifier subnetId, NetAppNetworkFeature? networkFeatures, NetAppNetworkFeature? effectiveNetworkFeatures, Guid? networkSiblingSetId, NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity, IEnumerable mountTargets, string volumeType, NetAppVolumeDataProtection dataProtection, AcceptGrowCapacityPoolForShortTermCloneSplit? acceptGrowCapacityPoolForShortTermCloneSplit, bool? isRestoring, bool? isSnapshotDirectoryVisible, bool? isKerberosEnabled, NetAppVolumeSecurityStyle? securityStyle, bool? isSmbEncryptionEnabled, SmbAccessBasedEnumeration? smbAccessBasedEnumeration, SmbNonBrowsable? smbNonBrowsable, bool? isSmbContinuouslyAvailable, float? throughputMibps, float? actualThroughputMibps, NetAppEncryptionKeySource? encryptionKeySource, ResourceIdentifier keyVaultPrivateEndpointResourceId, bool? isLdapEnabled, bool? isCoolAccessEnabled, int? coolnessPeriod, CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy, CoolAccessTieringPolicy? coolAccessTieringPolicy, string unixPermissions, int? cloneProgress, NetAppFileAccessLog? fileAccessLogs, NetAppAvsDataStore? avsDataStore, IEnumerable dataStoreResourceId, bool? isDefaultQuotaEnabled, long? defaultUserQuotaInKiBs, long? defaultGroupQuotaInKiBs, long? maximumNumberOfFiles, string volumeGroupName, ResourceIdentifier capacityPoolResourceId, ResourceIdentifier proximityPlacementGroupId, string t2Network, string volumeSpecName, bool? isEncrypted, IEnumerable placementRules, EnableNetAppSubvolume? enableSubvolumes, string provisionedAvailabilityZone, bool? isLargeVolume, ResourceIdentifier originatingResourceId, long? inheritedSizeInBytes) + { + return NetAppVolumeGroupVolume(id: id, name: name, resourceType: resourceType, tags: tags, zones: zones, fileSystemId: fileSystemId, creationToken: creationToken, serviceLevel: serviceLevel, usageThreshold: usageThreshold, exportRules: exportRules, protocolTypes: protocolTypes, provisioningState: provisioningState, snapshotId: snapshotId, deleteBaseSnapshot: deleteBaseSnapshot, backupId: backupId, baremetalTenantId: baremetalTenantId, subnetId: subnetId, networkFeatures: networkFeatures, effectiveNetworkFeatures: effectiveNetworkFeatures, networkSiblingSetId: networkSiblingSetId, storageToNetworkProximity: storageToNetworkProximity, mountTargets: mountTargets, volumeType: volumeType, dataProtection: dataProtection, acceptGrowCapacityPoolForShortTermCloneSplit: acceptGrowCapacityPoolForShortTermCloneSplit, isRestoring: isRestoring, isSnapshotDirectoryVisible: isSnapshotDirectoryVisible, isKerberosEnabled: isKerberosEnabled, securityStyle: securityStyle, isSmbEncryptionEnabled: isSmbEncryptionEnabled, smbAccessBasedEnumeration: smbAccessBasedEnumeration, smbNonBrowsable: smbNonBrowsable, isSmbContinuouslyAvailable: isSmbContinuouslyAvailable, throughputMibps: throughputMibps, actualThroughputMibps: actualThroughputMibps, encryptionKeySource: encryptionKeySource, keyVaultPrivateEndpointResourceId: keyVaultPrivateEndpointResourceId, isLdapEnabled: isLdapEnabled, ldapServerType: default, isCoolAccessEnabled: isCoolAccessEnabled, coolnessPeriod: coolnessPeriod, coolAccessRetrievalPolicy: coolAccessRetrievalPolicy, coolAccessTieringPolicy: coolAccessTieringPolicy, unixPermissions: unixPermissions, cloneProgress: cloneProgress, fileAccessLogs: fileAccessLogs, avsDataStore: avsDataStore, dataStoreResourceId: dataStoreResourceId, isDefaultQuotaEnabled: isDefaultQuotaEnabled, defaultUserQuotaInKiBs: defaultUserQuotaInKiBs, defaultGroupQuotaInKiBs: defaultGroupQuotaInKiBs, maximumNumberOfFiles: maximumNumberOfFiles, volumeGroupName: volumeGroupName, capacityPoolResourceId: capacityPoolResourceId, proximityPlacementGroupId: proximityPlacementGroupId, t2Network: t2Network, volumeSpecName: volumeSpecName, isEncrypted: isEncrypted, placementRules: placementRules, enableSubvolumes: enableSubvolumes, provisionedAvailabilityZone: provisionedAvailabilityZone, isLargeVolume: isLargeVolume, largeVolumeType: default, originatingResourceId: originatingResourceId, inheritedSizeInBytes: inheritedSizeInBytes, language: default, breakthroughMode: default); + } + /// Initializes a new instance of . /// UUID v4 used to identify the replication. /// Indicates whether the local volume is the source or destination for the Volume Replication. @@ -1518,7 +2557,7 @@ public static CapacityPoolPatch CapacityPoolPatch(ResourceIdentifier id, string [EditorBrowsable(EditorBrowsableState.Never)] public static NetAppVolumeData NetAppVolumeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, IEnumerable zones, Guid? fileSystemId, string creationToken, NetAppFileServiceLevel? serviceLevel, long usageThreshold, IEnumerable exportRules, IEnumerable protocolTypes, string provisioningState, string snapshotId, bool? deleteBaseSnapshot, string backupId, string baremetalTenantId, ResourceIdentifier subnetId, NetAppNetworkFeature? networkFeatures, NetAppNetworkFeature? effectiveNetworkFeatures, Guid? networkSiblingSetId, NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity, IEnumerable mountTargets, string volumeType, NetAppVolumeDataProtection dataProtection, bool? isRestoring, bool? isSnapshotDirectoryVisible, bool? isKerberosEnabled, NetAppVolumeSecurityStyle? securityStyle, bool? isSmbEncryptionEnabled, SmbAccessBasedEnumeration? smbAccessBasedEnumeration, SmbNonBrowsable? smbNonBrowsable, bool? isSmbContinuouslyAvailable, float? throughputMibps, float? actualThroughputMibps, NetAppEncryptionKeySource? encryptionKeySource, ResourceIdentifier keyVaultPrivateEndpointResourceId, bool? isLdapEnabled, bool? isCoolAccessEnabled, int? coolnessPeriod, CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy, CoolAccessTieringPolicy? coolAccessTieringPolicy, string unixPermissions, int? cloneProgress, NetAppFileAccessLog? fileAccessLogs, NetAppAvsDataStore? avsDataStore, IEnumerable dataStoreResourceId, bool? isDefaultQuotaEnabled, long? defaultUserQuotaInKiBs, long? defaultGroupQuotaInKiBs, long? maximumNumberOfFiles, string volumeGroupName, ResourceIdentifier capacityPoolResourceId, ResourceIdentifier proximityPlacementGroupId, string t2Network, string volumeSpecName, bool? isEncrypted, IEnumerable placementRules, EnableNetAppSubvolume? enableSubvolumes, string provisionedAvailabilityZone, bool? isLargeVolume, ResourceIdentifier originatingResourceId) { - return NetAppVolumeData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, etag: etag, zones: zones, fileSystemId: fileSystemId, creationToken: creationToken, serviceLevel: serviceLevel, usageThreshold: usageThreshold, exportRules: exportRules, protocolTypes: protocolTypes, provisioningState: provisioningState, snapshotId: snapshotId, deleteBaseSnapshot: deleteBaseSnapshot, backupId: backupId, baremetalTenantId: baremetalTenantId, subnetId: subnetId, networkFeatures: networkFeatures, effectiveNetworkFeatures: effectiveNetworkFeatures, networkSiblingSetId: networkSiblingSetId, storageToNetworkProximity: storageToNetworkProximity, mountTargets: mountTargets, volumeType: volumeType, dataProtection: dataProtection, acceptGrowCapacityPoolForShortTermCloneSplit: default, isRestoring: isRestoring, isSnapshotDirectoryVisible: isSnapshotDirectoryVisible, isKerberosEnabled: isKerberosEnabled, securityStyle: securityStyle, isSmbEncryptionEnabled: isSmbEncryptionEnabled, smbAccessBasedEnumeration: smbAccessBasedEnumeration, smbNonBrowsable: smbNonBrowsable, isSmbContinuouslyAvailable: isSmbContinuouslyAvailable, throughputMibps: throughputMibps, actualThroughputMibps: actualThroughputMibps, encryptionKeySource: encryptionKeySource, keyVaultPrivateEndpointResourceId: keyVaultPrivateEndpointResourceId, isLdapEnabled: isLdapEnabled, isCoolAccessEnabled: isCoolAccessEnabled, coolnessPeriod: coolnessPeriod, coolAccessRetrievalPolicy: coolAccessRetrievalPolicy, coolAccessTieringPolicy: coolAccessTieringPolicy, unixPermissions: unixPermissions, cloneProgress: cloneProgress, fileAccessLogs: fileAccessLogs, avsDataStore: avsDataStore, dataStoreResourceId: dataStoreResourceId, isDefaultQuotaEnabled: isDefaultQuotaEnabled, defaultUserQuotaInKiBs: defaultUserQuotaInKiBs, defaultGroupQuotaInKiBs: defaultGroupQuotaInKiBs, maximumNumberOfFiles: maximumNumberOfFiles, volumeGroupName: volumeGroupName, capacityPoolResourceId: capacityPoolResourceId, proximityPlacementGroupId: proximityPlacementGroupId, t2Network: t2Network, volumeSpecName: volumeSpecName, isEncrypted: isEncrypted, placementRules: placementRules, enableSubvolumes: enableSubvolumes, provisionedAvailabilityZone: provisionedAvailabilityZone, isLargeVolume: isLargeVolume, originatingResourceId: originatingResourceId, inheritedSizeInBytes: default); + return NetAppVolumeData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, etag: etag, zones: zones, fileSystemId: fileSystemId, creationToken: creationToken, serviceLevel: serviceLevel, usageThreshold: usageThreshold, exportRules: exportRules, protocolTypes: protocolTypes, provisioningState: provisioningState, snapshotId: snapshotId, deleteBaseSnapshot: deleteBaseSnapshot, backupId: backupId, baremetalTenantId: baremetalTenantId, subnetId: subnetId, networkFeatures: networkFeatures, effectiveNetworkFeatures: effectiveNetworkFeatures, networkSiblingSetId: networkSiblingSetId, storageToNetworkProximity: storageToNetworkProximity, mountTargets: mountTargets, volumeType: volumeType, dataProtection: dataProtection, acceptGrowCapacityPoolForShortTermCloneSplit: default, isRestoring: isRestoring, isSnapshotDirectoryVisible: isSnapshotDirectoryVisible, isKerberosEnabled: isKerberosEnabled, securityStyle: securityStyle, isSmbEncryptionEnabled: isSmbEncryptionEnabled, smbAccessBasedEnumeration: smbAccessBasedEnumeration, smbNonBrowsable: smbNonBrowsable, isSmbContinuouslyAvailable: isSmbContinuouslyAvailable, throughputMibps: throughputMibps, actualThroughputMibps: actualThroughputMibps, encryptionKeySource: encryptionKeySource, keyVaultPrivateEndpointResourceId: keyVaultPrivateEndpointResourceId, isLdapEnabled: isLdapEnabled, ldapServerType: default, isCoolAccessEnabled: isCoolAccessEnabled, coolnessPeriod: coolnessPeriod, coolAccessRetrievalPolicy: coolAccessRetrievalPolicy, coolAccessTieringPolicy: coolAccessTieringPolicy, unixPermissions: unixPermissions, cloneProgress: cloneProgress, fileAccessLogs: fileAccessLogs, avsDataStore: avsDataStore, dataStoreResourceId: dataStoreResourceId, isDefaultQuotaEnabled: isDefaultQuotaEnabled, defaultUserQuotaInKiBs: defaultUserQuotaInKiBs, defaultGroupQuotaInKiBs: defaultGroupQuotaInKiBs, maximumNumberOfFiles: maximumNumberOfFiles, volumeGroupName: volumeGroupName, capacityPoolResourceId: capacityPoolResourceId, proximityPlacementGroupId: proximityPlacementGroupId, t2Network: t2Network, volumeSpecName: volumeSpecName, isEncrypted: isEncrypted, placementRules: placementRules, enableSubvolumes: enableSubvolumes, provisionedAvailabilityZone: provisionedAvailabilityZone, isLargeVolume: isLargeVolume, largeVolumeType: default, originatingResourceId: originatingResourceId, inheritedSizeInBytes: default, language: default, breakthroughMode: default); } /// Initializes a new instance of . @@ -1592,7 +2631,7 @@ public static NetAppVolumeData NetAppVolumeData(ResourceIdentifier id, string na [EditorBrowsable(EditorBrowsableState.Never)] public static NetAppVolumeGroupVolume NetAppVolumeGroupVolume(ResourceIdentifier id, string name, ResourceType? resourceType, IDictionary tags, IEnumerable zones, Guid? fileSystemId, string creationToken, NetAppFileServiceLevel? serviceLevel, long usageThreshold, IEnumerable exportRules, IEnumerable protocolTypes, string provisioningState, string snapshotId, bool? deleteBaseSnapshot, string backupId, string baremetalTenantId, ResourceIdentifier subnetId, NetAppNetworkFeature? networkFeatures, NetAppNetworkFeature? effectiveNetworkFeatures, Guid? networkSiblingSetId, NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity, IEnumerable mountTargets, string volumeType, NetAppVolumeDataProtection dataProtection, bool? isRestoring, bool? isSnapshotDirectoryVisible, bool? isKerberosEnabled, NetAppVolumeSecurityStyle? securityStyle, bool? isSmbEncryptionEnabled, SmbAccessBasedEnumeration? smbAccessBasedEnumeration, SmbNonBrowsable? smbNonBrowsable, bool? isSmbContinuouslyAvailable, float? throughputMibps, float? actualThroughputMibps, NetAppEncryptionKeySource? encryptionKeySource, ResourceIdentifier keyVaultPrivateEndpointResourceId, bool? isLdapEnabled, bool? isCoolAccessEnabled, int? coolnessPeriod, CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy, CoolAccessTieringPolicy? coolAccessTieringPolicy, string unixPermissions, int? cloneProgress, NetAppFileAccessLog? fileAccessLogs, NetAppAvsDataStore? avsDataStore, IEnumerable dataStoreResourceId, bool? isDefaultQuotaEnabled, long? defaultUserQuotaInKiBs, long? defaultGroupQuotaInKiBs, long? maximumNumberOfFiles, string volumeGroupName, ResourceIdentifier capacityPoolResourceId, ResourceIdentifier proximityPlacementGroupId, string t2Network, string volumeSpecName, bool? isEncrypted, IEnumerable placementRules, EnableNetAppSubvolume? enableSubvolumes, string provisionedAvailabilityZone, bool? isLargeVolume, ResourceIdentifier originatingResourceId) { - return NetAppVolumeGroupVolume(id: id, name: name, resourceType: resourceType, tags: tags, zones: zones, fileSystemId: fileSystemId, creationToken: creationToken, serviceLevel: serviceLevel, usageThreshold: usageThreshold, exportRules: exportRules, protocolTypes: protocolTypes, provisioningState: provisioningState, snapshotId: snapshotId, deleteBaseSnapshot: deleteBaseSnapshot, backupId: backupId, baremetalTenantId: baremetalTenantId, subnetId: subnetId, networkFeatures: networkFeatures, effectiveNetworkFeatures: effectiveNetworkFeatures, networkSiblingSetId: networkSiblingSetId, storageToNetworkProximity: storageToNetworkProximity, mountTargets: mountTargets, volumeType: volumeType, dataProtection: dataProtection, acceptGrowCapacityPoolForShortTermCloneSplit: default, isRestoring: isRestoring, isSnapshotDirectoryVisible: isSnapshotDirectoryVisible, isKerberosEnabled: isKerberosEnabled, securityStyle: securityStyle, isSmbEncryptionEnabled: isSmbEncryptionEnabled, smbAccessBasedEnumeration: smbAccessBasedEnumeration, smbNonBrowsable: smbNonBrowsable, isSmbContinuouslyAvailable: isSmbContinuouslyAvailable, throughputMibps: throughputMibps, actualThroughputMibps: actualThroughputMibps, encryptionKeySource: encryptionKeySource, keyVaultPrivateEndpointResourceId: keyVaultPrivateEndpointResourceId, isLdapEnabled: isLdapEnabled, isCoolAccessEnabled: isCoolAccessEnabled, coolnessPeriod: coolnessPeriod, coolAccessRetrievalPolicy: coolAccessRetrievalPolicy, coolAccessTieringPolicy: coolAccessTieringPolicy, unixPermissions: unixPermissions, cloneProgress: cloneProgress, fileAccessLogs: fileAccessLogs, avsDataStore: avsDataStore, dataStoreResourceId: dataStoreResourceId, isDefaultQuotaEnabled: isDefaultQuotaEnabled, defaultUserQuotaInKiBs: defaultUserQuotaInKiBs, defaultGroupQuotaInKiBs: defaultGroupQuotaInKiBs, maximumNumberOfFiles: maximumNumberOfFiles, volumeGroupName: volumeGroupName, capacityPoolResourceId: capacityPoolResourceId, proximityPlacementGroupId: proximityPlacementGroupId, t2Network: t2Network, volumeSpecName: volumeSpecName, isEncrypted: isEncrypted, placementRules: placementRules, enableSubvolumes: enableSubvolumes, provisionedAvailabilityZone: provisionedAvailabilityZone, isLargeVolume: isLargeVolume, originatingResourceId: originatingResourceId, inheritedSizeInBytes: default); + return NetAppVolumeGroupVolume(id: id, name: name, resourceType: resourceType, tags: tags, zones: zones, fileSystemId: fileSystemId, creationToken: creationToken, serviceLevel: serviceLevel, usageThreshold: usageThreshold, exportRules: exportRules, protocolTypes: protocolTypes, provisioningState: provisioningState, snapshotId: snapshotId, deleteBaseSnapshot: deleteBaseSnapshot, backupId: backupId, baremetalTenantId: baremetalTenantId, subnetId: subnetId, networkFeatures: networkFeatures, effectiveNetworkFeatures: effectiveNetworkFeatures, networkSiblingSetId: networkSiblingSetId, storageToNetworkProximity: storageToNetworkProximity, mountTargets: mountTargets, volumeType: volumeType, dataProtection: dataProtection, acceptGrowCapacityPoolForShortTermCloneSplit: default, isRestoring: isRestoring, isSnapshotDirectoryVisible: isSnapshotDirectoryVisible, isKerberosEnabled: isKerberosEnabled, securityStyle: securityStyle, isSmbEncryptionEnabled: isSmbEncryptionEnabled, smbAccessBasedEnumeration: smbAccessBasedEnumeration, smbNonBrowsable: smbNonBrowsable, isSmbContinuouslyAvailable: isSmbContinuouslyAvailable, throughputMibps: throughputMibps, actualThroughputMibps: actualThroughputMibps, encryptionKeySource: encryptionKeySource, keyVaultPrivateEndpointResourceId: keyVaultPrivateEndpointResourceId, isLdapEnabled: isLdapEnabled, ldapServerType: default, isCoolAccessEnabled: isCoolAccessEnabled, coolnessPeriod: coolnessPeriod, coolAccessRetrievalPolicy: coolAccessRetrievalPolicy, coolAccessTieringPolicy: coolAccessTieringPolicy, unixPermissions: unixPermissions, cloneProgress: cloneProgress, fileAccessLogs: fileAccessLogs, avsDataStore: avsDataStore, dataStoreResourceId: dataStoreResourceId, isDefaultQuotaEnabled: isDefaultQuotaEnabled, defaultUserQuotaInKiBs: defaultUserQuotaInKiBs, defaultGroupQuotaInKiBs: defaultGroupQuotaInKiBs, maximumNumberOfFiles: maximumNumberOfFiles, volumeGroupName: volumeGroupName, capacityPoolResourceId: capacityPoolResourceId, proximityPlacementGroupId: proximityPlacementGroupId, t2Network: t2Network, volumeSpecName: volumeSpecName, isEncrypted: isEncrypted, placementRules: placementRules, enableSubvolumes: enableSubvolumes, provisionedAvailabilityZone: provisionedAvailabilityZone, isLargeVolume: isLargeVolume, largeVolumeType: default, originatingResourceId: originatingResourceId, inheritedSizeInBytes: default, language: default, breakthroughMode: default); } /// Initializes a new instance of . @@ -1612,7 +2651,7 @@ public static NetAppVolumeGroupVolume NetAppVolumeGroupVolume(ResourceIdentifier [EditorBrowsable(EditorBrowsableState.Never)] public static NetAppAccountData NetAppAccountData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, ManagedServiceIdentity identity, string provisioningState, IEnumerable activeDirectories, NetAppAccountEncryption encryption, bool? disableShowmount) { - return NetAppAccountData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, etag: etag, identity: identity, provisioningState: provisioningState, activeDirectories: activeDirectories, encryption: encryption, disableShowmount: disableShowmount, nfsV4IdDomain: default, multiAdStatus: default); + return NetAppAccountData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, etag: etag, identity: identity, provisioningState: provisioningState, activeDirectories: activeDirectories, encryption: encryption, disableShowmount: disableShowmount, nfsV4IdDomain: default, multiAdStatus: default, ldapConfiguration: default); } /// Initializes a new instance of . @@ -1641,7 +2680,7 @@ public static NetAppEncryptionIdentity NetAppEncryptionIdentity(string principal [EditorBrowsable(EditorBrowsableState.Never)] public static NetAppAccountPatch NetAppAccountPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string provisioningState, IEnumerable activeDirectories, NetAppAccountEncryption encryption, bool? disableShowmount) { - return NetAppAccountPatch(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, identity: identity, provisioningState: provisioningState, activeDirectories: activeDirectories, encryption: encryption, disableShowmount: disableShowmount, nfsV4IdDomain: default, multiAdStatus: default); + return NetAppAccountPatch(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, identity: identity, provisioningState: provisioningState, activeDirectories: activeDirectories, encryption: encryption, disableShowmount: disableShowmount, nfsV4IdDomain: default, multiAdStatus: default, ldapConfiguration: default); } /// Initializes a new instance of . @@ -1655,7 +2694,7 @@ public static NetAppAccountPatch NetAppAccountPatch(ResourceIdentifier id, strin [EditorBrowsable(EditorBrowsableState.Never)] public static NetAppReplicationObject NetAppReplicationObject(string replicationId, NetAppEndpointType? endpointType, NetAppReplicationSchedule? replicationSchedule, ResourceIdentifier remoteVolumeResourceId, RemotePath remotePath, string remoteVolumeRegion) { - return NetAppReplicationObject(replicationId: replicationId, endpointType: endpointType, replicationSchedule: replicationSchedule, remoteVolumeResourceId: remoteVolumeResourceId, remotePath: remotePath, remoteVolumeRegion: remoteVolumeRegion, destinationReplications: default); + return NetAppReplicationObject(replicationId: replicationId, endpointType: endpointType, replicationSchedule: replicationSchedule, remoteVolumeResourceId: remoteVolumeResourceId, remotePath: remotePath, remoteVolumeRegion: remoteVolumeRegion, destinationReplications: default, externalReplicationSetupStatus: default, externalReplicationSetupInfo: default, mirrorState: default, relationshipStatus: default); } /// Initializes a new instance of . @@ -1743,7 +2782,7 @@ public static NetAppBackupData NetAppBackupData(ResourceIdentifier id, string na [EditorBrowsable(EditorBrowsableState.Never)] public static NetAppVolumeGroupVolume NetAppVolumeGroupVolume(ResourceIdentifier id, string name, ResourceType? resourceType, IDictionary tags, Guid? fileSystemId, string creationToken, NetAppFileServiceLevel? serviceLevel, long usageThreshold, IEnumerable exportRules, IEnumerable protocolTypes, string provisioningState, string snapshotId, bool? deleteBaseSnapshot, string backupId, string baremetalTenantId, ResourceIdentifier subnetId, NetAppNetworkFeature? networkFeatures, Guid? networkSiblingSetId, NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity, IEnumerable mountTargets, string volumeType, NetAppVolumeDataProtection dataProtection, bool? isRestoring, bool? isSnapshotDirectoryVisible, bool? isKerberosEnabled, NetAppVolumeSecurityStyle? securityStyle, bool? isSmbEncryptionEnabled, SmbAccessBasedEnumeration? smbAccessBasedEnumeration, SmbNonBrowsable? smbNonBrowsable, bool? isSmbContinuouslyAvailable, float? throughputMibps, float? actualThroughputMibps, NetAppEncryptionKeySource? encryptionKeySource, ResourceIdentifier keyVaultPrivateEndpointResourceId, bool? isLdapEnabled, bool? isCoolAccessEnabled, int? coolnessPeriod, string unixPermissions, int? cloneProgress, NetAppFileAccessLog? fileAccessLogs, NetAppAvsDataStore? avsDataStore, IEnumerable dataStoreResourceId, bool? isDefaultQuotaEnabled, long? defaultUserQuotaInKiBs, long? defaultGroupQuotaInKiBs, long? maximumNumberOfFiles, string volumeGroupName, ResourceIdentifier capacityPoolResourceId, ResourceIdentifier proximityPlacementGroupId, string t2Network, string volumeSpecName, bool? isEncrypted, IEnumerable placementRules, EnableNetAppSubvolume? enableSubvolumes, string provisionedAvailabilityZone, bool? isLargeVolume, ResourceIdentifier originatingResourceId) { - return NetAppVolumeGroupVolume(id: id, name: name, resourceType: resourceType, tags: tags, zones: default, fileSystemId: fileSystemId, creationToken: creationToken, serviceLevel: serviceLevel, usageThreshold: usageThreshold, exportRules: exportRules, protocolTypes: protocolTypes, provisioningState: provisioningState, snapshotId: snapshotId, deleteBaseSnapshot: deleteBaseSnapshot, backupId: backupId, baremetalTenantId: baremetalTenantId, subnetId: subnetId, networkFeatures: networkFeatures, effectiveNetworkFeatures: default, networkSiblingSetId: networkSiblingSetId, storageToNetworkProximity: storageToNetworkProximity, mountTargets: mountTargets, volumeType: volumeType, dataProtection: dataProtection, acceptGrowCapacityPoolForShortTermCloneSplit: default, isRestoring: isRestoring, isSnapshotDirectoryVisible: isSnapshotDirectoryVisible, isKerberosEnabled: isKerberosEnabled, securityStyle: securityStyle, isSmbEncryptionEnabled: isSmbEncryptionEnabled, smbAccessBasedEnumeration: smbAccessBasedEnumeration, smbNonBrowsable: smbNonBrowsable, isSmbContinuouslyAvailable: isSmbContinuouslyAvailable, throughputMibps: throughputMibps, actualThroughputMibps: actualThroughputMibps, encryptionKeySource: encryptionKeySource, keyVaultPrivateEndpointResourceId: keyVaultPrivateEndpointResourceId, isLdapEnabled: isLdapEnabled, isCoolAccessEnabled: isCoolAccessEnabled, coolnessPeriod: coolnessPeriod, coolAccessRetrievalPolicy: default, coolAccessTieringPolicy: default, unixPermissions: unixPermissions, cloneProgress: cloneProgress, fileAccessLogs: fileAccessLogs, avsDataStore: avsDataStore, dataStoreResourceId: dataStoreResourceId, isDefaultQuotaEnabled: isDefaultQuotaEnabled, defaultUserQuotaInKiBs: defaultUserQuotaInKiBs, defaultGroupQuotaInKiBs: defaultGroupQuotaInKiBs, maximumNumberOfFiles: maximumNumberOfFiles, volumeGroupName: volumeGroupName, capacityPoolResourceId: capacityPoolResourceId, proximityPlacementGroupId: proximityPlacementGroupId, t2Network: t2Network, volumeSpecName: volumeSpecName, isEncrypted: isEncrypted, placementRules: placementRules, enableSubvolumes: enableSubvolumes, provisionedAvailabilityZone: provisionedAvailabilityZone, isLargeVolume: isLargeVolume, originatingResourceId: originatingResourceId, inheritedSizeInBytes: default); + return NetAppVolumeGroupVolume(id: id, name: name, resourceType: resourceType, tags: tags, zones: default, fileSystemId: fileSystemId, creationToken: creationToken, serviceLevel: serviceLevel, usageThreshold: usageThreshold, exportRules: exportRules, protocolTypes: protocolTypes, provisioningState: provisioningState, snapshotId: snapshotId, deleteBaseSnapshot: deleteBaseSnapshot, backupId: backupId, baremetalTenantId: baremetalTenantId, subnetId: subnetId, networkFeatures: networkFeatures, effectiveNetworkFeatures: default, networkSiblingSetId: networkSiblingSetId, storageToNetworkProximity: storageToNetworkProximity, mountTargets: mountTargets, volumeType: volumeType, dataProtection: dataProtection, acceptGrowCapacityPoolForShortTermCloneSplit: default, isRestoring: isRestoring, isSnapshotDirectoryVisible: isSnapshotDirectoryVisible, isKerberosEnabled: isKerberosEnabled, securityStyle: securityStyle, isSmbEncryptionEnabled: isSmbEncryptionEnabled, smbAccessBasedEnumeration: smbAccessBasedEnumeration, smbNonBrowsable: smbNonBrowsable, isSmbContinuouslyAvailable: isSmbContinuouslyAvailable, throughputMibps: throughputMibps, actualThroughputMibps: actualThroughputMibps, encryptionKeySource: encryptionKeySource, keyVaultPrivateEndpointResourceId: keyVaultPrivateEndpointResourceId, isLdapEnabled: isLdapEnabled, ldapServerType: default, isCoolAccessEnabled: isCoolAccessEnabled, coolnessPeriod: coolnessPeriod, coolAccessRetrievalPolicy: default, coolAccessTieringPolicy: default, unixPermissions: unixPermissions, cloneProgress: cloneProgress, fileAccessLogs: fileAccessLogs, avsDataStore: avsDataStore, dataStoreResourceId: dataStoreResourceId, isDefaultQuotaEnabled: isDefaultQuotaEnabled, defaultUserQuotaInKiBs: defaultUserQuotaInKiBs, defaultGroupQuotaInKiBs: defaultGroupQuotaInKiBs, maximumNumberOfFiles: maximumNumberOfFiles, volumeGroupName: volumeGroupName, capacityPoolResourceId: capacityPoolResourceId, proximityPlacementGroupId: proximityPlacementGroupId, t2Network: t2Network, volumeSpecName: volumeSpecName, isEncrypted: isEncrypted, placementRules: placementRules, enableSubvolumes: enableSubvolumes, provisionedAvailabilityZone: provisionedAvailabilityZone, isLargeVolume: isLargeVolume, largeVolumeType: default, originatingResourceId: originatingResourceId, inheritedSizeInBytes: default, language: default, breakthroughMode: default); } /// Initializes a new instance of . @@ -1815,7 +2854,7 @@ public static NetAppVolumeGroupVolume NetAppVolumeGroupVolume(ResourceIdentifier [EditorBrowsable(EditorBrowsableState.Never)] public static NetAppVolumeGroupVolume NetAppVolumeGroupVolume(ResourceIdentifier id, string name, ResourceType? resourceType, IDictionary tags, IEnumerable zones, Guid? fileSystemId, string creationToken, NetAppFileServiceLevel? serviceLevel, long usageThreshold, IEnumerable exportRules, IEnumerable protocolTypes, string provisioningState, string snapshotId, bool? deleteBaseSnapshot, string backupId, string baremetalTenantId, ResourceIdentifier subnetId, NetAppNetworkFeature? networkFeatures, Guid? networkSiblingSetId, NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity, IEnumerable mountTargets, string volumeType, NetAppVolumeDataProtection dataProtection, bool? isRestoring, bool? isSnapshotDirectoryVisible, bool? isKerberosEnabled, NetAppVolumeSecurityStyle? securityStyle, bool? isSmbEncryptionEnabled, SmbAccessBasedEnumeration? smbAccessBasedEnumeration, SmbNonBrowsable? smbNonBrowsable, bool? isSmbContinuouslyAvailable, float? throughputMibps, float? actualThroughputMibps, NetAppEncryptionKeySource? encryptionKeySource, ResourceIdentifier keyVaultPrivateEndpointResourceId, bool? isLdapEnabled, bool? isCoolAccessEnabled, int? coolnessPeriod, CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy, string unixPermissions, int? cloneProgress, NetAppFileAccessLog? fileAccessLogs, NetAppAvsDataStore? avsDataStore, IEnumerable dataStoreResourceId, bool? isDefaultQuotaEnabled, long? defaultUserQuotaInKiBs, long? defaultGroupQuotaInKiBs, long? maximumNumberOfFiles, string volumeGroupName, ResourceIdentifier capacityPoolResourceId, ResourceIdentifier proximityPlacementGroupId, string t2Network, string volumeSpecName, bool? isEncrypted, IEnumerable placementRules, EnableNetAppSubvolume? enableSubvolumes, string provisionedAvailabilityZone, bool? isLargeVolume, ResourceIdentifier originatingResourceId) { - return NetAppVolumeGroupVolume(id: id, name: name, resourceType: resourceType, tags: tags, zones: zones, fileSystemId: fileSystemId, creationToken: creationToken, serviceLevel: serviceLevel, usageThreshold: usageThreshold, exportRules: exportRules, protocolTypes: protocolTypes, provisioningState: provisioningState, snapshotId: snapshotId, deleteBaseSnapshot: deleteBaseSnapshot, backupId: backupId, baremetalTenantId: baremetalTenantId, subnetId: subnetId, networkFeatures: networkFeatures, effectiveNetworkFeatures: default, networkSiblingSetId: networkSiblingSetId, storageToNetworkProximity: storageToNetworkProximity, mountTargets: mountTargets, volumeType: volumeType, dataProtection: dataProtection, acceptGrowCapacityPoolForShortTermCloneSplit: default, isRestoring: isRestoring, isSnapshotDirectoryVisible: isSnapshotDirectoryVisible, isKerberosEnabled: isKerberosEnabled, securityStyle: securityStyle, isSmbEncryptionEnabled: isSmbEncryptionEnabled, smbAccessBasedEnumeration: smbAccessBasedEnumeration, smbNonBrowsable: smbNonBrowsable, isSmbContinuouslyAvailable: isSmbContinuouslyAvailable, throughputMibps: throughputMibps, actualThroughputMibps: actualThroughputMibps, encryptionKeySource: encryptionKeySource, keyVaultPrivateEndpointResourceId: keyVaultPrivateEndpointResourceId, isLdapEnabled: isLdapEnabled, isCoolAccessEnabled: isCoolAccessEnabled, coolnessPeriod: coolnessPeriod, coolAccessRetrievalPolicy: coolAccessRetrievalPolicy, coolAccessTieringPolicy: default, unixPermissions: unixPermissions, cloneProgress: cloneProgress, fileAccessLogs: fileAccessLogs, avsDataStore: avsDataStore, dataStoreResourceId: dataStoreResourceId, isDefaultQuotaEnabled: isDefaultQuotaEnabled, defaultUserQuotaInKiBs: defaultUserQuotaInKiBs, defaultGroupQuotaInKiBs: defaultGroupQuotaInKiBs, maximumNumberOfFiles: maximumNumberOfFiles, volumeGroupName: volumeGroupName, capacityPoolResourceId: capacityPoolResourceId, proximityPlacementGroupId: proximityPlacementGroupId, t2Network: t2Network, volumeSpecName: volumeSpecName, isEncrypted: isEncrypted, placementRules: placementRules, enableSubvolumes: enableSubvolumes, provisionedAvailabilityZone: provisionedAvailabilityZone, isLargeVolume: isLargeVolume, originatingResourceId: originatingResourceId, inheritedSizeInBytes: default); + return NetAppVolumeGroupVolume(id: id, name: name, resourceType: resourceType, tags: tags, zones: zones, fileSystemId: fileSystemId, creationToken: creationToken, serviceLevel: serviceLevel, usageThreshold: usageThreshold, exportRules: exportRules, protocolTypes: protocolTypes, provisioningState: provisioningState, snapshotId: snapshotId, deleteBaseSnapshot: deleteBaseSnapshot, backupId: backupId, baremetalTenantId: baremetalTenantId, subnetId: subnetId, networkFeatures: networkFeatures, effectiveNetworkFeatures: default, networkSiblingSetId: networkSiblingSetId, storageToNetworkProximity: storageToNetworkProximity, mountTargets: mountTargets, volumeType: volumeType, dataProtection: dataProtection, acceptGrowCapacityPoolForShortTermCloneSplit: default, isRestoring: isRestoring, isSnapshotDirectoryVisible: isSnapshotDirectoryVisible, isKerberosEnabled: isKerberosEnabled, securityStyle: securityStyle, isSmbEncryptionEnabled: isSmbEncryptionEnabled, smbAccessBasedEnumeration: smbAccessBasedEnumeration, smbNonBrowsable: smbNonBrowsable, isSmbContinuouslyAvailable: isSmbContinuouslyAvailable, throughputMibps: throughputMibps, actualThroughputMibps: actualThroughputMibps, encryptionKeySource: encryptionKeySource, keyVaultPrivateEndpointResourceId: keyVaultPrivateEndpointResourceId, isLdapEnabled: isLdapEnabled, ldapServerType: default, isCoolAccessEnabled: isCoolAccessEnabled, coolnessPeriod: coolnessPeriod, coolAccessRetrievalPolicy: coolAccessRetrievalPolicy, coolAccessTieringPolicy: default, unixPermissions: unixPermissions, cloneProgress: cloneProgress, fileAccessLogs: fileAccessLogs, avsDataStore: avsDataStore, dataStoreResourceId: dataStoreResourceId, isDefaultQuotaEnabled: isDefaultQuotaEnabled, defaultUserQuotaInKiBs: defaultUserQuotaInKiBs, defaultGroupQuotaInKiBs: defaultGroupQuotaInKiBs, maximumNumberOfFiles: maximumNumberOfFiles, volumeGroupName: volumeGroupName, capacityPoolResourceId: capacityPoolResourceId, proximityPlacementGroupId: proximityPlacementGroupId, t2Network: t2Network, volumeSpecName: volumeSpecName, isEncrypted: isEncrypted, placementRules: placementRules, enableSubvolumes: enableSubvolumes, provisionedAvailabilityZone: provisionedAvailabilityZone, isLargeVolume: isLargeVolume, largeVolumeType: default, originatingResourceId: originatingResourceId, inheritedSizeInBytes: default, language: default, breakthroughMode: default); } /// Initializes a new instance of NetAppVolumeData. @@ -1884,7 +2923,7 @@ public static NetAppVolumeGroupVolume NetAppVolumeGroupVolume(ResourceIdentifier [EditorBrowsable(EditorBrowsableState.Never)] public static NetAppVolumeData NetAppVolumeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, IEnumerable zones, Guid? fileSystemId, string creationToken, NetAppFileServiceLevel? serviceLevel, long usageThreshold, IEnumerable exportRules, IEnumerable protocolTypes, string provisioningState, string snapshotId, bool? deleteBaseSnapshot, string backupId, string baremetalTenantId, ResourceIdentifier subnetId, NetAppNetworkFeature? networkFeatures, Guid? networkSiblingSetId, NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity, IEnumerable mountTargets, string volumeType, NetAppVolumeDataProtection dataProtection, bool? isRestoring, bool? isSnapshotDirectoryVisible, bool? isKerberosEnabled, NetAppVolumeSecurityStyle? securityStyle, bool? isSmbEncryptionEnabled, SmbAccessBasedEnumeration? smbAccessBasedEnumeration, SmbNonBrowsable? smbNonBrowsable, bool? isSmbContinuouslyAvailable, float? throughputMibps, float? actualThroughputMibps, NetAppEncryptionKeySource? encryptionKeySource, ResourceIdentifier keyVaultPrivateEndpointResourceId, bool? isLdapEnabled, bool? isCoolAccessEnabled, int? coolnessPeriod, string unixPermissions, int? cloneProgress, NetAppFileAccessLog? fileAccessLogs, NetAppAvsDataStore? avsDataStore, IEnumerable dataStoreResourceId, bool? isDefaultQuotaEnabled, long? defaultUserQuotaInKiBs, long? defaultGroupQuotaInKiBs, long? maximumNumberOfFiles, string volumeGroupName, ResourceIdentifier capacityPoolResourceId, ResourceIdentifier proximityPlacementGroupId, string t2Network, string volumeSpecName, bool? isEncrypted, IEnumerable placementRules, EnableNetAppSubvolume? enableSubvolumes, string provisionedAvailabilityZone, bool? isLargeVolume, ResourceIdentifier originatingResourceId) { - return NetAppVolumeData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, etag: etag, zones: zones, fileSystemId: fileSystemId, creationToken: creationToken, serviceLevel: serviceLevel, usageThreshold: usageThreshold, exportRules: exportRules, protocolTypes: protocolTypes, provisioningState: provisioningState, snapshotId: snapshotId, deleteBaseSnapshot: deleteBaseSnapshot, backupId: backupId, baremetalTenantId: baremetalTenantId, subnetId: subnetId, networkFeatures: networkFeatures, effectiveNetworkFeatures: default, networkSiblingSetId: networkSiblingSetId, storageToNetworkProximity: storageToNetworkProximity, mountTargets: mountTargets, volumeType: volumeType, dataProtection: dataProtection, acceptGrowCapacityPoolForShortTermCloneSplit: default, isRestoring: isRestoring, isSnapshotDirectoryVisible: isSnapshotDirectoryVisible, isKerberosEnabled: isKerberosEnabled, securityStyle: securityStyle, isSmbEncryptionEnabled: isSmbEncryptionEnabled, smbAccessBasedEnumeration: smbAccessBasedEnumeration, smbNonBrowsable: smbNonBrowsable, isSmbContinuouslyAvailable: isSmbContinuouslyAvailable, throughputMibps: throughputMibps, actualThroughputMibps: actualThroughputMibps, encryptionKeySource: encryptionKeySource, keyVaultPrivateEndpointResourceId: keyVaultPrivateEndpointResourceId, isLdapEnabled: isLdapEnabled, isCoolAccessEnabled: isCoolAccessEnabled, coolnessPeriod: coolnessPeriod, coolAccessRetrievalPolicy: default, coolAccessTieringPolicy: default, unixPermissions: unixPermissions, cloneProgress: cloneProgress, fileAccessLogs: fileAccessLogs, avsDataStore: avsDataStore, dataStoreResourceId: dataStoreResourceId, isDefaultQuotaEnabled: isDefaultQuotaEnabled, defaultUserQuotaInKiBs: defaultUserQuotaInKiBs, defaultGroupQuotaInKiBs: defaultGroupQuotaInKiBs, maximumNumberOfFiles: maximumNumberOfFiles, volumeGroupName: volumeGroupName, capacityPoolResourceId: capacityPoolResourceId, proximityPlacementGroupId: proximityPlacementGroupId, t2Network: t2Network, volumeSpecName: volumeSpecName, isEncrypted: isEncrypted, placementRules: placementRules, enableSubvolumes: enableSubvolumes, provisionedAvailabilityZone: provisionedAvailabilityZone, isLargeVolume: isLargeVolume, originatingResourceId: originatingResourceId, inheritedSizeInBytes: default); + return NetAppVolumeData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, etag: etag, zones: zones, fileSystemId: fileSystemId, creationToken: creationToken, serviceLevel: serviceLevel, usageThreshold: usageThreshold, exportRules: exportRules, protocolTypes: protocolTypes, provisioningState: provisioningState, snapshotId: snapshotId, deleteBaseSnapshot: deleteBaseSnapshot, backupId: backupId, baremetalTenantId: baremetalTenantId, subnetId: subnetId, networkFeatures: networkFeatures, effectiveNetworkFeatures: default, networkSiblingSetId: networkSiblingSetId, storageToNetworkProximity: storageToNetworkProximity, mountTargets: mountTargets, volumeType: volumeType, dataProtection: dataProtection, acceptGrowCapacityPoolForShortTermCloneSplit: default, isRestoring: isRestoring, isSnapshotDirectoryVisible: isSnapshotDirectoryVisible, isKerberosEnabled: isKerberosEnabled, securityStyle: securityStyle, isSmbEncryptionEnabled: isSmbEncryptionEnabled, smbAccessBasedEnumeration: smbAccessBasedEnumeration, smbNonBrowsable: smbNonBrowsable, isSmbContinuouslyAvailable: isSmbContinuouslyAvailable, throughputMibps: throughputMibps, actualThroughputMibps: actualThroughputMibps, encryptionKeySource: encryptionKeySource, keyVaultPrivateEndpointResourceId: keyVaultPrivateEndpointResourceId, isLdapEnabled: isLdapEnabled, ldapServerType: default, isCoolAccessEnabled: isCoolAccessEnabled, coolnessPeriod: coolnessPeriod, coolAccessRetrievalPolicy: default, coolAccessTieringPolicy: default, unixPermissions: unixPermissions, cloneProgress: cloneProgress, fileAccessLogs: fileAccessLogs, avsDataStore: avsDataStore, dataStoreResourceId: dataStoreResourceId, isDefaultQuotaEnabled: isDefaultQuotaEnabled, defaultUserQuotaInKiBs: defaultUserQuotaInKiBs, defaultGroupQuotaInKiBs: defaultGroupQuotaInKiBs, maximumNumberOfFiles: maximumNumberOfFiles, volumeGroupName: volumeGroupName, capacityPoolResourceId: capacityPoolResourceId, proximityPlacementGroupId: proximityPlacementGroupId, t2Network: t2Network, volumeSpecName: volumeSpecName, isEncrypted: isEncrypted, placementRules: placementRules, enableSubvolumes: enableSubvolumes, provisionedAvailabilityZone: provisionedAvailabilityZone, isLargeVolume: isLargeVolume, largeVolumeType: default, originatingResourceId: originatingResourceId, inheritedSizeInBytes: default, language: default, breakthroughMode: default); } /// Initializes a new instance of . @@ -1959,7 +2998,7 @@ public static NetAppVolumeData NetAppVolumeData(ResourceIdentifier id, string na [EditorBrowsable(EditorBrowsableState.Never)] public static NetAppVolumeData NetAppVolumeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, IEnumerable zones, Guid? fileSystemId, string creationToken, NetAppFileServiceLevel? serviceLevel, long usageThreshold, IEnumerable exportRules, IEnumerable protocolTypes, string provisioningState, string snapshotId, bool? deleteBaseSnapshot, string backupId, string baremetalTenantId, ResourceIdentifier subnetId, NetAppNetworkFeature? networkFeatures, Guid? networkSiblingSetId, NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity, IEnumerable mountTargets, string volumeType, NetAppVolumeDataProtection dataProtection, bool? isRestoring, bool? isSnapshotDirectoryVisible, bool? isKerberosEnabled, NetAppVolumeSecurityStyle? securityStyle, bool? isSmbEncryptionEnabled, SmbAccessBasedEnumeration? smbAccessBasedEnumeration, SmbNonBrowsable? smbNonBrowsable, bool? isSmbContinuouslyAvailable, float? throughputMibps, float? actualThroughputMibps, NetAppEncryptionKeySource? encryptionKeySource, ResourceIdentifier keyVaultPrivateEndpointResourceId, bool? isLdapEnabled, bool? isCoolAccessEnabled, int? coolnessPeriod, CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy, string unixPermissions, int? cloneProgress, NetAppFileAccessLog? fileAccessLogs, NetAppAvsDataStore? avsDataStore, IEnumerable dataStoreResourceId, bool? isDefaultQuotaEnabled, long? defaultUserQuotaInKiBs, long? defaultGroupQuotaInKiBs, long? maximumNumberOfFiles, string volumeGroupName, ResourceIdentifier capacityPoolResourceId, ResourceIdentifier proximityPlacementGroupId, string t2Network, string volumeSpecName, bool? isEncrypted, IEnumerable placementRules, EnableNetAppSubvolume? enableSubvolumes, string provisionedAvailabilityZone, bool? isLargeVolume, ResourceIdentifier originatingResourceId) { - return NetAppVolumeData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, etag: etag, zones: zones, fileSystemId: fileSystemId, creationToken: creationToken, serviceLevel: serviceLevel, usageThreshold: usageThreshold, exportRules: exportRules, protocolTypes: protocolTypes, provisioningState: provisioningState, snapshotId: snapshotId, deleteBaseSnapshot: deleteBaseSnapshot, backupId: backupId, baremetalTenantId: baremetalTenantId, subnetId: subnetId, networkFeatures: networkFeatures, effectiveNetworkFeatures: default, networkSiblingSetId: networkSiblingSetId, storageToNetworkProximity: storageToNetworkProximity, mountTargets: mountTargets, volumeType: volumeType, dataProtection: dataProtection, acceptGrowCapacityPoolForShortTermCloneSplit: default, isRestoring: isRestoring, isSnapshotDirectoryVisible: isSnapshotDirectoryVisible, isKerberosEnabled: isKerberosEnabled, securityStyle: securityStyle, isSmbEncryptionEnabled: isSmbEncryptionEnabled, smbAccessBasedEnumeration: smbAccessBasedEnumeration, smbNonBrowsable: smbNonBrowsable, isSmbContinuouslyAvailable: isSmbContinuouslyAvailable, throughputMibps: throughputMibps, actualThroughputMibps: actualThroughputMibps, encryptionKeySource: encryptionKeySource, keyVaultPrivateEndpointResourceId: keyVaultPrivateEndpointResourceId, isLdapEnabled: isLdapEnabled, isCoolAccessEnabled: isCoolAccessEnabled, coolnessPeriod: coolnessPeriod, coolAccessRetrievalPolicy: coolAccessRetrievalPolicy, coolAccessTieringPolicy: default, unixPermissions: unixPermissions, cloneProgress: cloneProgress, fileAccessLogs: fileAccessLogs, avsDataStore: avsDataStore, dataStoreResourceId: dataStoreResourceId, isDefaultQuotaEnabled: isDefaultQuotaEnabled, defaultUserQuotaInKiBs: defaultUserQuotaInKiBs, defaultGroupQuotaInKiBs: defaultGroupQuotaInKiBs, maximumNumberOfFiles: maximumNumberOfFiles, volumeGroupName: volumeGroupName, capacityPoolResourceId: capacityPoolResourceId, proximityPlacementGroupId: proximityPlacementGroupId, t2Network: t2Network, volumeSpecName: volumeSpecName, isEncrypted: isEncrypted, placementRules: placementRules, enableSubvolumes: enableSubvolumes, provisionedAvailabilityZone: provisionedAvailabilityZone, isLargeVolume: isLargeVolume, originatingResourceId: originatingResourceId, inheritedSizeInBytes: default); + return NetAppVolumeData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, etag: etag, zones: zones, fileSystemId: fileSystemId, creationToken: creationToken, serviceLevel: serviceLevel, usageThreshold: usageThreshold, exportRules: exportRules, protocolTypes: protocolTypes, provisioningState: provisioningState, snapshotId: snapshotId, deleteBaseSnapshot: deleteBaseSnapshot, backupId: backupId, baremetalTenantId: baremetalTenantId, subnetId: subnetId, networkFeatures: networkFeatures, effectiveNetworkFeatures: default, networkSiblingSetId: networkSiblingSetId, storageToNetworkProximity: storageToNetworkProximity, mountTargets: mountTargets, volumeType: volumeType, dataProtection: dataProtection, acceptGrowCapacityPoolForShortTermCloneSplit: default, isRestoring: isRestoring, isSnapshotDirectoryVisible: isSnapshotDirectoryVisible, isKerberosEnabled: isKerberosEnabled, securityStyle: securityStyle, isSmbEncryptionEnabled: isSmbEncryptionEnabled, smbAccessBasedEnumeration: smbAccessBasedEnumeration, smbNonBrowsable: smbNonBrowsable, isSmbContinuouslyAvailable: isSmbContinuouslyAvailable, throughputMibps: throughputMibps, actualThroughputMibps: actualThroughputMibps, encryptionKeySource: encryptionKeySource, keyVaultPrivateEndpointResourceId: keyVaultPrivateEndpointResourceId, isLdapEnabled: isLdapEnabled, ldapServerType: default, isCoolAccessEnabled: isCoolAccessEnabled, coolnessPeriod: coolnessPeriod, coolAccessRetrievalPolicy: coolAccessRetrievalPolicy, coolAccessTieringPolicy: default, unixPermissions: unixPermissions, cloneProgress: cloneProgress, fileAccessLogs: fileAccessLogs, avsDataStore: avsDataStore, dataStoreResourceId: dataStoreResourceId, isDefaultQuotaEnabled: isDefaultQuotaEnabled, defaultUserQuotaInKiBs: defaultUserQuotaInKiBs, defaultGroupQuotaInKiBs: defaultGroupQuotaInKiBs, maximumNumberOfFiles: maximumNumberOfFiles, volumeGroupName: volumeGroupName, capacityPoolResourceId: capacityPoolResourceId, proximityPlacementGroupId: proximityPlacementGroupId, t2Network: t2Network, volumeSpecName: volumeSpecName, isEncrypted: isEncrypted, placementRules: placementRules, enableSubvolumes: enableSubvolumes, provisionedAvailabilityZone: provisionedAvailabilityZone, isLargeVolume: isLargeVolume, largeVolumeType: default, originatingResourceId: originatingResourceId, inheritedSizeInBytes: default, language: default, breakthroughMode: default); } /// Initializes a new instance of . @@ -2035,7 +3074,7 @@ public static NetAppVolumeData NetAppVolumeData(ResourceIdentifier id, string na [EditorBrowsable(EditorBrowsableState.Never)] public static NetAppVolumeData NetAppVolumeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, IEnumerable zones, Guid? fileSystemId, string creationToken, NetAppFileServiceLevel? serviceLevel, long usageThreshold, IEnumerable exportRules, IEnumerable protocolTypes, string provisioningState, string snapshotId, bool? deleteBaseSnapshot, string backupId, string baremetalTenantId, ResourceIdentifier subnetId, NetAppNetworkFeature? networkFeatures, NetAppNetworkFeature? effectiveNetworkFeatures, Guid? networkSiblingSetId, NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity, IEnumerable mountTargets, string volumeType, NetAppVolumeDataProtection dataProtection, bool? isRestoring, bool? isSnapshotDirectoryVisible, bool? isKerberosEnabled, NetAppVolumeSecurityStyle? securityStyle, bool? isSmbEncryptionEnabled, SmbAccessBasedEnumeration? smbAccessBasedEnumeration, SmbNonBrowsable? smbNonBrowsable, bool? isSmbContinuouslyAvailable, float? throughputMibps, float? actualThroughputMibps, NetAppEncryptionKeySource? encryptionKeySource, ResourceIdentifier keyVaultPrivateEndpointResourceId, bool? isLdapEnabled, bool? isCoolAccessEnabled, int? coolnessPeriod, CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy, string unixPermissions, int? cloneProgress, NetAppFileAccessLog? fileAccessLogs, NetAppAvsDataStore? avsDataStore, IEnumerable dataStoreResourceId, bool? isDefaultQuotaEnabled, long? defaultUserQuotaInKiBs, long? defaultGroupQuotaInKiBs, long? maximumNumberOfFiles, string volumeGroupName, ResourceIdentifier capacityPoolResourceId, ResourceIdentifier proximityPlacementGroupId, string t2Network, string volumeSpecName, bool? isEncrypted, IEnumerable placementRules, EnableNetAppSubvolume? enableSubvolumes, string provisionedAvailabilityZone, bool? isLargeVolume, ResourceIdentifier originatingResourceId) { - return NetAppVolumeData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, etag: etag, zones: zones, fileSystemId: fileSystemId, creationToken: creationToken, serviceLevel: serviceLevel, usageThreshold: usageThreshold, exportRules: exportRules, protocolTypes: protocolTypes, provisioningState: provisioningState, snapshotId: snapshotId, deleteBaseSnapshot: deleteBaseSnapshot, backupId: backupId, baremetalTenantId: baremetalTenantId, subnetId: subnetId, networkFeatures: networkFeatures, effectiveNetworkFeatures: effectiveNetworkFeatures, networkSiblingSetId: networkSiblingSetId, storageToNetworkProximity: storageToNetworkProximity, mountTargets: mountTargets, volumeType: volumeType, dataProtection: dataProtection, acceptGrowCapacityPoolForShortTermCloneSplit: default, isRestoring: isRestoring, isSnapshotDirectoryVisible: isSnapshotDirectoryVisible, isKerberosEnabled: isKerberosEnabled, securityStyle: securityStyle, isSmbEncryptionEnabled: isSmbEncryptionEnabled, smbAccessBasedEnumeration: smbAccessBasedEnumeration, smbNonBrowsable: smbNonBrowsable, isSmbContinuouslyAvailable: isSmbContinuouslyAvailable, throughputMibps: throughputMibps, actualThroughputMibps: actualThroughputMibps, encryptionKeySource: encryptionKeySource, keyVaultPrivateEndpointResourceId: keyVaultPrivateEndpointResourceId, isLdapEnabled: isLdapEnabled, isCoolAccessEnabled: isCoolAccessEnabled, coolnessPeriod: coolnessPeriod, coolAccessRetrievalPolicy: coolAccessRetrievalPolicy, coolAccessTieringPolicy: default, unixPermissions: unixPermissions, cloneProgress: cloneProgress, fileAccessLogs: fileAccessLogs, avsDataStore: avsDataStore, dataStoreResourceId: dataStoreResourceId, isDefaultQuotaEnabled: isDefaultQuotaEnabled, defaultUserQuotaInKiBs: defaultUserQuotaInKiBs, defaultGroupQuotaInKiBs: defaultGroupQuotaInKiBs, maximumNumberOfFiles: maximumNumberOfFiles, volumeGroupName: volumeGroupName, capacityPoolResourceId: capacityPoolResourceId, proximityPlacementGroupId: proximityPlacementGroupId, t2Network: t2Network, volumeSpecName: volumeSpecName, isEncrypted: isEncrypted, placementRules: placementRules, enableSubvolumes: enableSubvolumes, provisionedAvailabilityZone: provisionedAvailabilityZone, isLargeVolume: isLargeVolume, originatingResourceId: originatingResourceId, inheritedSizeInBytes: default); + return NetAppVolumeData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, etag: etag, zones: zones, fileSystemId: fileSystemId, creationToken: creationToken, serviceLevel: serviceLevel, usageThreshold: usageThreshold, exportRules: exportRules, protocolTypes: protocolTypes, provisioningState: provisioningState, snapshotId: snapshotId, deleteBaseSnapshot: deleteBaseSnapshot, backupId: backupId, baremetalTenantId: baremetalTenantId, subnetId: subnetId, networkFeatures: networkFeatures, effectiveNetworkFeatures: effectiveNetworkFeatures, networkSiblingSetId: networkSiblingSetId, storageToNetworkProximity: storageToNetworkProximity, mountTargets: mountTargets, volumeType: volumeType, dataProtection: dataProtection, acceptGrowCapacityPoolForShortTermCloneSplit: default, isRestoring: isRestoring, isSnapshotDirectoryVisible: isSnapshotDirectoryVisible, isKerberosEnabled: isKerberosEnabled, securityStyle: securityStyle, isSmbEncryptionEnabled: isSmbEncryptionEnabled, smbAccessBasedEnumeration: smbAccessBasedEnumeration, smbNonBrowsable: smbNonBrowsable, isSmbContinuouslyAvailable: isSmbContinuouslyAvailable, throughputMibps: throughputMibps, actualThroughputMibps: actualThroughputMibps, encryptionKeySource: encryptionKeySource, keyVaultPrivateEndpointResourceId: keyVaultPrivateEndpointResourceId, isLdapEnabled: isLdapEnabled, ldapServerType: default, isCoolAccessEnabled: isCoolAccessEnabled, coolnessPeriod: coolnessPeriod, coolAccessRetrievalPolicy: coolAccessRetrievalPolicy, coolAccessTieringPolicy: default, unixPermissions: unixPermissions, cloneProgress: cloneProgress, fileAccessLogs: fileAccessLogs, avsDataStore: avsDataStore, dataStoreResourceId: dataStoreResourceId, isDefaultQuotaEnabled: isDefaultQuotaEnabled, defaultUserQuotaInKiBs: defaultUserQuotaInKiBs, defaultGroupQuotaInKiBs: defaultGroupQuotaInKiBs, maximumNumberOfFiles: maximumNumberOfFiles, volumeGroupName: volumeGroupName, capacityPoolResourceId: capacityPoolResourceId, proximityPlacementGroupId: proximityPlacementGroupId, t2Network: t2Network, volumeSpecName: volumeSpecName, isEncrypted: isEncrypted, placementRules: placementRules, enableSubvolumes: enableSubvolumes, provisionedAvailabilityZone: provisionedAvailabilityZone, isLargeVolume: isLargeVolume, largeVolumeType: default, originatingResourceId: originatingResourceId, inheritedSizeInBytes: default, language: default, breakthroughMode: default); } /// Initializes a new instance of . @@ -2143,7 +3182,7 @@ public static NetAppVolumePatch NetAppVolumePatch(ResourceIdentifier id, string [EditorBrowsable(EditorBrowsableState.Never)] public static NetAppVolumeGroupVolume NetAppVolumeGroupVolume(ResourceIdentifier id, string name, ResourceType? resourceType, IDictionary tags, IEnumerable zones, Guid? fileSystemId, string creationToken, NetAppFileServiceLevel? serviceLevel, long usageThreshold, IEnumerable exportRules, IEnumerable protocolTypes, string provisioningState, string snapshotId, bool? deleteBaseSnapshot, string backupId, string baremetalTenantId, ResourceIdentifier subnetId, NetAppNetworkFeature? networkFeatures, NetAppNetworkFeature? effectiveNetworkFeatures, Guid? networkSiblingSetId, NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity, IEnumerable mountTargets, string volumeType, NetAppVolumeDataProtection dataProtection, bool? isRestoring, bool? isSnapshotDirectoryVisible, bool? isKerberosEnabled, NetAppVolumeSecurityStyle? securityStyle, bool? isSmbEncryptionEnabled, SmbAccessBasedEnumeration? smbAccessBasedEnumeration, SmbNonBrowsable? smbNonBrowsable, bool? isSmbContinuouslyAvailable, float? throughputMibps, float? actualThroughputMibps, NetAppEncryptionKeySource? encryptionKeySource, ResourceIdentifier keyVaultPrivateEndpointResourceId, bool? isLdapEnabled, bool? isCoolAccessEnabled, int? coolnessPeriod, CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy, string unixPermissions, int? cloneProgress, NetAppFileAccessLog? fileAccessLogs, NetAppAvsDataStore? avsDataStore, IEnumerable dataStoreResourceId, bool? isDefaultQuotaEnabled, long? defaultUserQuotaInKiBs, long? defaultGroupQuotaInKiBs, long? maximumNumberOfFiles, string volumeGroupName, ResourceIdentifier capacityPoolResourceId, ResourceIdentifier proximityPlacementGroupId, string t2Network, string volumeSpecName, bool? isEncrypted, IEnumerable placementRules, EnableNetAppSubvolume? enableSubvolumes, string provisionedAvailabilityZone, bool? isLargeVolume, ResourceIdentifier originatingResourceId) { - return NetAppVolumeGroupVolume(id: id, name: name, resourceType: resourceType, tags: tags, zones: zones, fileSystemId: fileSystemId, creationToken: creationToken, serviceLevel: serviceLevel, usageThreshold: usageThreshold, exportRules: exportRules, protocolTypes: protocolTypes, provisioningState: provisioningState, snapshotId: snapshotId, deleteBaseSnapshot: deleteBaseSnapshot, backupId: backupId, baremetalTenantId: baremetalTenantId, subnetId: subnetId, networkFeatures: networkFeatures, effectiveNetworkFeatures: effectiveNetworkFeatures, networkSiblingSetId: networkSiblingSetId, storageToNetworkProximity: storageToNetworkProximity, mountTargets: mountTargets, volumeType: volumeType, dataProtection: dataProtection, acceptGrowCapacityPoolForShortTermCloneSplit: default, isRestoring: isRestoring, isSnapshotDirectoryVisible: isSnapshotDirectoryVisible, isKerberosEnabled: isKerberosEnabled, securityStyle: securityStyle, isSmbEncryptionEnabled: isSmbEncryptionEnabled, smbAccessBasedEnumeration: smbAccessBasedEnumeration, smbNonBrowsable: smbNonBrowsable, isSmbContinuouslyAvailable: isSmbContinuouslyAvailable, throughputMibps: throughputMibps, actualThroughputMibps: actualThroughputMibps, encryptionKeySource: encryptionKeySource, keyVaultPrivateEndpointResourceId: keyVaultPrivateEndpointResourceId, isLdapEnabled: isLdapEnabled, isCoolAccessEnabled: isCoolAccessEnabled, coolnessPeriod: coolnessPeriod, coolAccessRetrievalPolicy: coolAccessRetrievalPolicy, coolAccessTieringPolicy: default, unixPermissions: unixPermissions, cloneProgress: cloneProgress, fileAccessLogs: fileAccessLogs, avsDataStore: avsDataStore, dataStoreResourceId: dataStoreResourceId, isDefaultQuotaEnabled: isDefaultQuotaEnabled, defaultUserQuotaInKiBs: defaultUserQuotaInKiBs, defaultGroupQuotaInKiBs: defaultGroupQuotaInKiBs, maximumNumberOfFiles: maximumNumberOfFiles, volumeGroupName: volumeGroupName, capacityPoolResourceId: capacityPoolResourceId, proximityPlacementGroupId: proximityPlacementGroupId, t2Network: t2Network, volumeSpecName: volumeSpecName, isEncrypted: isEncrypted, placementRules: placementRules, enableSubvolumes: enableSubvolumes, provisionedAvailabilityZone: provisionedAvailabilityZone, isLargeVolume: isLargeVolume, originatingResourceId: originatingResourceId, inheritedSizeInBytes: default); + return NetAppVolumeGroupVolume(id: id, name: name, resourceType: resourceType, tags: tags, zones: zones, fileSystemId: fileSystemId, creationToken: creationToken, serviceLevel: serviceLevel, usageThreshold: usageThreshold, exportRules: exportRules, protocolTypes: protocolTypes, provisioningState: provisioningState, snapshotId: snapshotId, deleteBaseSnapshot: deleteBaseSnapshot, backupId: backupId, baremetalTenantId: baremetalTenantId, subnetId: subnetId, networkFeatures: networkFeatures, effectiveNetworkFeatures: effectiveNetworkFeatures, networkSiblingSetId: networkSiblingSetId, storageToNetworkProximity: storageToNetworkProximity, mountTargets: mountTargets, volumeType: volumeType, dataProtection: dataProtection, acceptGrowCapacityPoolForShortTermCloneSplit: default, isRestoring: isRestoring, isSnapshotDirectoryVisible: isSnapshotDirectoryVisible, isKerberosEnabled: isKerberosEnabled, securityStyle: securityStyle, isSmbEncryptionEnabled: isSmbEncryptionEnabled, smbAccessBasedEnumeration: smbAccessBasedEnumeration, smbNonBrowsable: smbNonBrowsable, isSmbContinuouslyAvailable: isSmbContinuouslyAvailable, throughputMibps: throughputMibps, actualThroughputMibps: actualThroughputMibps, encryptionKeySource: encryptionKeySource, keyVaultPrivateEndpointResourceId: keyVaultPrivateEndpointResourceId, isLdapEnabled: isLdapEnabled, ldapServerType: default, isCoolAccessEnabled: isCoolAccessEnabled, coolnessPeriod: coolnessPeriod, coolAccessRetrievalPolicy: coolAccessRetrievalPolicy, coolAccessTieringPolicy: default, unixPermissions: unixPermissions, cloneProgress: cloneProgress, fileAccessLogs: fileAccessLogs, avsDataStore: avsDataStore, dataStoreResourceId: dataStoreResourceId, isDefaultQuotaEnabled: isDefaultQuotaEnabled, defaultUserQuotaInKiBs: defaultUserQuotaInKiBs, defaultGroupQuotaInKiBs: defaultGroupQuotaInKiBs, maximumNumberOfFiles: maximumNumberOfFiles, volumeGroupName: volumeGroupName, capacityPoolResourceId: capacityPoolResourceId, proximityPlacementGroupId: proximityPlacementGroupId, t2Network: t2Network, volumeSpecName: volumeSpecName, isEncrypted: isEncrypted, placementRules: placementRules, enableSubvolumes: enableSubvolumes, provisionedAvailabilityZone: provisionedAvailabilityZone, isLargeVolume: isLargeVolume, largeVolumeType: default, originatingResourceId: originatingResourceId, inheritedSizeInBytes: default, language: default, breakthroughMode: default); } /// Initializes a new instance of . @@ -2156,7 +3195,7 @@ public static NetAppVolumeGroupVolume NetAppVolumeGroupVolume(ResourceIdentifier [EditorBrowsable(EditorBrowsableState.Never)] public static NetAppReplicationObject NetAppReplicationObject(string replicationId, NetAppEndpointType? endpointType, NetAppReplicationSchedule? replicationSchedule, ResourceIdentifier remoteVolumeResourceId, string remoteVolumeRegion) { - return NetAppReplicationObject(replicationId: replicationId, endpointType: endpointType, replicationSchedule: replicationSchedule, remoteVolumeResourceId: remoteVolumeResourceId, remotePath: default, remoteVolumeRegion: remoteVolumeRegion, destinationReplications: default); + return NetAppReplicationObject(replicationId: replicationId, endpointType: endpointType, replicationSchedule: replicationSchedule, remoteVolumeResourceId: remoteVolumeResourceId, remotePath: default, remoteVolumeRegion: remoteVolumeRegion, destinationReplications: default, externalReplicationSetupStatus: default, externalReplicationSetupInfo: default, mirrorState: default, relationshipStatus: default); } /// Initializes a new instance of . diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CacheCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CacheCollection.cs new file mode 100644 index 000000000000..5b4e93ffe102 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CacheCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetCaches method from an instance of . + /// + public partial class CacheCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _cacheClientDiagnostics; + private readonly CachesRestOperations _cacheRestClient; + + /// Initializes a new instance of the class for mocking. + protected CacheCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal CacheCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _cacheClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NetApp", CacheResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(CacheResource.ResourceType, out string cacheApiVersion); + _cacheRestClient = new CachesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, cacheApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != CapacityPoolResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, CapacityPoolResource.ResourceType), nameof(id)); + } + + /// + /// Create or update the specified Cache within the Capacity Pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName} + /// + /// + /// Operation Id + /// Caches_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the cache resource. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string cacheName, CacheData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(cacheName, nameof(cacheName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _cacheClientDiagnostics.CreateScope("CacheCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _cacheRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cacheName, data, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(new CacheOperationSource(Client), _cacheClientDiagnostics, Pipeline, _cacheRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cacheName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update the specified Cache within the Capacity Pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName} + /// + /// + /// Operation Id + /// Caches_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the cache resource. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string cacheName, CacheData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(cacheName, nameof(cacheName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _cacheClientDiagnostics.CreateScope("CacheCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _cacheRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cacheName, data, cancellationToken); + var operation = new NetAppArmOperation(new CacheOperationSource(Client), _cacheClientDiagnostics, Pipeline, _cacheRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cacheName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the details of the specified Cache + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName} + /// + /// + /// Operation Id + /// Caches_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the cache resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string cacheName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(cacheName, nameof(cacheName)); + + using var scope = _cacheClientDiagnostics.CreateScope("CacheCollection.Get"); + scope.Start(); + try + { + var response = await _cacheRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cacheName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CacheResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the details of the specified Cache + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName} + /// + /// + /// Operation Id + /// Caches_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the cache resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string cacheName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(cacheName, nameof(cacheName)); + + using var scope = _cacheClientDiagnostics.CreateScope("CacheCollection.Get"); + scope.Start(); + try + { + var response = _cacheRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cacheName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CacheResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List all Caches within the Capacity Pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches + /// + /// + /// Operation Id + /// Caches_ListByCapacityPools + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _cacheRestClient.CreateListByCapacityPoolsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _cacheRestClient.CreateListByCapacityPoolsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new CacheResource(Client, CacheData.DeserializeCacheData(e)), _cacheClientDiagnostics, Pipeline, "CacheCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List all Caches within the Capacity Pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches + /// + /// + /// Operation Id + /// Caches_ListByCapacityPools + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _cacheRestClient.CreateListByCapacityPoolsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _cacheRestClient.CreateListByCapacityPoolsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new CacheResource(Client, CacheData.DeserializeCacheData(e)), _cacheClientDiagnostics, Pipeline, "CacheCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName} + /// + /// + /// Operation Id + /// Caches_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the cache resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string cacheName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(cacheName, nameof(cacheName)); + + using var scope = _cacheClientDiagnostics.CreateScope("CacheCollection.Exists"); + scope.Start(); + try + { + var response = await _cacheRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cacheName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName} + /// + /// + /// Operation Id + /// Caches_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the cache resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string cacheName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(cacheName, nameof(cacheName)); + + using var scope = _cacheClientDiagnostics.CreateScope("CacheCollection.Exists"); + scope.Start(); + try + { + var response = _cacheRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cacheName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName} + /// + /// + /// Operation Id + /// Caches_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the cache resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string cacheName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(cacheName, nameof(cacheName)); + + using var scope = _cacheClientDiagnostics.CreateScope("CacheCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _cacheRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cacheName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new CacheResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName} + /// + /// + /// Operation Id + /// Caches_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the cache resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string cacheName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(cacheName, nameof(cacheName)); + + using var scope = _cacheClientDiagnostics.CreateScope("CacheCollection.GetIfExists"); + scope.Start(); + try + { + var response = _cacheRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cacheName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new CacheResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CacheData.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CacheData.Serialization.cs new file mode 100644 index 000000000000..12feed9abe5a --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CacheData.Serialization.cs @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + public partial class CacheData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CacheData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("etag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + if (Optional.IsCollectionDefined(Zones)) + { + writer.WritePropertyName("zones"u8); + writer.WriteStartArray(); + foreach (var item in Zones) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + } + + CacheData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CacheData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCacheData(document.RootElement, options); + } + + internal static CacheData DeserializeCacheData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CacheProperties properties = default; + ETag? etag = default; + IList zones = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + properties = CacheProperties.DeserializeCacheProperties(property.Value, options); + continue; + } + if (property.NameEquals("etag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(property.Value.GetString()); + continue; + } + if (property.NameEquals("zones"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + zones = array; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerNetAppContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CacheData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + etag, + zones ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(CacheData)} does not support writing '{options.Format}' format."); + } + } + + CacheData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCacheData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CacheData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CacheData.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CacheData.cs new file mode 100644 index 000000000000..6af5818f3b2c --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CacheData.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A class representing the Cache data model. + /// Cache resource + /// + public partial class CacheData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + /// Cache properties. + /// is null. + public CacheData(AzureLocation location, CacheProperties properties) : base(location) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + Zones = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Cache 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."). + /// The availability zones. + /// Keeps track of any properties unknown to the library. + internal CacheData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CacheProperties properties, ETag? etag, IList zones, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + ETag = etag; + Zones = zones; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CacheData() + { + } + + /// Cache properties. + public CacheProperties Properties { get; set; } + /// "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."). + public ETag? ETag { get; } + /// The availability zones. + public IList Zones { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CacheResource.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CacheResource.Serialization.cs new file mode 100644 index 000000000000..23b41fabf653 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CacheResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.NetApp +{ + public partial class CacheResource : IJsonModel + { + private static CacheData s_dataDeserializationInstance; + private static CacheData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + CacheData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetAppContext.Default); + + CacheData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetAppContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CacheResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CacheResource.cs new file mode 100644 index 000000000000..d5d8e644a234 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CacheResource.cs @@ -0,0 +1,876 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A Class representing a Cache along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetCacheResource method. + /// Otherwise you can get one from its parent resource using the GetCache method. + /// + public partial class CacheResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The accountName. + /// The poolName. + /// The cacheName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string poolName, string cacheName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _cacheClientDiagnostics; + private readonly CachesRestOperations _cacheRestClient; + private readonly CacheData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.NetApp/netAppAccounts/capacityPools/caches"; + + /// Initializes a new instance of the class for mocking. + protected CacheResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal CacheResource(ArmClient client, CacheData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal CacheResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _cacheClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NetApp", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string cacheApiVersion); + _cacheRestClient = new CachesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, cacheApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual CacheData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get the details of the specified Cache + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName} + /// + /// + /// Operation Id + /// Caches_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _cacheClientDiagnostics.CreateScope("CacheResource.Get"); + scope.Start(); + try + { + var response = await _cacheRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CacheResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the details of the specified Cache + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName} + /// + /// + /// Operation Id + /// Caches_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _cacheClientDiagnostics.CreateScope("CacheResource.Get"); + scope.Start(); + try + { + var response = _cacheRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CacheResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the specified cache + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName} + /// + /// + /// Operation Id + /// Caches_Delete + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _cacheClientDiagnostics.CreateScope("CacheResource.Delete"); + scope.Start(); + try + { + var response = await _cacheRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(_cacheClientDiagnostics, Pipeline, _cacheRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the specified cache + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName} + /// + /// + /// Operation Id + /// Caches_Delete + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _cacheClientDiagnostics.CreateScope("CacheResource.Delete"); + scope.Start(); + try + { + var response = _cacheRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new NetAppArmOperation(_cacheClientDiagnostics, Pipeline, _cacheRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Patch the specified Cache + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName} + /// + /// + /// Operation Id + /// Caches_Update + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, CachePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _cacheClientDiagnostics.CreateScope("CacheResource.Update"); + scope.Start(); + try + { + var response = await _cacheRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(new CacheOperationSource(Client), _cacheClientDiagnostics, Pipeline, _cacheRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Patch the specified Cache + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName} + /// + /// + /// Operation Id + /// Caches_Update + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, CachePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _cacheClientDiagnostics.CreateScope("CacheResource.Update"); + scope.Start(); + try + { + var response = _cacheRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new NetAppArmOperation(new CacheOperationSource(Client), _cacheClientDiagnostics, Pipeline, _cacheRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// This operation will list the cluster peering command, cluster peering passphrase and the vserver peering command + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}/listPeeringPassphrases + /// + /// + /// Operation Id + /// Caches_ListPeeringPassphrases + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetPeeringPassphrasesAsync(CancellationToken cancellationToken = default) + { + using var scope = _cacheClientDiagnostics.CreateScope("CacheResource.GetPeeringPassphrases"); + scope.Start(); + try + { + var response = await _cacheRestClient.ListPeeringPassphrasesAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// This operation will list the cluster peering command, cluster peering passphrase and the vserver peering command + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}/listPeeringPassphrases + /// + /// + /// Operation Id + /// Caches_ListPeeringPassphrases + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetPeeringPassphrases(CancellationToken cancellationToken = default) + { + using var scope = _cacheClientDiagnostics.CreateScope("CacheResource.GetPeeringPassphrases"); + scope.Start(); + try + { + var response = _cacheRestClient.ListPeeringPassphrases(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Moves Cache to another Capacity Pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}/poolChange + /// + /// + /// Operation Id + /// Caches_PoolChange + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Move cache to the pool supplied in the body of the operation. + /// The cancellation token to use. + /// is null. + public virtual async Task> PoolChangeAsync(WaitUntil waitUntil, NetAppVolumePoolChangeContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _cacheClientDiagnostics.CreateScope("CacheResource.PoolChange"); + scope.Start(); + try + { + var response = await _cacheRestClient.PoolChangeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(new CacheOperationSource(Client), _cacheClientDiagnostics, Pipeline, _cacheRestClient.CreatePoolChangeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Moves Cache to another Capacity Pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName}/poolChange + /// + /// + /// Operation Id + /// Caches_PoolChange + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Move cache to the pool supplied in the body of the operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation PoolChange(WaitUntil waitUntil, NetAppVolumePoolChangeContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _cacheClientDiagnostics.CreateScope("CacheResource.PoolChange"); + scope.Start(); + try + { + var response = _cacheRestClient.PoolChange(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new NetAppArmOperation(new CacheOperationSource(Client), _cacheClientDiagnostics, Pipeline, _cacheRestClient.CreatePoolChangeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName} + /// + /// + /// Operation Id + /// Caches_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _cacheClientDiagnostics.CreateScope("CacheResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _cacheRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new CacheResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new CachePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName} + /// + /// + /// Operation Id + /// Caches_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _cacheClientDiagnostics.CreateScope("CacheResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _cacheRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new CacheResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new CachePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName} + /// + /// + /// Operation Id + /// Caches_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _cacheClientDiagnostics.CreateScope("CacheResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _cacheRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new CacheResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new CachePatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName} + /// + /// + /// Operation Id + /// Caches_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _cacheClientDiagnostics.CreateScope("CacheResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _cacheRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new CacheResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new CachePatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName} + /// + /// + /// Operation Id + /// Caches_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _cacheClientDiagnostics.CreateScope("CacheResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _cacheRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new CacheResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new CachePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName} + /// + /// + /// Operation Id + /// Caches_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _cacheClientDiagnostics.CreateScope("CacheResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _cacheRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new CacheResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new CachePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CapacityPoolCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CapacityPoolCollection.cs index 96d2360425fc..ce0b3be07c60 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CapacityPoolCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CapacityPoolCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string poolNa /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string poolName, CancellationT /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string poolName, Cancellat /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string poolName, CancellationToken cancella /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CapacityPoolResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CapacityPoolResource.cs index 0cc6e7c11b21..0d965d17d5c4 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CapacityPoolResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CapacityPoolResource.cs @@ -90,6 +90,75 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } + /// Gets a collection of CacheResources in the CapacityPool. + /// An object representing collection of CacheResources and their operations over a CacheResource. + public virtual CacheCollection GetCaches() + { + return GetCachedClient(client => new CacheCollection(client, Id)); + } + + /// + /// Get the details of the specified Cache + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName} + /// + /// + /// Operation Id + /// Caches_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the cache resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetCacheAsync(string cacheName, CancellationToken cancellationToken = default) + { + return await GetCaches().GetAsync(cacheName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the details of the specified Cache + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/caches/{cacheName} + /// + /// + /// Operation Id + /// Caches_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the cache resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetCache(string cacheName, CancellationToken cancellationToken = default) + { + return GetCaches().Get(cacheName, cancellationToken); + } + /// Gets a collection of NetAppVolumeResources in the CapacityPool. /// An object representing collection of NetAppVolumeResources and their operations over a NetAppVolumeResource. public virtual NetAppVolumeCollection GetNetAppVolumes() @@ -110,7 +179,7 @@ public virtual NetAppVolumeCollection GetNetAppVolumes() /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -141,7 +210,7 @@ public virtual async Task> GetNetAppVolumeAsync(s /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -172,7 +241,7 @@ public virtual Response GetNetAppVolume(string volumeName, /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -212,7 +281,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -252,7 +321,7 @@ public virtual Response Get(CancellationToken cancellation /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -294,7 +363,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -336,7 +405,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -382,7 +451,7 @@ public virtual async Task> UpdateAsync(WaitUn /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -428,7 +497,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Ca /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -490,7 +559,7 @@ public virtual async Task> AddTagAsync(string key /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -552,7 +621,7 @@ public virtual Response AddTag(string key, string value, C /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -609,7 +678,7 @@ public virtual async Task> SetTagsAsync(IDictiona /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -666,7 +735,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -726,7 +795,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticAccountCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticAccountCollection.cs new file mode 100644 index 000000000000..8c912e27af5d --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticAccountCollection.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetElasticAccounts method from an instance of . + /// + public partial class ElasticAccountCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _elasticAccountClientDiagnostics; + private readonly ElasticAccountsRestOperations _elasticAccountRestClient; + + /// Initializes a new instance of the class for mocking. + protected ElasticAccountCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ElasticAccountCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _elasticAccountClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NetApp", ElasticAccountResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ElasticAccountResource.ResourceType, out string elasticAccountApiVersion); + _elasticAccountRestClient = new ElasticAccountsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, elasticAccountApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Create or update the specified NetApp Elastic Account within the resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName} + /// + /// + /// Operation Id + /// ElasticAccounts_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the ElasticAccount. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string accountName, ElasticAccountData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _elasticAccountClientDiagnostics.CreateScope("ElasticAccountCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _elasticAccountRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, accountName, data, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(new ElasticAccountOperationSource(Client), _elasticAccountClientDiagnostics, Pipeline, _elasticAccountRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, accountName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update the specified NetApp Elastic Account within the resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName} + /// + /// + /// Operation Id + /// ElasticAccounts_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the ElasticAccount. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string accountName, ElasticAccountData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _elasticAccountClientDiagnostics.CreateScope("ElasticAccountCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _elasticAccountRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, accountName, data, cancellationToken); + var operation = new NetAppArmOperation(new ElasticAccountOperationSource(Client), _elasticAccountClientDiagnostics, Pipeline, _elasticAccountRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, accountName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the NetApp Elastic Account + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName} + /// + /// + /// Operation Id + /// ElasticAccounts_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticAccount. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var scope = _elasticAccountClientDiagnostics.CreateScope("ElasticAccountCollection.Get"); + scope.Start(); + try + { + var response = await _elasticAccountRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, accountName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticAccountResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the NetApp Elastic Account + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName} + /// + /// + /// Operation Id + /// ElasticAccounts_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticAccount. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var scope = _elasticAccountClientDiagnostics.CreateScope("ElasticAccountCollection.Get"); + scope.Start(); + try + { + var response = _elasticAccountRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, accountName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticAccountResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List and describe all NetApp elastic accounts in the resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts + /// + /// + /// Operation Id + /// ElasticAccounts_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _elasticAccountRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _elasticAccountRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ElasticAccountResource(Client, ElasticAccountData.DeserializeElasticAccountData(e)), _elasticAccountClientDiagnostics, Pipeline, "ElasticAccountCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List and describe all NetApp elastic accounts in the resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts + /// + /// + /// Operation Id + /// ElasticAccounts_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _elasticAccountRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _elasticAccountRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ElasticAccountResource(Client, ElasticAccountData.DeserializeElasticAccountData(e)), _elasticAccountClientDiagnostics, Pipeline, "ElasticAccountCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName} + /// + /// + /// Operation Id + /// ElasticAccounts_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticAccount. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var scope = _elasticAccountClientDiagnostics.CreateScope("ElasticAccountCollection.Exists"); + scope.Start(); + try + { + var response = await _elasticAccountRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, accountName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName} + /// + /// + /// Operation Id + /// ElasticAccounts_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticAccount. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var scope = _elasticAccountClientDiagnostics.CreateScope("ElasticAccountCollection.Exists"); + scope.Start(); + try + { + var response = _elasticAccountRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, accountName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName} + /// + /// + /// Operation Id + /// ElasticAccounts_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticAccount. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var scope = _elasticAccountClientDiagnostics.CreateScope("ElasticAccountCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _elasticAccountRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, accountName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ElasticAccountResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName} + /// + /// + /// Operation Id + /// ElasticAccounts_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticAccount. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var scope = _elasticAccountClientDiagnostics.CreateScope("ElasticAccountCollection.GetIfExists"); + scope.Start(); + try + { + var response = _elasticAccountRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, accountName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ElasticAccountResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticAccountData.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticAccountData.Serialization.cs new file mode 100644 index 000000000000..4daa9db850a2 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticAccountData.Serialization.cs @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + public partial class ElasticAccountData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticAccountData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + ((IJsonModel)Identity).Write(writer, ModelSerializationExtensions.WireV3Options); + } + } + + ElasticAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticAccountData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticAccountData(document.RootElement, options); + } + + internal static ElasticAccountData DeserializeElasticAccountData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ElasticAccountProperties properties = default; + ETag? etag = default; + ManagedServiceIdentity identity = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ElasticAccountProperties.DeserializeElasticAccountProperties(property.Value, options); + continue; + } + if (property.NameEquals("eTag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(property.Value.GetString()); + continue; + } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireV3Options, AzureResourceManagerNetAppContext.Default); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerNetAppContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticAccountData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + etag, + identity, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticAccountData)} does not support writing '{options.Format}' format."); + } + } + + ElasticAccountData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticAccountData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticAccountData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticAccountData.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticAccountData.cs new file mode 100644 index 000000000000..52c91aa8c536 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticAccountData.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A class representing the ElasticAccount data model. + /// NetApp elastic account resource + /// + public partial class ElasticAccountData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public ElasticAccountData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// 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. + /// The managed service identities assigned to this resource. + /// Keeps track of any properties unknown to the library. + internal ElasticAccountData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ElasticAccountProperties properties, ETag? etag, ManagedServiceIdentity identity, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + ETag = etag; + Identity = identity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ElasticAccountData() + { + } + + /// The resource-specific properties for this resource. + public ElasticAccountProperties Properties { get; set; } + /// 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. + public ETag? ETag { get; } + /// The managed service identities assigned to this resource. + public ManagedServiceIdentity Identity { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticAccountResource.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticAccountResource.Serialization.cs new file mode 100644 index 000000000000..7e9bf0ede5fb --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticAccountResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.NetApp +{ + public partial class ElasticAccountResource : IJsonModel + { + private static ElasticAccountData s_dataDeserializationInstance; + private static ElasticAccountData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ElasticAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetAppContext.Default); + + ElasticAccountData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetAppContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticAccountResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticAccountResource.cs new file mode 100644 index 000000000000..1b5978eb6530 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticAccountResource.cs @@ -0,0 +1,983 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NetApp.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A Class representing an ElasticAccount along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetElasticAccountResource method. + /// Otherwise you can get one from its parent resource using the GetElasticAccount method. + /// + public partial class ElasticAccountResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The accountName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _elasticAccountClientDiagnostics; + private readonly ElasticAccountsRestOperations _elasticAccountRestClient; + private readonly ElasticAccountData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.NetApp/elasticAccounts"; + + /// Initializes a new instance of the class for mocking. + protected ElasticAccountResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ElasticAccountResource(ArmClient client, ElasticAccountData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ElasticAccountResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _elasticAccountClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NetApp", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string elasticAccountApiVersion); + _elasticAccountRestClient = new ElasticAccountsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, elasticAccountApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ElasticAccountData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of ElasticBackupPolicyResources in the ElasticAccount. + /// An object representing collection of ElasticBackupPolicyResources and their operations over a ElasticBackupPolicyResource. + public virtual ElasticBackupPolicyCollection GetElasticBackupPolicies() + { + return GetCachedClient(client => new ElasticBackupPolicyCollection(client, Id)); + } + + /// + /// Get the Elastic Backup Policy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName} + /// + /// + /// Operation Id + /// ElasticBackupPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticBackupPolicy. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetElasticBackupPolicyAsync(string backupPolicyName, CancellationToken cancellationToken = default) + { + return await GetElasticBackupPolicies().GetAsync(backupPolicyName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the Elastic Backup Policy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName} + /// + /// + /// Operation Id + /// ElasticBackupPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticBackupPolicy. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetElasticBackupPolicy(string backupPolicyName, CancellationToken cancellationToken = default) + { + return GetElasticBackupPolicies().Get(backupPolicyName, cancellationToken); + } + + /// Gets a collection of ElasticBackupVaultResources in the ElasticAccount. + /// An object representing collection of ElasticBackupVaultResources and their operations over a ElasticBackupVaultResource. + public virtual ElasticBackupVaultCollection GetElasticBackupVaults() + { + return GetCachedClient(client => new ElasticBackupVaultCollection(client, Id)); + } + + /// + /// Get the Elastic Backup Vault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName} + /// + /// + /// Operation Id + /// ElasticBackupVaults_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticBackupVault. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetElasticBackupVaultAsync(string backupVaultName, CancellationToken cancellationToken = default) + { + return await GetElasticBackupVaults().GetAsync(backupVaultName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the Elastic Backup Vault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName} + /// + /// + /// Operation Id + /// ElasticBackupVaults_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticBackupVault. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetElasticBackupVault(string backupVaultName, CancellationToken cancellationToken = default) + { + return GetElasticBackupVaults().Get(backupVaultName, cancellationToken); + } + + /// Gets a collection of ElasticCapacityPoolResources in the ElasticAccount. + /// An object representing collection of ElasticCapacityPoolResources and their operations over a ElasticCapacityPoolResource. + public virtual ElasticCapacityPoolCollection GetElasticCapacityPools() + { + return GetCachedClient(client => new ElasticCapacityPoolCollection(client, Id)); + } + + /// + /// Get the NetApp Elastic Capacity Pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName} + /// + /// + /// Operation Id + /// ElasticCapacityPools_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticCapacityPool. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetElasticCapacityPoolAsync(string poolName, CancellationToken cancellationToken = default) + { + return await GetElasticCapacityPools().GetAsync(poolName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the NetApp Elastic Capacity Pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName} + /// + /// + /// Operation Id + /// ElasticCapacityPools_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticCapacityPool. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetElasticCapacityPool(string poolName, CancellationToken cancellationToken = default) + { + return GetElasticCapacityPools().Get(poolName, cancellationToken); + } + + /// Gets a collection of ElasticSnapshotPolicyResources in the ElasticAccount. + /// An object representing collection of ElasticSnapshotPolicyResources and their operations over a ElasticSnapshotPolicyResource. + public virtual ElasticSnapshotPolicyCollection GetElasticSnapshotPolicies() + { + return GetCachedClient(client => new ElasticSnapshotPolicyCollection(client, Id)); + } + + /// + /// Get a ElasticSnapshotPolicy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName} + /// + /// + /// Operation Id + /// ElasticSnapshotPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticSnapshotPolicy. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetElasticSnapshotPolicyAsync(string snapshotPolicyName, CancellationToken cancellationToken = default) + { + return await GetElasticSnapshotPolicies().GetAsync(snapshotPolicyName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a ElasticSnapshotPolicy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName} + /// + /// + /// Operation Id + /// ElasticSnapshotPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticSnapshotPolicy. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetElasticSnapshotPolicy(string snapshotPolicyName, CancellationToken cancellationToken = default) + { + return GetElasticSnapshotPolicies().Get(snapshotPolicyName, cancellationToken); + } + + /// + /// Get the NetApp Elastic Account + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName} + /// + /// + /// Operation Id + /// ElasticAccounts_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _elasticAccountClientDiagnostics.CreateScope("ElasticAccountResource.Get"); + scope.Start(); + try + { + var response = await _elasticAccountRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticAccountResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the NetApp Elastic Account + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName} + /// + /// + /// Operation Id + /// ElasticAccounts_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _elasticAccountClientDiagnostics.CreateScope("ElasticAccountResource.Get"); + scope.Start(); + try + { + var response = _elasticAccountRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticAccountResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the specified NetApp elastic account + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName} + /// + /// + /// Operation Id + /// ElasticAccounts_Delete + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _elasticAccountClientDiagnostics.CreateScope("ElasticAccountResource.Delete"); + scope.Start(); + try + { + var response = await _elasticAccountRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(_elasticAccountClientDiagnostics, Pipeline, _elasticAccountRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the specified NetApp elastic account + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName} + /// + /// + /// Operation Id + /// ElasticAccounts_Delete + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _elasticAccountClientDiagnostics.CreateScope("ElasticAccountResource.Delete"); + scope.Start(); + try + { + var response = _elasticAccountRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new NetAppArmOperation(_elasticAccountClientDiagnostics, Pipeline, _elasticAccountRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Patch the specified NetApp Elastic Account + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName} + /// + /// + /// Operation Id + /// ElasticAccounts_Update + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ElasticAccountPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _elasticAccountClientDiagnostics.CreateScope("ElasticAccountResource.Update"); + scope.Start(); + try + { + var response = await _elasticAccountRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(new ElasticAccountOperationSource(Client), _elasticAccountClientDiagnostics, Pipeline, _elasticAccountRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Patch the specified NetApp Elastic Account + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName} + /// + /// + /// Operation Id + /// ElasticAccounts_Update + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ElasticAccountPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _elasticAccountClientDiagnostics.CreateScope("ElasticAccountResource.Update"); + scope.Start(); + try + { + var response = _elasticAccountRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new NetAppArmOperation(new ElasticAccountOperationSource(Client), _elasticAccountClientDiagnostics, Pipeline, _elasticAccountRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName} + /// + /// + /// Operation Id + /// ElasticAccounts_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _elasticAccountClientDiagnostics.CreateScope("ElasticAccountResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _elasticAccountRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ElasticAccountResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ElasticAccountPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName} + /// + /// + /// Operation Id + /// ElasticAccounts_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _elasticAccountClientDiagnostics.CreateScope("ElasticAccountResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _elasticAccountRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ElasticAccountResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ElasticAccountPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName} + /// + /// + /// Operation Id + /// ElasticAccounts_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _elasticAccountClientDiagnostics.CreateScope("ElasticAccountResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _elasticAccountRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ElasticAccountResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ElasticAccountPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName} + /// + /// + /// Operation Id + /// ElasticAccounts_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _elasticAccountClientDiagnostics.CreateScope("ElasticAccountResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _elasticAccountRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ElasticAccountResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ElasticAccountPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName} + /// + /// + /// Operation Id + /// ElasticAccounts_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _elasticAccountClientDiagnostics.CreateScope("ElasticAccountResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _elasticAccountRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ElasticAccountResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ElasticAccountPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName} + /// + /// + /// Operation Id + /// ElasticAccounts_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _elasticAccountClientDiagnostics.CreateScope("ElasticAccountResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _elasticAccountRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ElasticAccountResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ElasticAccountPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupCollection.cs new file mode 100644 index 000000000000..aa7532d0ec1e --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetElasticBackups method from an instance of . + /// + public partial class ElasticBackupCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _elasticBackupClientDiagnostics; + private readonly ElasticBackupsRestOperations _elasticBackupRestClient; + + /// Initializes a new instance of the class for mocking. + protected ElasticBackupCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ElasticBackupCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _elasticBackupClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NetApp", ElasticBackupResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ElasticBackupResource.ResourceType, out string elasticBackupApiVersion); + _elasticBackupRestClient = new ElasticBackupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, elasticBackupApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ElasticBackupVaultResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ElasticBackupVaultResource.ResourceType), nameof(id)); + } + + /// + /// Create an elastic backup under the elastic Backup Vault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName} + /// + /// + /// Operation Id + /// ElasticBackups_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the ElasticBackup. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string backupName, ElasticBackupData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _elasticBackupClientDiagnostics.CreateScope("ElasticBackupCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _elasticBackupRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, backupName, data, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(new ElasticBackupOperationSource(Client), _elasticBackupClientDiagnostics, Pipeline, _elasticBackupRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, backupName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create an elastic backup under the elastic Backup Vault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName} + /// + /// + /// Operation Id + /// ElasticBackups_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the ElasticBackup. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string backupName, ElasticBackupData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _elasticBackupClientDiagnostics.CreateScope("ElasticBackupCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _elasticBackupRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, backupName, data, cancellationToken); + var operation = new NetAppArmOperation(new ElasticBackupOperationSource(Client), _elasticBackupClientDiagnostics, Pipeline, _elasticBackupRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, backupName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the specified Elastic Backup under Elastic Backup Vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName} + /// + /// + /// Operation Id + /// ElasticBackups_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticBackup. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string backupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); + + using var scope = _elasticBackupClientDiagnostics.CreateScope("ElasticBackupCollection.Get"); + scope.Start(); + try + { + var response = await _elasticBackupRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, backupName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticBackupResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the specified Elastic Backup under Elastic Backup Vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName} + /// + /// + /// Operation Id + /// ElasticBackups_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticBackup. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string backupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); + + using var scope = _elasticBackupClientDiagnostics.CreateScope("ElasticBackupCollection.Get"); + scope.Start(); + try + { + var response = _elasticBackupRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, backupName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticBackupResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List all elastic backups Under an elastic Backup Vault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups + /// + /// + /// Operation Id + /// ElasticBackups_ListByVault + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _elasticBackupRestClient.CreateListByVaultRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _elasticBackupRestClient.CreateListByVaultNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ElasticBackupResource(Client, ElasticBackupData.DeserializeElasticBackupData(e)), _elasticBackupClientDiagnostics, Pipeline, "ElasticBackupCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List all elastic backups Under an elastic Backup Vault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups + /// + /// + /// Operation Id + /// ElasticBackups_ListByVault + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _elasticBackupRestClient.CreateListByVaultRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _elasticBackupRestClient.CreateListByVaultNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ElasticBackupResource(Client, ElasticBackupData.DeserializeElasticBackupData(e)), _elasticBackupClientDiagnostics, Pipeline, "ElasticBackupCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName} + /// + /// + /// Operation Id + /// ElasticBackups_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticBackup. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string backupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); + + using var scope = _elasticBackupClientDiagnostics.CreateScope("ElasticBackupCollection.Exists"); + scope.Start(); + try + { + var response = await _elasticBackupRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, backupName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName} + /// + /// + /// Operation Id + /// ElasticBackups_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticBackup. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string backupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); + + using var scope = _elasticBackupClientDiagnostics.CreateScope("ElasticBackupCollection.Exists"); + scope.Start(); + try + { + var response = _elasticBackupRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, backupName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName} + /// + /// + /// Operation Id + /// ElasticBackups_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticBackup. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string backupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); + + using var scope = _elasticBackupClientDiagnostics.CreateScope("ElasticBackupCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _elasticBackupRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, backupName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ElasticBackupResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName} + /// + /// + /// Operation Id + /// ElasticBackups_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticBackup. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string backupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); + + using var scope = _elasticBackupClientDiagnostics.CreateScope("ElasticBackupCollection.GetIfExists"); + scope.Start(); + try + { + var response = _elasticBackupRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, backupName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ElasticBackupResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupData.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupData.Serialization.cs new file mode 100644 index 000000000000..067cf78831f9 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupData.Serialization.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + public partial class ElasticBackupData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticBackupData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + ElasticBackupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticBackupData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticBackupData(document.RootElement, options); + } + + internal static ElasticBackupData DeserializeElasticBackupData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ElasticBackupProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ElasticBackupProperties.DeserializeElasticBackupProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerNetAppContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticBackupData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticBackupData)} does not support writing '{options.Format}' format."); + } + } + + ElasticBackupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticBackupData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticBackupData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupData.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupData.cs new file mode 100644 index 000000000000..e7f8444d5e28 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A class representing the ElasticBackup data model. + /// NetApp Elastic Backup under an elastic Backup Vault + /// + public partial class ElasticBackupData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticBackupData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal ElasticBackupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ElasticBackupProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public ElasticBackupProperties Properties { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupPolicyCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupPolicyCollection.cs new file mode 100644 index 000000000000..5964dc9db0b9 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupPolicyCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetElasticBackupPolicies method from an instance of . + /// + public partial class ElasticBackupPolicyCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _elasticBackupPolicyClientDiagnostics; + private readonly ElasticBackupPoliciesRestOperations _elasticBackupPolicyRestClient; + + /// Initializes a new instance of the class for mocking. + protected ElasticBackupPolicyCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ElasticBackupPolicyCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _elasticBackupPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NetApp", ElasticBackupPolicyResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ElasticBackupPolicyResource.ResourceType, out string elasticBackupPolicyApiVersion); + _elasticBackupPolicyRestClient = new ElasticBackupPoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, elasticBackupPolicyApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ElasticAccountResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ElasticAccountResource.ResourceType), nameof(id)); + } + + /// + /// Create or update the specified Elastic Backup Policy in the NetApp account + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName} + /// + /// + /// Operation Id + /// ElasticBackupPolicies_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the ElasticBackupPolicy. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string backupPolicyName, ElasticBackupPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backupPolicyName, nameof(backupPolicyName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _elasticBackupPolicyClientDiagnostics.CreateScope("ElasticBackupPolicyCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _elasticBackupPolicyRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, backupPolicyName, data, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(new ElasticBackupPolicyOperationSource(Client), _elasticBackupPolicyClientDiagnostics, Pipeline, _elasticBackupPolicyRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, backupPolicyName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update the specified Elastic Backup Policy in the NetApp account + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName} + /// + /// + /// Operation Id + /// ElasticBackupPolicies_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the ElasticBackupPolicy. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string backupPolicyName, ElasticBackupPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backupPolicyName, nameof(backupPolicyName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _elasticBackupPolicyClientDiagnostics.CreateScope("ElasticBackupPolicyCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _elasticBackupPolicyRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, backupPolicyName, data, cancellationToken); + var operation = new NetAppArmOperation(new ElasticBackupPolicyOperationSource(Client), _elasticBackupPolicyClientDiagnostics, Pipeline, _elasticBackupPolicyRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, backupPolicyName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Elastic Backup Policy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName} + /// + /// + /// Operation Id + /// ElasticBackupPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticBackupPolicy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string backupPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backupPolicyName, nameof(backupPolicyName)); + + using var scope = _elasticBackupPolicyClientDiagnostics.CreateScope("ElasticBackupPolicyCollection.Get"); + scope.Start(); + try + { + var response = await _elasticBackupPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, backupPolicyName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticBackupPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Elastic Backup Policy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName} + /// + /// + /// Operation Id + /// ElasticBackupPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticBackupPolicy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string backupPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backupPolicyName, nameof(backupPolicyName)); + + using var scope = _elasticBackupPolicyClientDiagnostics.CreateScope("ElasticBackupPolicyCollection.Get"); + scope.Start(); + try + { + var response = _elasticBackupPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, backupPolicyName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticBackupPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List and describe all Elastic Backup Policies in the elastic account. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies + /// + /// + /// Operation Id + /// ElasticBackupPolicies_ListByElasticAccount + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _elasticBackupPolicyRestClient.CreateListByElasticAccountRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _elasticBackupPolicyRestClient.CreateListByElasticAccountNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ElasticBackupPolicyResource(Client, ElasticBackupPolicyData.DeserializeElasticBackupPolicyData(e)), _elasticBackupPolicyClientDiagnostics, Pipeline, "ElasticBackupPolicyCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List and describe all Elastic Backup Policies in the elastic account. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies + /// + /// + /// Operation Id + /// ElasticBackupPolicies_ListByElasticAccount + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _elasticBackupPolicyRestClient.CreateListByElasticAccountRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _elasticBackupPolicyRestClient.CreateListByElasticAccountNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ElasticBackupPolicyResource(Client, ElasticBackupPolicyData.DeserializeElasticBackupPolicyData(e)), _elasticBackupPolicyClientDiagnostics, Pipeline, "ElasticBackupPolicyCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName} + /// + /// + /// Operation Id + /// ElasticBackupPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticBackupPolicy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string backupPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backupPolicyName, nameof(backupPolicyName)); + + using var scope = _elasticBackupPolicyClientDiagnostics.CreateScope("ElasticBackupPolicyCollection.Exists"); + scope.Start(); + try + { + var response = await _elasticBackupPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, backupPolicyName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName} + /// + /// + /// Operation Id + /// ElasticBackupPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticBackupPolicy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string backupPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backupPolicyName, nameof(backupPolicyName)); + + using var scope = _elasticBackupPolicyClientDiagnostics.CreateScope("ElasticBackupPolicyCollection.Exists"); + scope.Start(); + try + { + var response = _elasticBackupPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, backupPolicyName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName} + /// + /// + /// Operation Id + /// ElasticBackupPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticBackupPolicy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string backupPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backupPolicyName, nameof(backupPolicyName)); + + using var scope = _elasticBackupPolicyClientDiagnostics.CreateScope("ElasticBackupPolicyCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _elasticBackupPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, backupPolicyName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ElasticBackupPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName} + /// + /// + /// Operation Id + /// ElasticBackupPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticBackupPolicy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string backupPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backupPolicyName, nameof(backupPolicyName)); + + using var scope = _elasticBackupPolicyClientDiagnostics.CreateScope("ElasticBackupPolicyCollection.GetIfExists"); + scope.Start(); + try + { + var response = _elasticBackupPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, backupPolicyName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ElasticBackupPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupPolicyData.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupPolicyData.Serialization.cs new file mode 100644 index 000000000000..85abf6de142c --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupPolicyData.Serialization.cs @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + public partial class ElasticBackupPolicyData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticBackupPolicyData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + } + + ElasticBackupPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticBackupPolicyData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticBackupPolicyData(document.RootElement, options); + } + + internal static ElasticBackupPolicyData DeserializeElasticBackupPolicyData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ElasticBackupPolicyProperties properties = default; + ETag? etag = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ElasticBackupPolicyProperties.DeserializeElasticBackupPolicyProperties(property.Value, options); + continue; + } + if (property.NameEquals("eTag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(property.Value.GetString()); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerNetAppContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticBackupPolicyData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + etag, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticBackupPolicyData)} does not support writing '{options.Format}' format."); + } + } + + ElasticBackupPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticBackupPolicyData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticBackupPolicyData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupPolicyData.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupPolicyData.cs new file mode 100644 index 000000000000..ae487f217fa3 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupPolicyData.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A class representing the ElasticBackupPolicy data model. + /// NetApp Elastic Backup Policy resource + /// + public partial class ElasticBackupPolicyData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public ElasticBackupPolicyData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// 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. + /// Keeps track of any properties unknown to the library. + internal ElasticBackupPolicyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ElasticBackupPolicyProperties properties, ETag? etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + ETag = etag; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ElasticBackupPolicyData() + { + } + + /// The resource-specific properties for this resource. + public ElasticBackupPolicyProperties Properties { get; set; } + /// 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. + public ETag? ETag { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupPolicyResource.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupPolicyResource.Serialization.cs new file mode 100644 index 000000000000..c12b00c6b8fe --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupPolicyResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.NetApp +{ + public partial class ElasticBackupPolicyResource : IJsonModel + { + private static ElasticBackupPolicyData s_dataDeserializationInstance; + private static ElasticBackupPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ElasticBackupPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetAppContext.Default); + + ElasticBackupPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetAppContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupPolicyResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupPolicyResource.cs new file mode 100644 index 000000000000..59d057a5cf9d --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupPolicyResource.cs @@ -0,0 +1,707 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A Class representing an ElasticBackupPolicy along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetElasticBackupPolicyResource method. + /// Otherwise you can get one from its parent resource using the GetElasticBackupPolicy method. + /// + public partial class ElasticBackupPolicyResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The accountName. + /// The backupPolicyName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string backupPolicyName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _elasticBackupPolicyClientDiagnostics; + private readonly ElasticBackupPoliciesRestOperations _elasticBackupPolicyRestClient; + private readonly ElasticBackupPolicyData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.NetApp/elasticAccounts/elasticBackupPolicies"; + + /// Initializes a new instance of the class for mocking. + protected ElasticBackupPolicyResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ElasticBackupPolicyResource(ArmClient client, ElasticBackupPolicyData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ElasticBackupPolicyResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _elasticBackupPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NetApp", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string elasticBackupPolicyApiVersion); + _elasticBackupPolicyRestClient = new ElasticBackupPoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, elasticBackupPolicyApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ElasticBackupPolicyData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get the Elastic Backup Policy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName} + /// + /// + /// Operation Id + /// ElasticBackupPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _elasticBackupPolicyClientDiagnostics.CreateScope("ElasticBackupPolicyResource.Get"); + scope.Start(); + try + { + var response = await _elasticBackupPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticBackupPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Elastic Backup Policy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName} + /// + /// + /// Operation Id + /// ElasticBackupPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _elasticBackupPolicyClientDiagnostics.CreateScope("ElasticBackupPolicyResource.Get"); + scope.Start(); + try + { + var response = _elasticBackupPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticBackupPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the specified Elastic Policy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName} + /// + /// + /// Operation Id + /// ElasticBackupPolicies_Delete + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _elasticBackupPolicyClientDiagnostics.CreateScope("ElasticBackupPolicyResource.Delete"); + scope.Start(); + try + { + var response = await _elasticBackupPolicyRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(_elasticBackupPolicyClientDiagnostics, Pipeline, _elasticBackupPolicyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the specified Elastic Policy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName} + /// + /// + /// Operation Id + /// ElasticBackupPolicies_Delete + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _elasticBackupPolicyClientDiagnostics.CreateScope("ElasticBackupPolicyResource.Delete"); + scope.Start(); + try + { + var response = _elasticBackupPolicyRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new NetAppArmOperation(_elasticBackupPolicyClientDiagnostics, Pipeline, _elasticBackupPolicyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Patch the specified NetApp Elastic Backup Policy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName} + /// + /// + /// Operation Id + /// ElasticBackupPolicies_Update + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ElasticBackupPolicyPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _elasticBackupPolicyClientDiagnostics.CreateScope("ElasticBackupPolicyResource.Update"); + scope.Start(); + try + { + var response = await _elasticBackupPolicyRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(new ElasticBackupPolicyOperationSource(Client), _elasticBackupPolicyClientDiagnostics, Pipeline, _elasticBackupPolicyRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Patch the specified NetApp Elastic Backup Policy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName} + /// + /// + /// Operation Id + /// ElasticBackupPolicies_Update + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ElasticBackupPolicyPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _elasticBackupPolicyClientDiagnostics.CreateScope("ElasticBackupPolicyResource.Update"); + scope.Start(); + try + { + var response = _elasticBackupPolicyRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new NetAppArmOperation(new ElasticBackupPolicyOperationSource(Client), _elasticBackupPolicyClientDiagnostics, Pipeline, _elasticBackupPolicyRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName} + /// + /// + /// Operation Id + /// ElasticBackupPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _elasticBackupPolicyClientDiagnostics.CreateScope("ElasticBackupPolicyResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _elasticBackupPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ElasticBackupPolicyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ElasticBackupPolicyPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName} + /// + /// + /// Operation Id + /// ElasticBackupPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _elasticBackupPolicyClientDiagnostics.CreateScope("ElasticBackupPolicyResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _elasticBackupPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new ElasticBackupPolicyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ElasticBackupPolicyPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName} + /// + /// + /// Operation Id + /// ElasticBackupPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _elasticBackupPolicyClientDiagnostics.CreateScope("ElasticBackupPolicyResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _elasticBackupPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ElasticBackupPolicyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ElasticBackupPolicyPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName} + /// + /// + /// Operation Id + /// ElasticBackupPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _elasticBackupPolicyClientDiagnostics.CreateScope("ElasticBackupPolicyResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _elasticBackupPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new ElasticBackupPolicyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ElasticBackupPolicyPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName} + /// + /// + /// Operation Id + /// ElasticBackupPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _elasticBackupPolicyClientDiagnostics.CreateScope("ElasticBackupPolicyResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _elasticBackupPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ElasticBackupPolicyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ElasticBackupPolicyPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupPolicies/{backupPolicyName} + /// + /// + /// Operation Id + /// ElasticBackupPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _elasticBackupPolicyClientDiagnostics.CreateScope("ElasticBackupPolicyResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _elasticBackupPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new ElasticBackupPolicyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ElasticBackupPolicyPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupResource.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupResource.Serialization.cs new file mode 100644 index 000000000000..40f61965c676 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.NetApp +{ + public partial class ElasticBackupResource : IJsonModel + { + private static ElasticBackupData s_dataDeserializationInstance; + private static ElasticBackupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ElasticBackupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetAppContext.Default); + + ElasticBackupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetAppContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupResource.cs new file mode 100644 index 000000000000..9456a2660d4d --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupResource.cs @@ -0,0 +1,349 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A Class representing an ElasticBackup along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetElasticBackupResource method. + /// Otherwise you can get one from its parent resource using the GetElasticBackup method. + /// + public partial class ElasticBackupResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The accountName. + /// The backupVaultName. + /// The backupName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, string backupName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _elasticBackupClientDiagnostics; + private readonly ElasticBackupsRestOperations _elasticBackupRestClient; + private readonly ElasticBackupData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.NetApp/elasticAccounts/elasticBackupVaults/elasticBackups"; + + /// Initializes a new instance of the class for mocking. + protected ElasticBackupResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ElasticBackupResource(ArmClient client, ElasticBackupData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ElasticBackupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _elasticBackupClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NetApp", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string elasticBackupApiVersion); + _elasticBackupRestClient = new ElasticBackupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, elasticBackupApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ElasticBackupData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get the specified Elastic Backup under Elastic Backup Vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName} + /// + /// + /// Operation Id + /// ElasticBackups_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _elasticBackupClientDiagnostics.CreateScope("ElasticBackupResource.Get"); + scope.Start(); + try + { + var response = await _elasticBackupRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticBackupResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the specified Elastic Backup under Elastic Backup Vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName} + /// + /// + /// Operation Id + /// ElasticBackups_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _elasticBackupClientDiagnostics.CreateScope("ElasticBackupResource.Get"); + scope.Start(); + try + { + var response = _elasticBackupRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticBackupResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a ElasticBackup + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName} + /// + /// + /// Operation Id + /// ElasticBackups_Delete + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _elasticBackupClientDiagnostics.CreateScope("ElasticBackupResource.Delete"); + scope.Start(); + try + { + var response = await _elasticBackupRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(_elasticBackupClientDiagnostics, Pipeline, _elasticBackupRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a ElasticBackup + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName} + /// + /// + /// Operation Id + /// ElasticBackups_Delete + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _elasticBackupClientDiagnostics.CreateScope("ElasticBackupResource.Delete"); + scope.Start(); + try + { + var response = _elasticBackupRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new NetAppArmOperation(_elasticBackupClientDiagnostics, Pipeline, _elasticBackupRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Patch an elastic Backup under the Elastic Backup Vault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName} + /// + /// + /// Operation Id + /// ElasticBackups_Update + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ElasticBackupPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _elasticBackupClientDiagnostics.CreateScope("ElasticBackupResource.Update"); + scope.Start(); + try + { + var response = await _elasticBackupRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(new ElasticBackupOperationSource(Client), _elasticBackupClientDiagnostics, Pipeline, _elasticBackupRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Patch an elastic Backup under the Elastic Backup Vault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName} + /// + /// + /// Operation Id + /// ElasticBackups_Update + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ElasticBackupPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _elasticBackupClientDiagnostics.CreateScope("ElasticBackupResource.Update"); + scope.Start(); + try + { + var response = _elasticBackupRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new NetAppArmOperation(new ElasticBackupOperationSource(Client), _elasticBackupClientDiagnostics, Pipeline, _elasticBackupRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupVaultCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupVaultCollection.cs new file mode 100644 index 000000000000..02decf9be01e --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupVaultCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetElasticBackupVaults method from an instance of . + /// + public partial class ElasticBackupVaultCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _elasticBackupVaultClientDiagnostics; + private readonly ElasticBackupVaultsRestOperations _elasticBackupVaultRestClient; + + /// Initializes a new instance of the class for mocking. + protected ElasticBackupVaultCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ElasticBackupVaultCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _elasticBackupVaultClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NetApp", ElasticBackupVaultResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ElasticBackupVaultResource.ResourceType, out string elasticBackupVaultApiVersion); + _elasticBackupVaultRestClient = new ElasticBackupVaultsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, elasticBackupVaultApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ElasticAccountResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ElasticAccountResource.ResourceType), nameof(id)); + } + + /// + /// Create or update the specified Elastic Backup Vault in the Elastic NetApp account + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName} + /// + /// + /// Operation Id + /// ElasticBackupVaults_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the ElasticBackupVault. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string backupVaultName, ElasticBackupVaultData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backupVaultName, nameof(backupVaultName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _elasticBackupVaultClientDiagnostics.CreateScope("ElasticBackupVaultCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _elasticBackupVaultRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, backupVaultName, data, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(new ElasticBackupVaultOperationSource(Client), _elasticBackupVaultClientDiagnostics, Pipeline, _elasticBackupVaultRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, backupVaultName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update the specified Elastic Backup Vault in the Elastic NetApp account + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName} + /// + /// + /// Operation Id + /// ElasticBackupVaults_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the ElasticBackupVault. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string backupVaultName, ElasticBackupVaultData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backupVaultName, nameof(backupVaultName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _elasticBackupVaultClientDiagnostics.CreateScope("ElasticBackupVaultCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _elasticBackupVaultRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, backupVaultName, data, cancellationToken); + var operation = new NetAppArmOperation(new ElasticBackupVaultOperationSource(Client), _elasticBackupVaultClientDiagnostics, Pipeline, _elasticBackupVaultRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, backupVaultName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Elastic Backup Vault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName} + /// + /// + /// Operation Id + /// ElasticBackupVaults_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticBackupVault. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string backupVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backupVaultName, nameof(backupVaultName)); + + using var scope = _elasticBackupVaultClientDiagnostics.CreateScope("ElasticBackupVaultCollection.Get"); + scope.Start(); + try + { + var response = await _elasticBackupVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, backupVaultName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticBackupVaultResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Elastic Backup Vault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName} + /// + /// + /// Operation Id + /// ElasticBackupVaults_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticBackupVault. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string backupVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backupVaultName, nameof(backupVaultName)); + + using var scope = _elasticBackupVaultClientDiagnostics.CreateScope("ElasticBackupVaultCollection.Get"); + scope.Start(); + try + { + var response = _elasticBackupVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, backupVaultName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticBackupVaultResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List and describe all Elastic Backup Vaults in the elastic account. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults + /// + /// + /// Operation Id + /// ElasticBackupVaults_ListByElasticAccount + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _elasticBackupVaultRestClient.CreateListByElasticAccountRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _elasticBackupVaultRestClient.CreateListByElasticAccountNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ElasticBackupVaultResource(Client, ElasticBackupVaultData.DeserializeElasticBackupVaultData(e)), _elasticBackupVaultClientDiagnostics, Pipeline, "ElasticBackupVaultCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List and describe all Elastic Backup Vaults in the elastic account. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults + /// + /// + /// Operation Id + /// ElasticBackupVaults_ListByElasticAccount + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _elasticBackupVaultRestClient.CreateListByElasticAccountRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _elasticBackupVaultRestClient.CreateListByElasticAccountNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ElasticBackupVaultResource(Client, ElasticBackupVaultData.DeserializeElasticBackupVaultData(e)), _elasticBackupVaultClientDiagnostics, Pipeline, "ElasticBackupVaultCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName} + /// + /// + /// Operation Id + /// ElasticBackupVaults_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticBackupVault. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string backupVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backupVaultName, nameof(backupVaultName)); + + using var scope = _elasticBackupVaultClientDiagnostics.CreateScope("ElasticBackupVaultCollection.Exists"); + scope.Start(); + try + { + var response = await _elasticBackupVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, backupVaultName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName} + /// + /// + /// Operation Id + /// ElasticBackupVaults_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticBackupVault. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string backupVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backupVaultName, nameof(backupVaultName)); + + using var scope = _elasticBackupVaultClientDiagnostics.CreateScope("ElasticBackupVaultCollection.Exists"); + scope.Start(); + try + { + var response = _elasticBackupVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, backupVaultName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName} + /// + /// + /// Operation Id + /// ElasticBackupVaults_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticBackupVault. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string backupVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backupVaultName, nameof(backupVaultName)); + + using var scope = _elasticBackupVaultClientDiagnostics.CreateScope("ElasticBackupVaultCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _elasticBackupVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, backupVaultName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ElasticBackupVaultResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName} + /// + /// + /// Operation Id + /// ElasticBackupVaults_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticBackupVault. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string backupVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backupVaultName, nameof(backupVaultName)); + + using var scope = _elasticBackupVaultClientDiagnostics.CreateScope("ElasticBackupVaultCollection.GetIfExists"); + scope.Start(); + try + { + var response = _elasticBackupVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, backupVaultName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ElasticBackupVaultResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupVaultData.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupVaultData.Serialization.cs new file mode 100644 index 000000000000..55349e08b24e --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupVaultData.Serialization.cs @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + public partial class ElasticBackupVaultData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticBackupVaultData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + } + + ElasticBackupVaultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticBackupVaultData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticBackupVaultData(document.RootElement, options); + } + + internal static ElasticBackupVaultData DeserializeElasticBackupVaultData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ElasticBackupVaultProperties properties = default; + ETag? etag = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ElasticBackupVaultProperties.DeserializeElasticBackupVaultProperties(property.Value, options); + continue; + } + if (property.NameEquals("eTag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(property.Value.GetString()); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerNetAppContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticBackupVaultData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + etag, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticBackupVaultData)} does not support writing '{options.Format}' format."); + } + } + + ElasticBackupVaultData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticBackupVaultData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticBackupVaultData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupVaultData.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupVaultData.cs new file mode 100644 index 000000000000..a8f426465d6e --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupVaultData.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A class representing the ElasticBackupVault data model. + /// NetApp elastic backup vault resource + /// + public partial class ElasticBackupVaultData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public ElasticBackupVaultData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// 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. + /// Keeps track of any properties unknown to the library. + internal ElasticBackupVaultData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ElasticBackupVaultProperties properties, ETag? etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + ETag = etag; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ElasticBackupVaultData() + { + } + + /// The resource-specific properties for this resource. + internal ElasticBackupVaultProperties Properties { get; set; } + /// Azure lifecycle management. + public NetAppProvisioningState? ElasticBackupVaultProvisioningState + { + get => Properties is null ? default : Properties.ProvisioningState; + } + + /// 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. + public ETag? ETag { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupVaultResource.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupVaultResource.Serialization.cs new file mode 100644 index 000000000000..a6526a0bc088 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupVaultResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.NetApp +{ + public partial class ElasticBackupVaultResource : IJsonModel + { + private static ElasticBackupVaultData s_dataDeserializationInstance; + private static ElasticBackupVaultData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ElasticBackupVaultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetAppContext.Default); + + ElasticBackupVaultData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetAppContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupVaultResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupVaultResource.cs new file mode 100644 index 000000000000..4f84897379f1 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticBackupVaultResource.cs @@ -0,0 +1,776 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A Class representing an ElasticBackupVault along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetElasticBackupVaultResource method. + /// Otherwise you can get one from its parent resource using the GetElasticBackupVault method. + /// + public partial class ElasticBackupVaultResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The accountName. + /// The backupVaultName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _elasticBackupVaultClientDiagnostics; + private readonly ElasticBackupVaultsRestOperations _elasticBackupVaultRestClient; + private readonly ElasticBackupVaultData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.NetApp/elasticAccounts/elasticBackupVaults"; + + /// Initializes a new instance of the class for mocking. + protected ElasticBackupVaultResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ElasticBackupVaultResource(ArmClient client, ElasticBackupVaultData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ElasticBackupVaultResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _elasticBackupVaultClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NetApp", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string elasticBackupVaultApiVersion); + _elasticBackupVaultRestClient = new ElasticBackupVaultsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, elasticBackupVaultApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ElasticBackupVaultData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of ElasticBackupResources in the ElasticBackupVault. + /// An object representing collection of ElasticBackupResources and their operations over a ElasticBackupResource. + public virtual ElasticBackupCollection GetElasticBackups() + { + return GetCachedClient(client => new ElasticBackupCollection(client, Id)); + } + + /// + /// Get the specified Elastic Backup under Elastic Backup Vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName} + /// + /// + /// Operation Id + /// ElasticBackups_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticBackup. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetElasticBackupAsync(string backupName, CancellationToken cancellationToken = default) + { + return await GetElasticBackups().GetAsync(backupName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the specified Elastic Backup under Elastic Backup Vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName}/elasticBackups/{backupName} + /// + /// + /// Operation Id + /// ElasticBackups_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticBackup. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetElasticBackup(string backupName, CancellationToken cancellationToken = default) + { + return GetElasticBackups().Get(backupName, cancellationToken); + } + + /// + /// Get the Elastic Backup Vault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName} + /// + /// + /// Operation Id + /// ElasticBackupVaults_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _elasticBackupVaultClientDiagnostics.CreateScope("ElasticBackupVaultResource.Get"); + scope.Start(); + try + { + var response = await _elasticBackupVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticBackupVaultResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the Elastic Backup Vault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName} + /// + /// + /// Operation Id + /// ElasticBackupVaults_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _elasticBackupVaultClientDiagnostics.CreateScope("ElasticBackupVaultResource.Get"); + scope.Start(); + try + { + var response = _elasticBackupVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticBackupVaultResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the specified Elastic Backup Vault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName} + /// + /// + /// Operation Id + /// ElasticBackupVaults_Delete + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _elasticBackupVaultClientDiagnostics.CreateScope("ElasticBackupVaultResource.Delete"); + scope.Start(); + try + { + var response = await _elasticBackupVaultRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(_elasticBackupVaultClientDiagnostics, Pipeline, _elasticBackupVaultRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the specified Elastic Backup Vault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName} + /// + /// + /// Operation Id + /// ElasticBackupVaults_Delete + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _elasticBackupVaultClientDiagnostics.CreateScope("ElasticBackupVaultResource.Delete"); + scope.Start(); + try + { + var response = _elasticBackupVaultRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new NetAppArmOperation(_elasticBackupVaultClientDiagnostics, Pipeline, _elasticBackupVaultRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Patch the specified NetApp Elastic Backup Vault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName} + /// + /// + /// Operation Id + /// ElasticBackupVaults_Update + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ElasticBackupVaultPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _elasticBackupVaultClientDiagnostics.CreateScope("ElasticBackupVaultResource.Update"); + scope.Start(); + try + { + var response = await _elasticBackupVaultRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(new ElasticBackupVaultOperationSource(Client), _elasticBackupVaultClientDiagnostics, Pipeline, _elasticBackupVaultRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Patch the specified NetApp Elastic Backup Vault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName} + /// + /// + /// Operation Id + /// ElasticBackupVaults_Update + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ElasticBackupVaultPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _elasticBackupVaultClientDiagnostics.CreateScope("ElasticBackupVaultResource.Update"); + scope.Start(); + try + { + var response = _elasticBackupVaultRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new NetAppArmOperation(new ElasticBackupVaultOperationSource(Client), _elasticBackupVaultClientDiagnostics, Pipeline, _elasticBackupVaultRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName} + /// + /// + /// Operation Id + /// ElasticBackupVaults_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _elasticBackupVaultClientDiagnostics.CreateScope("ElasticBackupVaultResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _elasticBackupVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ElasticBackupVaultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ElasticBackupVaultPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName} + /// + /// + /// Operation Id + /// ElasticBackupVaults_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _elasticBackupVaultClientDiagnostics.CreateScope("ElasticBackupVaultResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _elasticBackupVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new ElasticBackupVaultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ElasticBackupVaultPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName} + /// + /// + /// Operation Id + /// ElasticBackupVaults_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _elasticBackupVaultClientDiagnostics.CreateScope("ElasticBackupVaultResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _elasticBackupVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ElasticBackupVaultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ElasticBackupVaultPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName} + /// + /// + /// Operation Id + /// ElasticBackupVaults_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _elasticBackupVaultClientDiagnostics.CreateScope("ElasticBackupVaultResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _elasticBackupVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new ElasticBackupVaultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ElasticBackupVaultPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName} + /// + /// + /// Operation Id + /// ElasticBackupVaults_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _elasticBackupVaultClientDiagnostics.CreateScope("ElasticBackupVaultResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _elasticBackupVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ElasticBackupVaultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ElasticBackupVaultPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticBackupVaults/{backupVaultName} + /// + /// + /// Operation Id + /// ElasticBackupVaults_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _elasticBackupVaultClientDiagnostics.CreateScope("ElasticBackupVaultResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _elasticBackupVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new ElasticBackupVaultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ElasticBackupVaultPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticCapacityPoolCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticCapacityPoolCollection.cs new file mode 100644 index 000000000000..701649bbe335 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticCapacityPoolCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetElasticCapacityPools method from an instance of . + /// + public partial class ElasticCapacityPoolCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _elasticCapacityPoolClientDiagnostics; + private readonly ElasticCapacityPoolsRestOperations _elasticCapacityPoolRestClient; + + /// Initializes a new instance of the class for mocking. + protected ElasticCapacityPoolCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ElasticCapacityPoolCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _elasticCapacityPoolClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NetApp", ElasticCapacityPoolResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ElasticCapacityPoolResource.ResourceType, out string elasticCapacityPoolApiVersion); + _elasticCapacityPoolRestClient = new ElasticCapacityPoolsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, elasticCapacityPoolApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ElasticAccountResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ElasticAccountResource.ResourceType), nameof(id)); + } + + /// + /// Create or update the specified NetApp Elastic Capacity Pool within the resource group and NetApp Elastic Account + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName} + /// + /// + /// Operation Id + /// ElasticCapacityPools_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the ElasticCapacityPool. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string poolName, ElasticCapacityPoolData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _elasticCapacityPoolClientDiagnostics.CreateScope("ElasticCapacityPoolCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _elasticCapacityPoolRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, poolName, data, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(new ElasticCapacityPoolOperationSource(Client), _elasticCapacityPoolClientDiagnostics, Pipeline, _elasticCapacityPoolRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, poolName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update the specified NetApp Elastic Capacity Pool within the resource group and NetApp Elastic Account + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName} + /// + /// + /// Operation Id + /// ElasticCapacityPools_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the ElasticCapacityPool. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string poolName, ElasticCapacityPoolData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _elasticCapacityPoolClientDiagnostics.CreateScope("ElasticCapacityPoolCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _elasticCapacityPoolRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, poolName, data, cancellationToken); + var operation = new NetAppArmOperation(new ElasticCapacityPoolOperationSource(Client), _elasticCapacityPoolClientDiagnostics, Pipeline, _elasticCapacityPoolRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, poolName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the NetApp Elastic Capacity Pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName} + /// + /// + /// Operation Id + /// ElasticCapacityPools_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticCapacityPool. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string poolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + + using var scope = _elasticCapacityPoolClientDiagnostics.CreateScope("ElasticCapacityPoolCollection.Get"); + scope.Start(); + try + { + var response = await _elasticCapacityPoolRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, poolName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticCapacityPoolResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the NetApp Elastic Capacity Pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName} + /// + /// + /// Operation Id + /// ElasticCapacityPools_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticCapacityPool. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string poolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + + using var scope = _elasticCapacityPoolClientDiagnostics.CreateScope("ElasticCapacityPoolCollection.Get"); + scope.Start(); + try + { + var response = _elasticCapacityPoolRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, poolName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticCapacityPoolResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List and describe all NetApp Elastic Capacity Pools in the Elastic NetApp Account. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools + /// + /// + /// Operation Id + /// ElasticCapacityPools_ListByElasticAccount + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _elasticCapacityPoolRestClient.CreateListByElasticAccountRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _elasticCapacityPoolRestClient.CreateListByElasticAccountNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ElasticCapacityPoolResource(Client, ElasticCapacityPoolData.DeserializeElasticCapacityPoolData(e)), _elasticCapacityPoolClientDiagnostics, Pipeline, "ElasticCapacityPoolCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List and describe all NetApp Elastic Capacity Pools in the Elastic NetApp Account. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools + /// + /// + /// Operation Id + /// ElasticCapacityPools_ListByElasticAccount + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _elasticCapacityPoolRestClient.CreateListByElasticAccountRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _elasticCapacityPoolRestClient.CreateListByElasticAccountNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ElasticCapacityPoolResource(Client, ElasticCapacityPoolData.DeserializeElasticCapacityPoolData(e)), _elasticCapacityPoolClientDiagnostics, Pipeline, "ElasticCapacityPoolCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName} + /// + /// + /// Operation Id + /// ElasticCapacityPools_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticCapacityPool. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string poolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + + using var scope = _elasticCapacityPoolClientDiagnostics.CreateScope("ElasticCapacityPoolCollection.Exists"); + scope.Start(); + try + { + var response = await _elasticCapacityPoolRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, poolName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName} + /// + /// + /// Operation Id + /// ElasticCapacityPools_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticCapacityPool. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string poolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + + using var scope = _elasticCapacityPoolClientDiagnostics.CreateScope("ElasticCapacityPoolCollection.Exists"); + scope.Start(); + try + { + var response = _elasticCapacityPoolRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, poolName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName} + /// + /// + /// Operation Id + /// ElasticCapacityPools_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticCapacityPool. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string poolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + + using var scope = _elasticCapacityPoolClientDiagnostics.CreateScope("ElasticCapacityPoolCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _elasticCapacityPoolRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, poolName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ElasticCapacityPoolResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName} + /// + /// + /// Operation Id + /// ElasticCapacityPools_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticCapacityPool. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string poolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + + using var scope = _elasticCapacityPoolClientDiagnostics.CreateScope("ElasticCapacityPoolCollection.GetIfExists"); + scope.Start(); + try + { + var response = _elasticCapacityPoolRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, poolName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ElasticCapacityPoolResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticCapacityPoolData.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticCapacityPoolData.Serialization.cs new file mode 100644 index 000000000000..358ee69204b1 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticCapacityPoolData.Serialization.cs @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + public partial class ElasticCapacityPoolData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticCapacityPoolData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + if (Optional.IsCollectionDefined(Zones)) + { + writer.WritePropertyName("zones"u8); + writer.WriteStartArray(); + foreach (var item in Zones) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + } + + ElasticCapacityPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticCapacityPoolData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticCapacityPoolData(document.RootElement, options); + } + + internal static ElasticCapacityPoolData DeserializeElasticCapacityPoolData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ElasticCapacityPoolProperties properties = default; + ETag? etag = default; + IList zones = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ElasticCapacityPoolProperties.DeserializeElasticCapacityPoolProperties(property.Value, options); + continue; + } + if (property.NameEquals("eTag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(property.Value.GetString()); + continue; + } + if (property.NameEquals("zones"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + zones = array; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerNetAppContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticCapacityPoolData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + etag, + zones ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticCapacityPoolData)} does not support writing '{options.Format}' format."); + } + } + + ElasticCapacityPoolData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticCapacityPoolData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticCapacityPoolData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticCapacityPoolData.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticCapacityPoolData.cs new file mode 100644 index 000000000000..9af43804c7e0 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticCapacityPoolData.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A class representing the ElasticCapacityPool data model. + /// NetApp Elastic Capacity Pool resource + /// + public partial class ElasticCapacityPoolData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public ElasticCapacityPoolData(AzureLocation location) : base(location) + { + Zones = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// 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. + /// The availability zones. + /// Keeps track of any properties unknown to the library. + internal ElasticCapacityPoolData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ElasticCapacityPoolProperties properties, ETag? etag, IList zones, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + ETag = etag; + Zones = zones; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ElasticCapacityPoolData() + { + } + + /// The resource-specific properties for this resource. + public ElasticCapacityPoolProperties Properties { get; set; } + /// 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. + public ETag? ETag { get; } + /// The availability zones. + public IList Zones { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticCapacityPoolResource.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticCapacityPoolResource.Serialization.cs new file mode 100644 index 000000000000..efe6f75bf87f --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticCapacityPoolResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.NetApp +{ + public partial class ElasticCapacityPoolResource : IJsonModel + { + private static ElasticCapacityPoolData s_dataDeserializationInstance; + private static ElasticCapacityPoolData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ElasticCapacityPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetAppContext.Default); + + ElasticCapacityPoolData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetAppContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticCapacityPoolResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticCapacityPoolResource.cs new file mode 100644 index 000000000000..d936b3f44ada --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticCapacityPoolResource.cs @@ -0,0 +1,952 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A Class representing an ElasticCapacityPool along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetElasticCapacityPoolResource method. + /// Otherwise you can get one from its parent resource using the GetElasticCapacityPool method. + /// + public partial class ElasticCapacityPoolResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The accountName. + /// The poolName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string poolName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _elasticCapacityPoolClientDiagnostics; + private readonly ElasticCapacityPoolsRestOperations _elasticCapacityPoolRestClient; + private readonly ElasticCapacityPoolData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.NetApp/elasticAccounts/elasticCapacityPools"; + + /// Initializes a new instance of the class for mocking. + protected ElasticCapacityPoolResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ElasticCapacityPoolResource(ArmClient client, ElasticCapacityPoolData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ElasticCapacityPoolResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _elasticCapacityPoolClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NetApp", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string elasticCapacityPoolApiVersion); + _elasticCapacityPoolRestClient = new ElasticCapacityPoolsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, elasticCapacityPoolApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ElasticCapacityPoolData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of ElasticVolumeResources in the ElasticCapacityPool. + /// An object representing collection of ElasticVolumeResources and their operations over a ElasticVolumeResource. + public virtual ElasticVolumeCollection GetElasticVolumes() + { + return GetCachedClient(client => new ElasticVolumeCollection(client, Id)); + } + + /// + /// Get the details of the specified volume + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName} + /// + /// + /// Operation Id + /// ElasticVolumes_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticVolume. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetElasticVolumeAsync(string volumeName, CancellationToken cancellationToken = default) + { + return await GetElasticVolumes().GetAsync(volumeName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the details of the specified volume + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName} + /// + /// + /// Operation Id + /// ElasticVolumes_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticVolume. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetElasticVolume(string volumeName, CancellationToken cancellationToken = default) + { + return GetElasticVolumes().Get(volumeName, cancellationToken); + } + + /// + /// Get the NetApp Elastic Capacity Pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName} + /// + /// + /// Operation Id + /// ElasticCapacityPools_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _elasticCapacityPoolClientDiagnostics.CreateScope("ElasticCapacityPoolResource.Get"); + scope.Start(); + try + { + var response = await _elasticCapacityPoolRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticCapacityPoolResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the NetApp Elastic Capacity Pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName} + /// + /// + /// Operation Id + /// ElasticCapacityPools_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _elasticCapacityPoolClientDiagnostics.CreateScope("ElasticCapacityPoolResource.Get"); + scope.Start(); + try + { + var response = _elasticCapacityPoolRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticCapacityPoolResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the specified NetApp Elastic Capacity Pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName} + /// + /// + /// Operation Id + /// ElasticCapacityPools_Delete + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _elasticCapacityPoolClientDiagnostics.CreateScope("ElasticCapacityPoolResource.Delete"); + scope.Start(); + try + { + var response = await _elasticCapacityPoolRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(_elasticCapacityPoolClientDiagnostics, Pipeline, _elasticCapacityPoolRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the specified NetApp Elastic Capacity Pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName} + /// + /// + /// Operation Id + /// ElasticCapacityPools_Delete + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _elasticCapacityPoolClientDiagnostics.CreateScope("ElasticCapacityPoolResource.Delete"); + scope.Start(); + try + { + var response = _elasticCapacityPoolRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new NetAppArmOperation(_elasticCapacityPoolClientDiagnostics, Pipeline, _elasticCapacityPoolRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Patch the specified NetApp Elastic Capacity Pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName} + /// + /// + /// Operation Id + /// ElasticCapacityPools_Update + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ElasticCapacityPoolPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _elasticCapacityPoolClientDiagnostics.CreateScope("ElasticCapacityPoolResource.Update"); + scope.Start(); + try + { + var response = await _elasticCapacityPoolRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(new ElasticCapacityPoolOperationSource(Client), _elasticCapacityPoolClientDiagnostics, Pipeline, _elasticCapacityPoolRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Patch the specified NetApp Elastic Capacity Pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName} + /// + /// + /// Operation Id + /// ElasticCapacityPools_Update + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ElasticCapacityPoolPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _elasticCapacityPoolClientDiagnostics.CreateScope("ElasticCapacityPoolResource.Update"); + scope.Start(); + try + { + var response = _elasticCapacityPoolRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new NetAppArmOperation(new ElasticCapacityPoolOperationSource(Client), _elasticCapacityPoolClientDiagnostics, Pipeline, _elasticCapacityPoolRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Moves pool to another zone + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/changeZone + /// + /// + /// Operation Id + /// ElasticCapacityPools_ChangeZone + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> ChangeZoneAsync(WaitUntil waitUntil, ChangeZoneContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _elasticCapacityPoolClientDiagnostics.CreateScope("ElasticCapacityPoolResource.ChangeZone"); + scope.Start(); + try + { + var response = await _elasticCapacityPoolRestClient.ChangeZoneAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(new ElasticCapacityPoolOperationSource(Client), _elasticCapacityPoolClientDiagnostics, Pipeline, _elasticCapacityPoolRestClient.CreateChangeZoneRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Moves pool to another zone + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/changeZone + /// + /// + /// Operation Id + /// ElasticCapacityPools_ChangeZone + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation ChangeZone(WaitUntil waitUntil, ChangeZoneContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _elasticCapacityPoolClientDiagnostics.CreateScope("ElasticCapacityPoolResource.ChangeZone"); + scope.Start(); + try + { + var response = _elasticCapacityPoolRestClient.ChangeZone(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new NetAppArmOperation(new ElasticCapacityPoolOperationSource(Client), _elasticCapacityPoolClientDiagnostics, Pipeline, _elasticCapacityPoolRestClient.CreateChangeZoneRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/checkVolumeFilePathAvailability + /// + /// + /// Operation Id + /// ElasticCapacityPools_CheckVolumeFilePathAvailability + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> CheckVolumeFilePathAvailabilityAsync(CheckElasticVolumeFilePathAvailabilityContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _elasticCapacityPoolClientDiagnostics.CreateScope("ElasticCapacityPoolResource.CheckVolumeFilePathAvailability"); + scope.Start(); + try + { + var response = await _elasticCapacityPoolRestClient.CheckVolumeFilePathAvailabilityAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/checkVolumeFilePathAvailability + /// + /// + /// Operation Id + /// ElasticCapacityPools_CheckVolumeFilePathAvailability + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual Response CheckVolumeFilePathAvailability(CheckElasticVolumeFilePathAvailabilityContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _elasticCapacityPoolClientDiagnostics.CreateScope("ElasticCapacityPoolResource.CheckVolumeFilePathAvailability"); + scope.Start(); + try + { + var response = _elasticCapacityPoolRestClient.CheckVolumeFilePathAvailability(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName} + /// + /// + /// Operation Id + /// ElasticCapacityPools_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _elasticCapacityPoolClientDiagnostics.CreateScope("ElasticCapacityPoolResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _elasticCapacityPoolRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ElasticCapacityPoolResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ElasticCapacityPoolPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName} + /// + /// + /// Operation Id + /// ElasticCapacityPools_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _elasticCapacityPoolClientDiagnostics.CreateScope("ElasticCapacityPoolResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _elasticCapacityPoolRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new ElasticCapacityPoolResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ElasticCapacityPoolPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName} + /// + /// + /// Operation Id + /// ElasticCapacityPools_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _elasticCapacityPoolClientDiagnostics.CreateScope("ElasticCapacityPoolResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _elasticCapacityPoolRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ElasticCapacityPoolResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ElasticCapacityPoolPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName} + /// + /// + /// Operation Id + /// ElasticCapacityPools_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _elasticCapacityPoolClientDiagnostics.CreateScope("ElasticCapacityPoolResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _elasticCapacityPoolRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new ElasticCapacityPoolResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ElasticCapacityPoolPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName} + /// + /// + /// Operation Id + /// ElasticCapacityPools_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _elasticCapacityPoolClientDiagnostics.CreateScope("ElasticCapacityPoolResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _elasticCapacityPoolRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ElasticCapacityPoolResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ElasticCapacityPoolPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName} + /// + /// + /// Operation Id + /// ElasticCapacityPools_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _elasticCapacityPoolClientDiagnostics.CreateScope("ElasticCapacityPoolResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _elasticCapacityPoolRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new ElasticCapacityPoolResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ElasticCapacityPoolPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticSnapshotCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticSnapshotCollection.cs new file mode 100644 index 000000000000..678d34f6eb7f --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticSnapshotCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetElasticSnapshots method from an instance of . + /// + public partial class ElasticSnapshotCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _elasticSnapshotClientDiagnostics; + private readonly ElasticSnapshotsRestOperations _elasticSnapshotRestClient; + + /// Initializes a new instance of the class for mocking. + protected ElasticSnapshotCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ElasticSnapshotCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _elasticSnapshotClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NetApp", ElasticSnapshotResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ElasticSnapshotResource.ResourceType, out string elasticSnapshotApiVersion); + _elasticSnapshotRestClient = new ElasticSnapshotsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, elasticSnapshotApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ElasticVolumeResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ElasticVolumeResource.ResourceType), nameof(id)); + } + + /// + /// Create a ElasticSnapshot + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName} + /// + /// + /// Operation Id + /// ElasticSnapshots_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the ElasticSnapshot. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string snapshotName, ElasticSnapshotData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(snapshotName, nameof(snapshotName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _elasticSnapshotClientDiagnostics.CreateScope("ElasticSnapshotCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _elasticSnapshotRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, snapshotName, data, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(new ElasticSnapshotOperationSource(Client), _elasticSnapshotClientDiagnostics, Pipeline, _elasticSnapshotRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, snapshotName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a ElasticSnapshot + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName} + /// + /// + /// Operation Id + /// ElasticSnapshots_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the ElasticSnapshot. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string snapshotName, ElasticSnapshotData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(snapshotName, nameof(snapshotName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _elasticSnapshotClientDiagnostics.CreateScope("ElasticSnapshotCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _elasticSnapshotRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, snapshotName, data, cancellationToken); + var operation = new NetAppArmOperation(new ElasticSnapshotOperationSource(Client), _elasticSnapshotClientDiagnostics, Pipeline, _elasticSnapshotRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, snapshotName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a ElasticSnapshot + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName} + /// + /// + /// Operation Id + /// ElasticSnapshots_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticSnapshot. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string snapshotName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(snapshotName, nameof(snapshotName)); + + using var scope = _elasticSnapshotClientDiagnostics.CreateScope("ElasticSnapshotCollection.Get"); + scope.Start(); + try + { + var response = await _elasticSnapshotRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, snapshotName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticSnapshotResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a ElasticSnapshot + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName} + /// + /// + /// Operation Id + /// ElasticSnapshots_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticSnapshot. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string snapshotName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(snapshotName, nameof(snapshotName)); + + using var scope = _elasticSnapshotClientDiagnostics.CreateScope("ElasticSnapshotCollection.Get"); + scope.Start(); + try + { + var response = _elasticSnapshotRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, snapshotName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticSnapshotResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List ElasticSnapshot resources by ElasticVolume + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots + /// + /// + /// Operation Id + /// ElasticSnapshots_ListByElasticVolume + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _elasticSnapshotRestClient.CreateListByElasticVolumeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _elasticSnapshotRestClient.CreateListByElasticVolumeNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ElasticSnapshotResource(Client, ElasticSnapshotData.DeserializeElasticSnapshotData(e)), _elasticSnapshotClientDiagnostics, Pipeline, "ElasticSnapshotCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List ElasticSnapshot resources by ElasticVolume + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots + /// + /// + /// Operation Id + /// ElasticSnapshots_ListByElasticVolume + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _elasticSnapshotRestClient.CreateListByElasticVolumeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _elasticSnapshotRestClient.CreateListByElasticVolumeNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ElasticSnapshotResource(Client, ElasticSnapshotData.DeserializeElasticSnapshotData(e)), _elasticSnapshotClientDiagnostics, Pipeline, "ElasticSnapshotCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName} + /// + /// + /// Operation Id + /// ElasticSnapshots_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticSnapshot. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string snapshotName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(snapshotName, nameof(snapshotName)); + + using var scope = _elasticSnapshotClientDiagnostics.CreateScope("ElasticSnapshotCollection.Exists"); + scope.Start(); + try + { + var response = await _elasticSnapshotRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, snapshotName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName} + /// + /// + /// Operation Id + /// ElasticSnapshots_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticSnapshot. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string snapshotName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(snapshotName, nameof(snapshotName)); + + using var scope = _elasticSnapshotClientDiagnostics.CreateScope("ElasticSnapshotCollection.Exists"); + scope.Start(); + try + { + var response = _elasticSnapshotRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, snapshotName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName} + /// + /// + /// Operation Id + /// ElasticSnapshots_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticSnapshot. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string snapshotName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(snapshotName, nameof(snapshotName)); + + using var scope = _elasticSnapshotClientDiagnostics.CreateScope("ElasticSnapshotCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _elasticSnapshotRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, snapshotName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ElasticSnapshotResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName} + /// + /// + /// Operation Id + /// ElasticSnapshots_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticSnapshot. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string snapshotName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(snapshotName, nameof(snapshotName)); + + using var scope = _elasticSnapshotClientDiagnostics.CreateScope("ElasticSnapshotCollection.GetIfExists"); + scope.Start(); + try + { + var response = _elasticSnapshotRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, snapshotName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ElasticSnapshotResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticSnapshotData.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticSnapshotData.Serialization.cs new file mode 100644 index 000000000000..7a42c1038bf0 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticSnapshotData.Serialization.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + public partial class ElasticSnapshotData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSnapshotData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + ElasticSnapshotData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSnapshotData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticSnapshotData(document.RootElement, options); + } + + internal static ElasticSnapshotData DeserializeElasticSnapshotData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ElasticSnapshotProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ElasticSnapshotProperties.DeserializeElasticSnapshotProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerNetAppContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticSnapshotData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticSnapshotData)} does not support writing '{options.Format}' format."); + } + } + + ElasticSnapshotData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticSnapshotData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticSnapshotData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticSnapshotData.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticSnapshotData.cs new file mode 100644 index 000000000000..404b49c4912d --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticSnapshotData.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A class representing the ElasticSnapshot data model. + /// NetApp Elastic Snapshot under an Elastic Volume + /// + public partial class ElasticSnapshotData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticSnapshotData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal ElasticSnapshotData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ElasticSnapshotProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + internal ElasticSnapshotProperties Properties { get; set; } + /// Azure lifecycle management. + public NetAppProvisioningState? ElasticSnapshotProvisioningState + { + get => Properties is null ? default : Properties.ProvisioningState; + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticSnapshotPolicyCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticSnapshotPolicyCollection.cs new file mode 100644 index 000000000000..b54b6fd1d3a5 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticSnapshotPolicyCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetElasticSnapshotPolicies method from an instance of . + /// + public partial class ElasticSnapshotPolicyCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _elasticSnapshotPolicyClientDiagnostics; + private readonly ElasticSnapshotPoliciesRestOperations _elasticSnapshotPolicyRestClient; + + /// Initializes a new instance of the class for mocking. + protected ElasticSnapshotPolicyCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ElasticSnapshotPolicyCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _elasticSnapshotPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NetApp", ElasticSnapshotPolicyResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ElasticSnapshotPolicyResource.ResourceType, out string elasticSnapshotPolicyApiVersion); + _elasticSnapshotPolicyRestClient = new ElasticSnapshotPoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, elasticSnapshotPolicyApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ElasticAccountResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ElasticAccountResource.ResourceType), nameof(id)); + } + + /// + /// Create a ElasticSnapshotPolicy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName} + /// + /// + /// Operation Id + /// ElasticSnapshotPolicies_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the ElasticSnapshotPolicy. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string snapshotPolicyName, ElasticSnapshotPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(snapshotPolicyName, nameof(snapshotPolicyName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _elasticSnapshotPolicyClientDiagnostics.CreateScope("ElasticSnapshotPolicyCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _elasticSnapshotPolicyRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, snapshotPolicyName, data, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(new ElasticSnapshotPolicyOperationSource(Client), _elasticSnapshotPolicyClientDiagnostics, Pipeline, _elasticSnapshotPolicyRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, snapshotPolicyName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a ElasticSnapshotPolicy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName} + /// + /// + /// Operation Id + /// ElasticSnapshotPolicies_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the ElasticSnapshotPolicy. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string snapshotPolicyName, ElasticSnapshotPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(snapshotPolicyName, nameof(snapshotPolicyName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _elasticSnapshotPolicyClientDiagnostics.CreateScope("ElasticSnapshotPolicyCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _elasticSnapshotPolicyRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, snapshotPolicyName, data, cancellationToken); + var operation = new NetAppArmOperation(new ElasticSnapshotPolicyOperationSource(Client), _elasticSnapshotPolicyClientDiagnostics, Pipeline, _elasticSnapshotPolicyRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, snapshotPolicyName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a ElasticSnapshotPolicy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName} + /// + /// + /// Operation Id + /// ElasticSnapshotPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticSnapshotPolicy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string snapshotPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(snapshotPolicyName, nameof(snapshotPolicyName)); + + using var scope = _elasticSnapshotPolicyClientDiagnostics.CreateScope("ElasticSnapshotPolicyCollection.Get"); + scope.Start(); + try + { + var response = await _elasticSnapshotPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, snapshotPolicyName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticSnapshotPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a ElasticSnapshotPolicy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName} + /// + /// + /// Operation Id + /// ElasticSnapshotPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticSnapshotPolicy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string snapshotPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(snapshotPolicyName, nameof(snapshotPolicyName)); + + using var scope = _elasticSnapshotPolicyClientDiagnostics.CreateScope("ElasticSnapshotPolicyCollection.Get"); + scope.Start(); + try + { + var response = _elasticSnapshotPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, snapshotPolicyName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticSnapshotPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List ElasticSnapshotPolicy resources by ElasticAccount + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies + /// + /// + /// Operation Id + /// ElasticSnapshotPolicies_ListByElasticAccount + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _elasticSnapshotPolicyRestClient.CreateListByElasticAccountRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _elasticSnapshotPolicyRestClient.CreateListByElasticAccountNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ElasticSnapshotPolicyResource(Client, ElasticSnapshotPolicyData.DeserializeElasticSnapshotPolicyData(e)), _elasticSnapshotPolicyClientDiagnostics, Pipeline, "ElasticSnapshotPolicyCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List ElasticSnapshotPolicy resources by ElasticAccount + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies + /// + /// + /// Operation Id + /// ElasticSnapshotPolicies_ListByElasticAccount + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _elasticSnapshotPolicyRestClient.CreateListByElasticAccountRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _elasticSnapshotPolicyRestClient.CreateListByElasticAccountNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ElasticSnapshotPolicyResource(Client, ElasticSnapshotPolicyData.DeserializeElasticSnapshotPolicyData(e)), _elasticSnapshotPolicyClientDiagnostics, Pipeline, "ElasticSnapshotPolicyCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName} + /// + /// + /// Operation Id + /// ElasticSnapshotPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticSnapshotPolicy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string snapshotPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(snapshotPolicyName, nameof(snapshotPolicyName)); + + using var scope = _elasticSnapshotPolicyClientDiagnostics.CreateScope("ElasticSnapshotPolicyCollection.Exists"); + scope.Start(); + try + { + var response = await _elasticSnapshotPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, snapshotPolicyName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName} + /// + /// + /// Operation Id + /// ElasticSnapshotPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticSnapshotPolicy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string snapshotPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(snapshotPolicyName, nameof(snapshotPolicyName)); + + using var scope = _elasticSnapshotPolicyClientDiagnostics.CreateScope("ElasticSnapshotPolicyCollection.Exists"); + scope.Start(); + try + { + var response = _elasticSnapshotPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, snapshotPolicyName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName} + /// + /// + /// Operation Id + /// ElasticSnapshotPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticSnapshotPolicy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string snapshotPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(snapshotPolicyName, nameof(snapshotPolicyName)); + + using var scope = _elasticSnapshotPolicyClientDiagnostics.CreateScope("ElasticSnapshotPolicyCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _elasticSnapshotPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, snapshotPolicyName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ElasticSnapshotPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName} + /// + /// + /// Operation Id + /// ElasticSnapshotPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticSnapshotPolicy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string snapshotPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(snapshotPolicyName, nameof(snapshotPolicyName)); + + using var scope = _elasticSnapshotPolicyClientDiagnostics.CreateScope("ElasticSnapshotPolicyCollection.GetIfExists"); + scope.Start(); + try + { + var response = _elasticSnapshotPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, snapshotPolicyName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ElasticSnapshotPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticSnapshotPolicyData.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticSnapshotPolicyData.Serialization.cs new file mode 100644 index 000000000000..620210cdd6fe --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticSnapshotPolicyData.Serialization.cs @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + public partial class ElasticSnapshotPolicyData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + } + + ElasticSnapshotPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticSnapshotPolicyData(document.RootElement, options); + } + + internal static ElasticSnapshotPolicyData DeserializeElasticSnapshotPolicyData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ElasticSnapshotPolicyProperties properties = default; + ETag? etag = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ElasticSnapshotPolicyProperties.DeserializeElasticSnapshotPolicyProperties(property.Value, options); + continue; + } + if (property.NameEquals("eTag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(property.Value.GetString()); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerNetAppContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticSnapshotPolicyData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + etag, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyData)} does not support writing '{options.Format}' format."); + } + } + + ElasticSnapshotPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticSnapshotPolicyData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticSnapshotPolicyData.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticSnapshotPolicyData.cs new file mode 100644 index 000000000000..cd1a686c4b0a --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticSnapshotPolicyData.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A class representing the ElasticSnapshotPolicy data model. + /// NetApp Elastic Snapshot Policy under an Elastic Account + /// + public partial class ElasticSnapshotPolicyData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public ElasticSnapshotPolicyData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// 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. + /// Keeps track of any properties unknown to the library. + internal ElasticSnapshotPolicyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ElasticSnapshotPolicyProperties properties, ETag? etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + ETag = etag; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ElasticSnapshotPolicyData() + { + } + + /// The resource-specific properties for this resource. + public ElasticSnapshotPolicyProperties Properties { get; set; } + /// 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. + public ETag? ETag { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticSnapshotPolicyResource.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticSnapshotPolicyResource.Serialization.cs new file mode 100644 index 000000000000..45ea582c84c9 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticSnapshotPolicyResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.NetApp +{ + public partial class ElasticSnapshotPolicyResource : IJsonModel + { + private static ElasticSnapshotPolicyData s_dataDeserializationInstance; + private static ElasticSnapshotPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ElasticSnapshotPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetAppContext.Default); + + ElasticSnapshotPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetAppContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticSnapshotPolicyResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticSnapshotPolicyResource.cs new file mode 100644 index 000000000000..c18706903db7 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticSnapshotPolicyResource.cs @@ -0,0 +1,768 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A Class representing an ElasticSnapshotPolicy along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetElasticSnapshotPolicyResource method. + /// Otherwise you can get one from its parent resource using the GetElasticSnapshotPolicy method. + /// + public partial class ElasticSnapshotPolicyResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The accountName. + /// The snapshotPolicyName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string snapshotPolicyName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _elasticSnapshotPolicyClientDiagnostics; + private readonly ElasticSnapshotPoliciesRestOperations _elasticSnapshotPolicyRestClient; + private readonly ElasticSnapshotPolicyData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.NetApp/elasticAccounts/elasticSnapshotPolicies"; + + /// Initializes a new instance of the class for mocking. + protected ElasticSnapshotPolicyResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ElasticSnapshotPolicyResource(ArmClient client, ElasticSnapshotPolicyData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ElasticSnapshotPolicyResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _elasticSnapshotPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NetApp", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string elasticSnapshotPolicyApiVersion); + _elasticSnapshotPolicyRestClient = new ElasticSnapshotPoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, elasticSnapshotPolicyApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ElasticSnapshotPolicyData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a ElasticSnapshotPolicy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName} + /// + /// + /// Operation Id + /// ElasticSnapshotPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _elasticSnapshotPolicyClientDiagnostics.CreateScope("ElasticSnapshotPolicyResource.Get"); + scope.Start(); + try + { + var response = await _elasticSnapshotPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticSnapshotPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a ElasticSnapshotPolicy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName} + /// + /// + /// Operation Id + /// ElasticSnapshotPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _elasticSnapshotPolicyClientDiagnostics.CreateScope("ElasticSnapshotPolicyResource.Get"); + scope.Start(); + try + { + var response = _elasticSnapshotPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticSnapshotPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a ElasticSnapshotPolicy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName} + /// + /// + /// Operation Id + /// ElasticSnapshotPolicies_Delete + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _elasticSnapshotPolicyClientDiagnostics.CreateScope("ElasticSnapshotPolicyResource.Delete"); + scope.Start(); + try + { + var response = await _elasticSnapshotPolicyRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(_elasticSnapshotPolicyClientDiagnostics, Pipeline, _elasticSnapshotPolicyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a ElasticSnapshotPolicy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName} + /// + /// + /// Operation Id + /// ElasticSnapshotPolicies_Delete + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _elasticSnapshotPolicyClientDiagnostics.CreateScope("ElasticSnapshotPolicyResource.Delete"); + scope.Start(); + try + { + var response = _elasticSnapshotPolicyRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new NetAppArmOperation(_elasticSnapshotPolicyClientDiagnostics, Pipeline, _elasticSnapshotPolicyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a ElasticSnapshotPolicy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName} + /// + /// + /// Operation Id + /// ElasticSnapshotPolicies_Update + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ElasticSnapshotPolicyPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _elasticSnapshotPolicyClientDiagnostics.CreateScope("ElasticSnapshotPolicyResource.Update"); + scope.Start(); + try + { + var response = await _elasticSnapshotPolicyRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(new ElasticSnapshotPolicyOperationSource(Client), _elasticSnapshotPolicyClientDiagnostics, Pipeline, _elasticSnapshotPolicyRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a ElasticSnapshotPolicy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName} + /// + /// + /// Operation Id + /// ElasticSnapshotPolicies_Update + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ElasticSnapshotPolicyPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _elasticSnapshotPolicyClientDiagnostics.CreateScope("ElasticSnapshotPolicyResource.Update"); + scope.Start(); + try + { + var response = _elasticSnapshotPolicyRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new NetAppArmOperation(new ElasticSnapshotPolicyOperationSource(Client), _elasticSnapshotPolicyClientDiagnostics, Pipeline, _elasticSnapshotPolicyRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get elastic volumes associated with Elastic Snapshot Policy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}/elasticvolumes + /// + /// + /// Operation Id + /// ElasticSnapshotPolicies_ListElasticVolumes + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetElasticVolumesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _elasticSnapshotPolicyRestClient.CreateListElasticVolumesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _elasticSnapshotPolicyRestClient.CreateListElasticVolumesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ElasticVolumeResource(Client, ElasticVolumeData.DeserializeElasticVolumeData(e)), _elasticSnapshotPolicyClientDiagnostics, Pipeline, "ElasticSnapshotPolicyResource.GetElasticVolumes", "value", "nextLink", cancellationToken); + } + + /// + /// Get elastic volumes associated with Elastic Snapshot Policy + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName}/elasticvolumes + /// + /// + /// Operation Id + /// ElasticSnapshotPolicies_ListElasticVolumes + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetElasticVolumes(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _elasticSnapshotPolicyRestClient.CreateListElasticVolumesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _elasticSnapshotPolicyRestClient.CreateListElasticVolumesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ElasticVolumeResource(Client, ElasticVolumeData.DeserializeElasticVolumeData(e)), _elasticSnapshotPolicyClientDiagnostics, Pipeline, "ElasticSnapshotPolicyResource.GetElasticVolumes", "value", "nextLink", cancellationToken); + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName} + /// + /// + /// Operation Id + /// ElasticSnapshotPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _elasticSnapshotPolicyClientDiagnostics.CreateScope("ElasticSnapshotPolicyResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _elasticSnapshotPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ElasticSnapshotPolicyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ElasticSnapshotPolicyPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName} + /// + /// + /// Operation Id + /// ElasticSnapshotPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _elasticSnapshotPolicyClientDiagnostics.CreateScope("ElasticSnapshotPolicyResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _elasticSnapshotPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new ElasticSnapshotPolicyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ElasticSnapshotPolicyPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName} + /// + /// + /// Operation Id + /// ElasticSnapshotPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _elasticSnapshotPolicyClientDiagnostics.CreateScope("ElasticSnapshotPolicyResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _elasticSnapshotPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ElasticSnapshotPolicyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ElasticSnapshotPolicyPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName} + /// + /// + /// Operation Id + /// ElasticSnapshotPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _elasticSnapshotPolicyClientDiagnostics.CreateScope("ElasticSnapshotPolicyResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _elasticSnapshotPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new ElasticSnapshotPolicyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ElasticSnapshotPolicyPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName} + /// + /// + /// Operation Id + /// ElasticSnapshotPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _elasticSnapshotPolicyClientDiagnostics.CreateScope("ElasticSnapshotPolicyResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _elasticSnapshotPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ElasticSnapshotPolicyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ElasticSnapshotPolicyPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticSnapshotPolicies/{snapshotPolicyName} + /// + /// + /// Operation Id + /// ElasticSnapshotPolicies_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _elasticSnapshotPolicyClientDiagnostics.CreateScope("ElasticSnapshotPolicyResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _elasticSnapshotPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new ElasticSnapshotPolicyResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ElasticSnapshotPolicyPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticSnapshotResource.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticSnapshotResource.Serialization.cs new file mode 100644 index 000000000000..f118865971c8 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticSnapshotResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.NetApp +{ + public partial class ElasticSnapshotResource : IJsonModel + { + private static ElasticSnapshotData s_dataDeserializationInstance; + private static ElasticSnapshotData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ElasticSnapshotData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetAppContext.Default); + + ElasticSnapshotData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetAppContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticSnapshotResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticSnapshotResource.cs new file mode 100644 index 000000000000..6b438343b4bd --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticSnapshotResource.cs @@ -0,0 +1,349 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A Class representing an ElasticSnapshot along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetElasticSnapshotResource method. + /// Otherwise you can get one from its parent resource using the GetElasticSnapshot method. + /// + public partial class ElasticSnapshotResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The accountName. + /// The poolName. + /// The volumeName. + /// The snapshotName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string snapshotName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _elasticSnapshotClientDiagnostics; + private readonly ElasticSnapshotsRestOperations _elasticSnapshotRestClient; + private readonly ElasticSnapshotData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.NetApp/elasticAccounts/elasticCapacityPools/elasticVolumes/elasticSnapshots"; + + /// Initializes a new instance of the class for mocking. + protected ElasticSnapshotResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ElasticSnapshotResource(ArmClient client, ElasticSnapshotData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ElasticSnapshotResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _elasticSnapshotClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NetApp", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string elasticSnapshotApiVersion); + _elasticSnapshotRestClient = new ElasticSnapshotsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, elasticSnapshotApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ElasticSnapshotData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a ElasticSnapshot + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName} + /// + /// + /// Operation Id + /// ElasticSnapshots_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _elasticSnapshotClientDiagnostics.CreateScope("ElasticSnapshotResource.Get"); + scope.Start(); + try + { + var response = await _elasticSnapshotRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticSnapshotResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a ElasticSnapshot + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName} + /// + /// + /// Operation Id + /// ElasticSnapshots_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _elasticSnapshotClientDiagnostics.CreateScope("ElasticSnapshotResource.Get"); + scope.Start(); + try + { + var response = _elasticSnapshotRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticSnapshotResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a ElasticSnapshot + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName} + /// + /// + /// Operation Id + /// ElasticSnapshots_Delete + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _elasticSnapshotClientDiagnostics.CreateScope("ElasticSnapshotResource.Delete"); + scope.Start(); + try + { + var response = await _elasticSnapshotRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(_elasticSnapshotClientDiagnostics, Pipeline, _elasticSnapshotRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a ElasticSnapshot + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName} + /// + /// + /// Operation Id + /// ElasticSnapshots_Delete + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _elasticSnapshotClientDiagnostics.CreateScope("ElasticSnapshotResource.Delete"); + scope.Start(); + try + { + var response = _elasticSnapshotRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new NetAppArmOperation(_elasticSnapshotClientDiagnostics, Pipeline, _elasticSnapshotRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a ElasticSnapshot + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName} + /// + /// + /// Operation Id + /// ElasticSnapshots_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ElasticSnapshotData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _elasticSnapshotClientDiagnostics.CreateScope("ElasticSnapshotResource.Update"); + scope.Start(); + try + { + var response = await _elasticSnapshotRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(new ElasticSnapshotOperationSource(Client), _elasticSnapshotClientDiagnostics, Pipeline, _elasticSnapshotRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a ElasticSnapshot + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName} + /// + /// + /// Operation Id + /// ElasticSnapshots_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ElasticSnapshotData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _elasticSnapshotClientDiagnostics.CreateScope("ElasticSnapshotResource.Update"); + scope.Start(); + try + { + var response = _elasticSnapshotRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new NetAppArmOperation(new ElasticSnapshotOperationSource(Client), _elasticSnapshotClientDiagnostics, Pipeline, _elasticSnapshotRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticVolumeCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticVolumeCollection.cs new file mode 100644 index 000000000000..b7d5ffabb2ed --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticVolumeCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetElasticVolumes method from an instance of . + /// + public partial class ElasticVolumeCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _elasticVolumeClientDiagnostics; + private readonly ElasticVolumesRestOperations _elasticVolumeRestClient; + + /// Initializes a new instance of the class for mocking. + protected ElasticVolumeCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ElasticVolumeCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _elasticVolumeClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NetApp", ElasticVolumeResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ElasticVolumeResource.ResourceType, out string elasticVolumeApiVersion); + _elasticVolumeRestClient = new ElasticVolumesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, elasticVolumeApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ElasticCapacityPoolResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ElasticCapacityPoolResource.ResourceType), nameof(id)); + } + + /// + /// Create or update the specified volume within the capacity pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName} + /// + /// + /// Operation Id + /// ElasticVolumes_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the ElasticVolume. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string volumeName, ElasticVolumeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _elasticVolumeClientDiagnostics.CreateScope("ElasticVolumeCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _elasticVolumeRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeName, data, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(new ElasticVolumeOperationSource(Client), _elasticVolumeClientDiagnostics, Pipeline, _elasticVolumeRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update the specified volume within the capacity pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName} + /// + /// + /// Operation Id + /// ElasticVolumes_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the ElasticVolume. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string volumeName, ElasticVolumeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _elasticVolumeClientDiagnostics.CreateScope("ElasticVolumeCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _elasticVolumeRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeName, data, cancellationToken); + var operation = new NetAppArmOperation(new ElasticVolumeOperationSource(Client), _elasticVolumeClientDiagnostics, Pipeline, _elasticVolumeRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the details of the specified volume + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName} + /// + /// + /// Operation Id + /// ElasticVolumes_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticVolume. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var scope = _elasticVolumeClientDiagnostics.CreateScope("ElasticVolumeCollection.Get"); + scope.Start(); + try + { + var response = await _elasticVolumeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticVolumeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the details of the specified volume + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName} + /// + /// + /// Operation Id + /// ElasticVolumes_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticVolume. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var scope = _elasticVolumeClientDiagnostics.CreateScope("ElasticVolumeCollection.Get"); + scope.Start(); + try + { + var response = _elasticVolumeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticVolumeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List all Elastic Volumes within the Elastic Capacity Pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes + /// + /// + /// Operation Id + /// ElasticVolumes_ListByElasticPool + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _elasticVolumeRestClient.CreateListByElasticPoolRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _elasticVolumeRestClient.CreateListByElasticPoolNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ElasticVolumeResource(Client, ElasticVolumeData.DeserializeElasticVolumeData(e)), _elasticVolumeClientDiagnostics, Pipeline, "ElasticVolumeCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List all Elastic Volumes within the Elastic Capacity Pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes + /// + /// + /// Operation Id + /// ElasticVolumes_ListByElasticPool + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _elasticVolumeRestClient.CreateListByElasticPoolRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _elasticVolumeRestClient.CreateListByElasticPoolNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ElasticVolumeResource(Client, ElasticVolumeData.DeserializeElasticVolumeData(e)), _elasticVolumeClientDiagnostics, Pipeline, "ElasticVolumeCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName} + /// + /// + /// Operation Id + /// ElasticVolumes_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticVolume. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var scope = _elasticVolumeClientDiagnostics.CreateScope("ElasticVolumeCollection.Exists"); + scope.Start(); + try + { + var response = await _elasticVolumeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName} + /// + /// + /// Operation Id + /// ElasticVolumes_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticVolume. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var scope = _elasticVolumeClientDiagnostics.CreateScope("ElasticVolumeCollection.Exists"); + scope.Start(); + try + { + var response = _elasticVolumeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName} + /// + /// + /// Operation Id + /// ElasticVolumes_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticVolume. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var scope = _elasticVolumeClientDiagnostics.CreateScope("ElasticVolumeCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _elasticVolumeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ElasticVolumeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName} + /// + /// + /// Operation Id + /// ElasticVolumes_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticVolume. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var scope = _elasticVolumeClientDiagnostics.CreateScope("ElasticVolumeCollection.GetIfExists"); + scope.Start(); + try + { + var response = _elasticVolumeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ElasticVolumeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticVolumeData.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticVolumeData.Serialization.cs new file mode 100644 index 000000000000..6aad8882e129 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticVolumeData.Serialization.cs @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + public partial class ElasticVolumeData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticVolumeData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + if (Optional.IsCollectionDefined(Zones)) + { + writer.WritePropertyName("zones"u8); + writer.WriteStartArray(); + foreach (var item in Zones) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + } + + ElasticVolumeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticVolumeData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticVolumeData(document.RootElement, options); + } + + internal static ElasticVolumeData DeserializeElasticVolumeData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ElasticVolumeProperties properties = default; + ETag? etag = default; + IList zones = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ElasticVolumeProperties.DeserializeElasticVolumeProperties(property.Value, options); + continue; + } + if (property.NameEquals("eTag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(property.Value.GetString()); + continue; + } + if (property.NameEquals("zones"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + zones = array; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerNetAppContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticVolumeData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + etag, + zones ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticVolumeData)} does not support writing '{options.Format}' format."); + } + } + + ElasticVolumeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticVolumeData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticVolumeData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticVolumeData.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticVolumeData.cs new file mode 100644 index 000000000000..233a9843f670 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticVolumeData.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A class representing the ElasticVolume data model. + /// NetApp Elastic Volume resource + /// + public partial class ElasticVolumeData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public ElasticVolumeData(AzureLocation location) : base(location) + { + Zones = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// 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. + /// The availability zones. + /// Keeps track of any properties unknown to the library. + internal ElasticVolumeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ElasticVolumeProperties properties, ETag? etag, IList zones, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + ETag = etag; + Zones = zones; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ElasticVolumeData() + { + } + + /// The resource-specific properties for this resource. + public ElasticVolumeProperties Properties { get; set; } + /// 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. + public ETag? ETag { get; } + /// The availability zones. + public IList Zones { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticVolumeResource.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticVolumeResource.Serialization.cs new file mode 100644 index 000000000000..970524484e44 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticVolumeResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.NetApp +{ + public partial class ElasticVolumeResource : IJsonModel + { + private static ElasticVolumeData s_dataDeserializationInstance; + private static ElasticVolumeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ElasticVolumeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetAppContext.Default); + + ElasticVolumeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetAppContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticVolumeResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticVolumeResource.cs new file mode 100644 index 000000000000..07eb59cfd2c2 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/ElasticVolumeResource.cs @@ -0,0 +1,869 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A Class representing an ElasticVolume along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetElasticVolumeResource method. + /// Otherwise you can get one from its parent resource using the GetElasticVolume method. + /// + public partial class ElasticVolumeResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The accountName. + /// The poolName. + /// The volumeName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _elasticVolumeClientDiagnostics; + private readonly ElasticVolumesRestOperations _elasticVolumeRestClient; + private readonly ElasticVolumeData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.NetApp/elasticAccounts/elasticCapacityPools/elasticVolumes"; + + /// Initializes a new instance of the class for mocking. + protected ElasticVolumeResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ElasticVolumeResource(ArmClient client, ElasticVolumeData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ElasticVolumeResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _elasticVolumeClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NetApp", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string elasticVolumeApiVersion); + _elasticVolumeRestClient = new ElasticVolumesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, elasticVolumeApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ElasticVolumeData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of ElasticSnapshotResources in the ElasticVolume. + /// An object representing collection of ElasticSnapshotResources and their operations over a ElasticSnapshotResource. + public virtual ElasticSnapshotCollection GetElasticSnapshots() + { + return GetCachedClient(client => new ElasticSnapshotCollection(client, Id)); + } + + /// + /// Get a ElasticSnapshot + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName} + /// + /// + /// Operation Id + /// ElasticSnapshots_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticSnapshot. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetElasticSnapshotAsync(string snapshotName, CancellationToken cancellationToken = default) + { + return await GetElasticSnapshots().GetAsync(snapshotName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a ElasticSnapshot + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/elasticSnapshots/{snapshotName} + /// + /// + /// Operation Id + /// ElasticSnapshots_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticSnapshot. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetElasticSnapshot(string snapshotName, CancellationToken cancellationToken = default) + { + return GetElasticSnapshots().Get(snapshotName, cancellationToken); + } + + /// + /// Get the details of the specified volume + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName} + /// + /// + /// Operation Id + /// ElasticVolumes_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _elasticVolumeClientDiagnostics.CreateScope("ElasticVolumeResource.Get"); + scope.Start(); + try + { + var response = await _elasticVolumeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticVolumeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the details of the specified volume + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName} + /// + /// + /// Operation Id + /// ElasticVolumes_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _elasticVolumeClientDiagnostics.CreateScope("ElasticVolumeResource.Get"); + scope.Start(); + try + { + var response = _elasticVolumeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ElasticVolumeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the specified Elastic Volume + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName} + /// + /// + /// Operation Id + /// ElasticVolumes_Delete + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _elasticVolumeClientDiagnostics.CreateScope("ElasticVolumeResource.Delete"); + scope.Start(); + try + { + var response = await _elasticVolumeRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(_elasticVolumeClientDiagnostics, Pipeline, _elasticVolumeRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the specified Elastic Volume + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName} + /// + /// + /// Operation Id + /// ElasticVolumes_Delete + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _elasticVolumeClientDiagnostics.CreateScope("ElasticVolumeResource.Delete"); + scope.Start(); + try + { + var response = _elasticVolumeRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new NetAppArmOperation(_elasticVolumeClientDiagnostics, Pipeline, _elasticVolumeRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Patch the specified elastic volume + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName} + /// + /// + /// Operation Id + /// ElasticVolumes_Update + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ElasticVolumePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _elasticVolumeClientDiagnostics.CreateScope("ElasticVolumeResource.Update"); + scope.Start(); + try + { + var response = await _elasticVolumeRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(new ElasticVolumeOperationSource(Client), _elasticVolumeClientDiagnostics, Pipeline, _elasticVolumeRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Patch the specified elastic volume + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName} + /// + /// + /// Operation Id + /// ElasticVolumes_Update + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ElasticVolumePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _elasticVolumeClientDiagnostics.CreateScope("ElasticVolumeResource.Update"); + scope.Start(); + try + { + var response = _elasticVolumeRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new NetAppArmOperation(new ElasticVolumeOperationSource(Client), _elasticVolumeClientDiagnostics, Pipeline, _elasticVolumeRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Revert an Elastic Volume to the snapshot specified in the body + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/revert + /// + /// + /// Operation Id + /// ElasticVolumes_Revert + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> RevertAsync(WaitUntil waitUntil, ElasticVolumeRevert body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _elasticVolumeClientDiagnostics.CreateScope("ElasticVolumeResource.Revert"); + scope.Start(); + try + { + var response = await _elasticVolumeRestClient.RevertAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(new ElasticVolumeOperationSource(Client), _elasticVolumeClientDiagnostics, Pipeline, _elasticVolumeRestClient.CreateRevertRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Revert an Elastic Volume to the snapshot specified in the body + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName}/revert + /// + /// + /// Operation Id + /// ElasticVolumes_Revert + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Revert(WaitUntil waitUntil, ElasticVolumeRevert body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _elasticVolumeClientDiagnostics.CreateScope("ElasticVolumeResource.Revert"); + scope.Start(); + try + { + var response = _elasticVolumeRestClient.Revert(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, body, cancellationToken); + var operation = new NetAppArmOperation(new ElasticVolumeOperationSource(Client), _elasticVolumeClientDiagnostics, Pipeline, _elasticVolumeRestClient.CreateRevertRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName} + /// + /// + /// Operation Id + /// ElasticVolumes_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _elasticVolumeClientDiagnostics.CreateScope("ElasticVolumeResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _elasticVolumeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ElasticVolumeResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ElasticVolumePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName} + /// + /// + /// Operation Id + /// ElasticVolumes_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _elasticVolumeClientDiagnostics.CreateScope("ElasticVolumeResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _elasticVolumeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new ElasticVolumeResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ElasticVolumePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName} + /// + /// + /// Operation Id + /// ElasticVolumes_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _elasticVolumeClientDiagnostics.CreateScope("ElasticVolumeResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _elasticVolumeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ElasticVolumeResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ElasticVolumePatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName} + /// + /// + /// Operation Id + /// ElasticVolumes_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _elasticVolumeClientDiagnostics.CreateScope("ElasticVolumeResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _elasticVolumeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new ElasticVolumeResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ElasticVolumePatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName} + /// + /// + /// Operation Id + /// ElasticVolumes_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _elasticVolumeClientDiagnostics.CreateScope("ElasticVolumeResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _elasticVolumeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ElasticVolumeResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ElasticVolumePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName}/elasticCapacityPools/{poolName}/elasticVolumes/{volumeName} + /// + /// + /// Operation Id + /// ElasticVolumes_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _elasticVolumeClientDiagnostics.CreateScope("ElasticVolumeResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _elasticVolumeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new ElasticVolumeResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ElasticVolumePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Extensions/MockableNetAppArmClient.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Extensions/MockableNetAppArmClient.cs index 292a56ef2655..af872ae42d41 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Extensions/MockableNetAppArmClient.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Extensions/MockableNetAppArmClient.cs @@ -34,6 +34,30 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ActiveDirectoryConfigResource GetActiveDirectoryConfigResource(ResourceIdentifier id) + { + ActiveDirectoryConfigResource.ValidateResourceId(id); + return new ActiveDirectoryConfigResource(Client, id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ElasticAccountResource GetElasticAccountResource(ResourceIdentifier id) + { + ElasticAccountResource.ValidateResourceId(id); + return new ElasticAccountResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -58,6 +82,90 @@ public virtual NetAppAccountResource GetNetAppAccountResource(ResourceIdentifier return new NetAppAccountResource(Client, id); } + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ElasticBackupPolicyResource GetElasticBackupPolicyResource(ResourceIdentifier id) + { + ElasticBackupPolicyResource.ValidateResourceId(id); + return new ElasticBackupPolicyResource(Client, id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ElasticBackupVaultResource GetElasticBackupVaultResource(ResourceIdentifier id) + { + ElasticBackupVaultResource.ValidateResourceId(id); + return new ElasticBackupVaultResource(Client, id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ElasticBackupResource GetElasticBackupResource(ResourceIdentifier id) + { + ElasticBackupResource.ValidateResourceId(id); + return new ElasticBackupResource(Client, id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ElasticCapacityPoolResource GetElasticCapacityPoolResource(ResourceIdentifier id) + { + ElasticCapacityPoolResource.ValidateResourceId(id); + return new ElasticCapacityPoolResource(Client, id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ElasticVolumeResource GetElasticVolumeResource(ResourceIdentifier id) + { + ElasticVolumeResource.ValidateResourceId(id); + return new ElasticVolumeResource(Client, id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ElasticSnapshotResource GetElasticSnapshotResource(ResourceIdentifier id) + { + ElasticSnapshotResource.ValidateResourceId(id); + return new ElasticSnapshotResource(Client, id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ElasticSnapshotPolicyResource GetElasticSnapshotPolicyResource(ResourceIdentifier id) + { + ElasticSnapshotPolicyResource.ValidateResourceId(id); + return new ElasticSnapshotPolicyResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -106,6 +214,18 @@ public virtual CapacityPoolResource GetCapacityPoolResource(ResourceIdentifier i return new CapacityPoolResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual CacheResource GetCacheResource(ResourceIdentifier id) + { + CacheResource.ValidateResourceId(id); + return new CacheResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -118,6 +238,30 @@ public virtual NetAppVolumeResource GetNetAppVolumeResource(ResourceIdentifier i return new NetAppVolumeResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual NetAppBucketResource GetNetAppBucketResource(ResourceIdentifier id) + { + NetAppBucketResource.ValidateResourceId(id); + return new NetAppBucketResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual RansomwareReportResource GetRansomwareReportResource(ResourceIdentifier id) + { + RansomwareReportResource.ValidateResourceId(id); + return new RansomwareReportResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Extensions/MockableNetAppResourceGroupResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Extensions/MockableNetAppResourceGroupResource.cs index b575a8800046..2e4b2503f46a 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Extensions/MockableNetAppResourceGroupResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Extensions/MockableNetAppResourceGroupResource.cs @@ -33,6 +33,144 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } + /// Gets a collection of ActiveDirectoryConfigResources in the ResourceGroupResource. + /// An object representing collection of ActiveDirectoryConfigResources and their operations over a ActiveDirectoryConfigResource. + public virtual ActiveDirectoryConfigCollection GetActiveDirectoryConfigs() + { + return GetCachedClient(client => new ActiveDirectoryConfigCollection(client, Id)); + } + + /// + /// Get the details of the specified active directory configuration + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName} + /// + /// + /// Operation Id + /// ActiveDirectoryConfigs_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ActiveDirectoryConfig. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetActiveDirectoryConfigAsync(string activeDirectoryConfigName, CancellationToken cancellationToken = default) + { + return await GetActiveDirectoryConfigs().GetAsync(activeDirectoryConfigName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the details of the specified active directory configuration + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName} + /// + /// + /// Operation Id + /// ActiveDirectoryConfigs_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ActiveDirectoryConfig. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetActiveDirectoryConfig(string activeDirectoryConfigName, CancellationToken cancellationToken = default) + { + return GetActiveDirectoryConfigs().Get(activeDirectoryConfigName, cancellationToken); + } + + /// Gets a collection of ElasticAccountResources in the ResourceGroupResource. + /// An object representing collection of ElasticAccountResources and their operations over a ElasticAccountResource. + public virtual ElasticAccountCollection GetElasticAccounts() + { + return GetCachedClient(client => new ElasticAccountCollection(client, Id)); + } + + /// + /// Get the NetApp Elastic Account + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName} + /// + /// + /// Operation Id + /// ElasticAccounts_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticAccount. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetElasticAccountAsync(string accountName, CancellationToken cancellationToken = default) + { + return await GetElasticAccounts().GetAsync(accountName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the NetApp Elastic Account + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName} + /// + /// + /// Operation Id + /// ElasticAccounts_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ElasticAccount. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetElasticAccount(string accountName, CancellationToken cancellationToken = default) + { + return GetElasticAccounts().Get(accountName, cancellationToken); + } + /// Gets a collection of NetAppAccountResources in the ResourceGroupResource. /// An object representing collection of NetAppAccountResources and their operations over a NetAppAccountResource. public virtual NetAppAccountCollection GetNetAppAccounts() @@ -53,7 +191,7 @@ public virtual NetAppAccountCollection GetNetAppAccounts() /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -84,7 +222,7 @@ public virtual async Task> GetNetAppAccountAsync /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Extensions/MockableNetAppSubscriptionResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Extensions/MockableNetAppSubscriptionResource.cs index f03a024ac18f..252512ab4a15 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Extensions/MockableNetAppSubscriptionResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Extensions/MockableNetAppSubscriptionResource.cs @@ -18,6 +18,10 @@ namespace Azure.ResourceManager.NetApp.Mocking /// A class to add extension methods to SubscriptionResource. public partial class MockableNetAppSubscriptionResource : ArmResource { + private ClientDiagnostics _activeDirectoryConfigClientDiagnostics; + private ActiveDirectoryConfigsRestOperations _activeDirectoryConfigRestClient; + private ClientDiagnostics _elasticAccountClientDiagnostics; + private ElasticAccountsRestOperations _elasticAccountRestClient; private ClientDiagnostics _netAppResourceClientDiagnostics; private NetAppResourceRestOperations _netAppResourceRestClient; private ClientDiagnostics _netAppResourceQuotaLimitsClientDiagnostics; @@ -39,6 +43,10 @@ internal MockableNetAppSubscriptionResource(ArmClient client, ResourceIdentifier { } + private ClientDiagnostics ActiveDirectoryConfigClientDiagnostics => _activeDirectoryConfigClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.NetApp", ActiveDirectoryConfigResource.ResourceType.Namespace, Diagnostics); + private ActiveDirectoryConfigsRestOperations ActiveDirectoryConfigRestClient => _activeDirectoryConfigRestClient ??= new ActiveDirectoryConfigsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ActiveDirectoryConfigResource.ResourceType)); + private ClientDiagnostics ElasticAccountClientDiagnostics => _elasticAccountClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.NetApp", ElasticAccountResource.ResourceType.Namespace, Diagnostics); + private ElasticAccountsRestOperations ElasticAccountRestClient => _elasticAccountRestClient ??= new ElasticAccountsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ElasticAccountResource.ResourceType)); private ClientDiagnostics NetAppResourceClientDiagnostics => _netAppResourceClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.NetApp", ProviderConstants.DefaultProviderNamespace, Diagnostics); private NetAppResourceRestOperations NetAppResourceRestClient => _netAppResourceRestClient ??= new NetAppResourceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics NetAppResourceQuotaLimitsClientDiagnostics => _netAppResourceQuotaLimitsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.NetApp", ProviderConstants.DefaultProviderNamespace, Diagnostics); @@ -75,7 +83,7 @@ public virtual RegionInfoResourceCollection GetRegionInfoResources(AzureLocation /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -104,7 +112,7 @@ public virtual async Task> GetRegionInfoResourceAsy /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -120,6 +128,126 @@ public virtual Response GetRegionInfoResource(AzureLocation return GetRegionInfoResources(location).Get(cancellationToken); } + /// + /// List all active directory configurations within the subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.NetApp/activeDirectoryConfigs + /// + /// + /// Operation Id + /// ActiveDirectoryConfigs_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetActiveDirectoryConfigsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => ActiveDirectoryConfigRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ActiveDirectoryConfigRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ActiveDirectoryConfigResource(Client, ActiveDirectoryConfigData.DeserializeActiveDirectoryConfigData(e)), ActiveDirectoryConfigClientDiagnostics, Pipeline, "MockableNetAppSubscriptionResource.GetActiveDirectoryConfigs", "value", "nextLink", cancellationToken); + } + + /// + /// List all active directory configurations within the subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.NetApp/activeDirectoryConfigs + /// + /// + /// Operation Id + /// ActiveDirectoryConfigs_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetActiveDirectoryConfigs(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => ActiveDirectoryConfigRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ActiveDirectoryConfigRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ActiveDirectoryConfigResource(Client, ActiveDirectoryConfigData.DeserializeActiveDirectoryConfigData(e)), ActiveDirectoryConfigClientDiagnostics, Pipeline, "MockableNetAppSubscriptionResource.GetActiveDirectoryConfigs", "value", "nextLink", cancellationToken); + } + + /// + /// List and describe all NetApp elastic accounts in the subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.NetApp/elasticAccounts + /// + /// + /// Operation Id + /// ElasticAccounts_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetElasticAccountsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => ElasticAccountRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ElasticAccountRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ElasticAccountResource(Client, ElasticAccountData.DeserializeElasticAccountData(e)), ElasticAccountClientDiagnostics, Pipeline, "MockableNetAppSubscriptionResource.GetElasticAccounts", "value", "nextLink", cancellationToken); + } + + /// + /// List and describe all NetApp elastic accounts in the subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.NetApp/elasticAccounts + /// + /// + /// Operation Id + /// ElasticAccounts_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetElasticAccounts(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => ElasticAccountRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ElasticAccountRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ElasticAccountResource(Client, ElasticAccountData.DeserializeElasticAccountData(e)), ElasticAccountClientDiagnostics, Pipeline, "MockableNetAppSubscriptionResource.GetElasticAccounts", "value", "nextLink", cancellationToken); + } + /// /// Check if a file path is available. /// @@ -133,7 +261,7 @@ public virtual Response GetRegionInfoResource(AzureLocation /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -172,7 +300,7 @@ public virtual async Task> CheckNetAppFi /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -211,7 +339,7 @@ public virtual Response CheckNetAppFilePathAvaila /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -250,7 +378,7 @@ public virtual async Task> CheckNetAppNa /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -289,7 +417,7 @@ public virtual Response CheckNetAppNameAvailabili /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -328,7 +456,7 @@ public virtual async Task> CheckNetAppQu /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -367,7 +495,7 @@ public virtual Response CheckNetAppQuotaAvailabil /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -406,7 +534,7 @@ public virtual async Task> QueryNetworkSiblingSetNet /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -445,7 +573,7 @@ public virtual Response QueryNetworkSiblingSetNetAppResource( /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -480,7 +608,7 @@ public virtual async Task> QueryRegionInfoNetAppResou /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -515,7 +643,7 @@ public virtual Response QueryRegionInfoNetAppResource(AzureLoc /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -558,7 +686,7 @@ public virtual async Task> UpdateNetworkSiblingS /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -601,7 +729,7 @@ public virtual ArmOperation UpdateNetworkSiblingSetNetAppReso /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -628,7 +756,7 @@ public virtual AsyncPageable GetNetAppQuotaLimitsAs /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -655,7 +783,7 @@ public virtual Pageable GetNetAppQuotaLimits(AzureL /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -695,7 +823,7 @@ public virtual async Task> GetNetAppQuotaL /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -735,7 +863,7 @@ public virtual Response GetNetAppQuotaLimit(AzureLo /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -762,7 +890,7 @@ public virtual AsyncPageable GetNetAppResourceUsagesAsync(Azu /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -789,7 +917,7 @@ public virtual Pageable GetNetAppResourceUsages(AzureLocation /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -829,7 +957,7 @@ public virtual async Task> GetNetAppResourceUsageAsy /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -869,7 +997,7 @@ public virtual Response GetNetAppResourceUsage(AzureLocation /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -899,7 +1027,7 @@ public virtual AsyncPageable GetNetAppAccountsAsync(Cance /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Extensions/NetAppExtensions.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Extensions/NetAppExtensions.cs index 96e9d4447427..2627e4973907 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Extensions/NetAppExtensions.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Extensions/NetAppExtensions.cs @@ -33,6 +33,44 @@ private static MockableNetAppSubscriptionResource GetMockableNetAppSubscriptionR return resource.GetCachedClient(client => new MockableNetAppSubscriptionResource(client, resource.Id)); } + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ActiveDirectoryConfigResource GetActiveDirectoryConfigResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableNetAppArmClient(client).GetActiveDirectoryConfigResource(id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ElasticAccountResource GetElasticAccountResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableNetAppArmClient(client).GetElasticAccountResource(id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -71,6 +109,139 @@ public static NetAppAccountResource GetNetAppAccountResource(this ArmClient clie return GetMockableNetAppArmClient(client).GetNetAppAccountResource(id); } + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ElasticBackupPolicyResource GetElasticBackupPolicyResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableNetAppArmClient(client).GetElasticBackupPolicyResource(id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ElasticBackupVaultResource GetElasticBackupVaultResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableNetAppArmClient(client).GetElasticBackupVaultResource(id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ElasticBackupResource GetElasticBackupResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableNetAppArmClient(client).GetElasticBackupResource(id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ElasticCapacityPoolResource GetElasticCapacityPoolResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableNetAppArmClient(client).GetElasticCapacityPoolResource(id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ElasticVolumeResource GetElasticVolumeResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableNetAppArmClient(client).GetElasticVolumeResource(id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ElasticSnapshotResource GetElasticSnapshotResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableNetAppArmClient(client).GetElasticSnapshotResource(id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ElasticSnapshotPolicyResource GetElasticSnapshotPolicyResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableNetAppArmClient(client).GetElasticSnapshotPolicyResource(id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -147,6 +318,25 @@ public static CapacityPoolResource GetCapacityPoolResource(this ArmClient client return GetMockableNetAppArmClient(client).GetCapacityPoolResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static CacheResource GetCacheResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableNetAppArmClient(client).GetCacheResource(id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -166,6 +356,44 @@ public static NetAppVolumeResource GetNetAppVolumeResource(this ArmClient client return GetMockableNetAppArmClient(client).GetNetAppVolumeResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static NetAppBucketResource GetNetAppBucketResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableNetAppArmClient(client).GetNetAppBucketResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static RansomwareReportResource GetRansomwareReportResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableNetAppArmClient(client).GetRansomwareReportResource(id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -261,6 +489,192 @@ public static NetAppVolumeGroupResource GetNetAppVolumeGroupResource(this ArmCli return GetMockableNetAppArmClient(client).GetNetAppVolumeGroupResource(id); } + /// + /// Gets a collection of ActiveDirectoryConfigResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of ActiveDirectoryConfigResources and their operations over a ActiveDirectoryConfigResource. + public static ActiveDirectoryConfigCollection GetActiveDirectoryConfigs(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableNetAppResourceGroupResource(resourceGroupResource).GetActiveDirectoryConfigs(); + } + + /// + /// Get the details of the specified active directory configuration + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName} + /// + /// + /// Operation Id + /// ActiveDirectoryConfigs_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the ActiveDirectoryConfig. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetActiveDirectoryConfigAsync(this ResourceGroupResource resourceGroupResource, string activeDirectoryConfigName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableNetAppResourceGroupResource(resourceGroupResource).GetActiveDirectoryConfigAsync(activeDirectoryConfigName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the details of the specified active directory configuration + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/activeDirectoryConfigs/{activeDirectoryConfigName} + /// + /// + /// Operation Id + /// ActiveDirectoryConfigs_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the ActiveDirectoryConfig. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetActiveDirectoryConfig(this ResourceGroupResource resourceGroupResource, string activeDirectoryConfigName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableNetAppResourceGroupResource(resourceGroupResource).GetActiveDirectoryConfig(activeDirectoryConfigName, cancellationToken); + } + + /// + /// Gets a collection of ElasticAccountResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of ElasticAccountResources and their operations over a ElasticAccountResource. + public static ElasticAccountCollection GetElasticAccounts(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableNetAppResourceGroupResource(resourceGroupResource).GetElasticAccounts(); + } + + /// + /// Get the NetApp Elastic Account + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName} + /// + /// + /// Operation Id + /// ElasticAccounts_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the ElasticAccount. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetElasticAccountAsync(this ResourceGroupResource resourceGroupResource, string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableNetAppResourceGroupResource(resourceGroupResource).GetElasticAccountAsync(accountName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the NetApp Elastic Account + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/elasticAccounts/{accountName} + /// + /// + /// Operation Id + /// ElasticAccounts_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the ElasticAccount. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetElasticAccount(this ResourceGroupResource resourceGroupResource, string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableNetAppResourceGroupResource(resourceGroupResource).GetElasticAccount(accountName, cancellationToken); + } + /// /// Gets a collection of NetAppAccountResources in the ResourceGroupResource. /// @@ -291,7 +705,7 @@ public static NetAppAccountCollection GetNetAppAccounts(this ResourceGroupResour /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -329,7 +743,7 @@ public static async Task> GetNetAppAccountAsync( /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -385,7 +799,7 @@ public static RegionInfoResourceCollection GetRegionInfoResources(this Subscript /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -422,7 +836,7 @@ public static async Task> GetRegionInfoResourceAsyn /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -446,6 +860,150 @@ public static Response GetRegionInfoResource(this Subscripti return GetMockableNetAppSubscriptionResource(subscriptionResource).GetRegionInfoResource(location, cancellationToken); } + /// + /// List all active directory configurations within the subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.NetApp/activeDirectoryConfigs + /// + /// + /// Operation Id + /// ActiveDirectoryConfigs_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetActiveDirectoryConfigsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableNetAppSubscriptionResource(subscriptionResource).GetActiveDirectoryConfigsAsync(cancellationToken); + } + + /// + /// List all active directory configurations within the subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.NetApp/activeDirectoryConfigs + /// + /// + /// Operation Id + /// ActiveDirectoryConfigs_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetActiveDirectoryConfigs(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableNetAppSubscriptionResource(subscriptionResource).GetActiveDirectoryConfigs(cancellationToken); + } + + /// + /// List and describe all NetApp elastic accounts in the subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.NetApp/elasticAccounts + /// + /// + /// Operation Id + /// ElasticAccounts_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetElasticAccountsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableNetAppSubscriptionResource(subscriptionResource).GetElasticAccountsAsync(cancellationToken); + } + + /// + /// List and describe all NetApp elastic accounts in the subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.NetApp/elasticAccounts + /// + /// + /// Operation Id + /// ElasticAccounts_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetElasticAccounts(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableNetAppSubscriptionResource(subscriptionResource).GetElasticAccounts(cancellationToken); + } + /// /// Check if a file path is available. /// @@ -459,7 +1017,7 @@ public static Response GetRegionInfoResource(this Subscripti /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -492,7 +1050,7 @@ public static async Task> CheckNetAppFil /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -525,7 +1083,7 @@ public static Response CheckNetAppFilePathAvailab /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -558,7 +1116,7 @@ public static async Task> CheckNetAppNam /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -591,7 +1149,7 @@ public static Response CheckNetAppNameAvailabilit /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -624,7 +1182,7 @@ public static async Task> CheckNetAppQuo /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -657,7 +1215,7 @@ public static Response CheckNetAppQuotaAvailabili /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -690,7 +1248,7 @@ public static async Task> QueryNetworkSiblingSetNetA /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -723,7 +1281,7 @@ public static Response QueryNetworkSiblingSetNetAppResource(t /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -755,7 +1313,7 @@ public static async Task> QueryRegionInfoNetAppResour /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -787,7 +1345,7 @@ public static Response QueryRegionInfoNetAppResource(this Subs /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -821,7 +1379,7 @@ public static async Task> UpdateNetworkSiblingSe /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -855,7 +1413,7 @@ public static ArmOperation UpdateNetworkSiblingSetNetAppResou /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -888,7 +1446,7 @@ public static AsyncPageable GetNetAppQuotaLimitsAsy /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -921,7 +1479,7 @@ public static Pageable GetNetAppQuotaLimits(this Su /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -955,7 +1513,7 @@ public static async Task> GetNetAppQuotaLi /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -989,7 +1547,7 @@ public static Response GetNetAppQuotaLimit(this Sub /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -1022,7 +1580,7 @@ public static AsyncPageable GetNetAppResourceUsagesAsync(this /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -1055,7 +1613,7 @@ public static Pageable GetNetAppResourceUsages(this Subscript /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -1089,7 +1647,7 @@ public static async Task> GetNetAppResourceUsageAsyn /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -1123,7 +1681,7 @@ public static Response GetNetAppResourceUsage(this Subscripti /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1159,7 +1717,7 @@ public static AsyncPageable GetNetAppAccountsAsync(this S /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/ActiveDirectoryConfigOperationSource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/ActiveDirectoryConfigOperationSource.cs new file mode 100644 index 000000000000..58327be3bf40 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/ActiveDirectoryConfigOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp +{ + internal class ActiveDirectoryConfigOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ActiveDirectoryConfigOperationSource(ArmClient client) + { + _client = client; + } + + ActiveDirectoryConfigResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerNetAppContext.Default); + return new ActiveDirectoryConfigResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerNetAppContext.Default); + return await Task.FromResult(new ActiveDirectoryConfigResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/CacheOperationSource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/CacheOperationSource.cs new file mode 100644 index 000000000000..1c36b7df4e9c --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/CacheOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp +{ + internal class CacheOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal CacheOperationSource(ArmClient client) + { + _client = client; + } + + CacheResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerNetAppContext.Default); + return new CacheResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerNetAppContext.Default); + return await Task.FromResult(new CacheResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/ElasticAccountOperationSource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/ElasticAccountOperationSource.cs new file mode 100644 index 000000000000..a0cd6a47aca0 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/ElasticAccountOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp +{ + internal class ElasticAccountOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ElasticAccountOperationSource(ArmClient client) + { + _client = client; + } + + ElasticAccountResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerNetAppContext.Default); + return new ElasticAccountResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerNetAppContext.Default); + return await Task.FromResult(new ElasticAccountResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/ElasticBackupOperationSource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/ElasticBackupOperationSource.cs new file mode 100644 index 000000000000..c7410120f3b5 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/ElasticBackupOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp +{ + internal class ElasticBackupOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ElasticBackupOperationSource(ArmClient client) + { + _client = client; + } + + ElasticBackupResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerNetAppContext.Default); + return new ElasticBackupResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerNetAppContext.Default); + return await Task.FromResult(new ElasticBackupResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/ElasticBackupPolicyOperationSource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/ElasticBackupPolicyOperationSource.cs new file mode 100644 index 000000000000..1068ccd000b5 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/ElasticBackupPolicyOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp +{ + internal class ElasticBackupPolicyOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ElasticBackupPolicyOperationSource(ArmClient client) + { + _client = client; + } + + ElasticBackupPolicyResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerNetAppContext.Default); + return new ElasticBackupPolicyResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerNetAppContext.Default); + return await Task.FromResult(new ElasticBackupPolicyResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/ElasticBackupVaultOperationSource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/ElasticBackupVaultOperationSource.cs new file mode 100644 index 000000000000..546adf0044c6 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/ElasticBackupVaultOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp +{ + internal class ElasticBackupVaultOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ElasticBackupVaultOperationSource(ArmClient client) + { + _client = client; + } + + ElasticBackupVaultResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerNetAppContext.Default); + return new ElasticBackupVaultResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerNetAppContext.Default); + return await Task.FromResult(new ElasticBackupVaultResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/ElasticCapacityPoolOperationSource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/ElasticCapacityPoolOperationSource.cs new file mode 100644 index 000000000000..7dc5e9569721 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/ElasticCapacityPoolOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp +{ + internal class ElasticCapacityPoolOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ElasticCapacityPoolOperationSource(ArmClient client) + { + _client = client; + } + + ElasticCapacityPoolResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerNetAppContext.Default); + return new ElasticCapacityPoolResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerNetAppContext.Default); + return await Task.FromResult(new ElasticCapacityPoolResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/ElasticSnapshotOperationSource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/ElasticSnapshotOperationSource.cs new file mode 100644 index 000000000000..7904d01402ca --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/ElasticSnapshotOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp +{ + internal class ElasticSnapshotOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ElasticSnapshotOperationSource(ArmClient client) + { + _client = client; + } + + ElasticSnapshotResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerNetAppContext.Default); + return new ElasticSnapshotResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerNetAppContext.Default); + return await Task.FromResult(new ElasticSnapshotResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/ElasticSnapshotPolicyOperationSource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/ElasticSnapshotPolicyOperationSource.cs new file mode 100644 index 000000000000..9d6098b989f7 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/ElasticSnapshotPolicyOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp +{ + internal class ElasticSnapshotPolicyOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ElasticSnapshotPolicyOperationSource(ArmClient client) + { + _client = client; + } + + ElasticSnapshotPolicyResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerNetAppContext.Default); + return new ElasticSnapshotPolicyResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerNetAppContext.Default); + return await Task.FromResult(new ElasticSnapshotPolicyResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/ElasticVolumeOperationSource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/ElasticVolumeOperationSource.cs new file mode 100644 index 000000000000..aeca0b13b555 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/ElasticVolumeOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp +{ + internal class ElasticVolumeOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ElasticVolumeOperationSource(ArmClient client) + { + _client = client; + } + + ElasticVolumeResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerNetAppContext.Default); + return new ElasticVolumeResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerNetAppContext.Default); + return await Task.FromResult(new ElasticVolumeResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/NetAppBucketOperationSource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/NetAppBucketOperationSource.cs new file mode 100644 index 000000000000..dc2bfb052210 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/NetAppBucketOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp +{ + internal class NetAppBucketOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal NetAppBucketOperationSource(ArmClient client) + { + _client = client; + } + + NetAppBucketResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerNetAppContext.Default); + return new NetAppBucketResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerNetAppContext.Default); + return await Task.FromResult(new NetAppBucketResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/NetAppVolumeQuotaReportListResultOperationSource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/NetAppVolumeQuotaReportListResultOperationSource.cs new file mode 100644 index 000000000000..c17d1f7a91f5 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/LongRunningOperation/NetAppVolumeQuotaReportListResultOperationSource.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + internal class NetAppVolumeQuotaReportListResultOperationSource : IOperationSource + { + NetAppVolumeQuotaReportListResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + return NetAppVolumeQuotaReportListResult.DeserializeNetAppVolumeQuotaReportListResult(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + return NetAppVolumeQuotaReportListResult.DeserializeNetAppVolumeQuotaReportListResult(document.RootElement); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ActiveDirectoryConfigListResult.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ActiveDirectoryConfigListResult.Serialization.cs new file mode 100644 index 000000000000..0cc82fa19fcd --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ActiveDirectoryConfigListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + internal partial class ActiveDirectoryConfigListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ActiveDirectoryConfigListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ActiveDirectoryConfigListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ActiveDirectoryConfigListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeActiveDirectoryConfigListResult(document.RootElement, options); + } + + internal static ActiveDirectoryConfigListResult DeserializeActiveDirectoryConfigListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ActiveDirectoryConfigData.DeserializeActiveDirectoryConfigData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ActiveDirectoryConfigListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ActiveDirectoryConfigListResult)} does not support writing '{options.Format}' format."); + } + } + + ActiveDirectoryConfigListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeActiveDirectoryConfigListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ActiveDirectoryConfigListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ActiveDirectoryConfigListResult.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ActiveDirectoryConfigListResult.cs new file mode 100644 index 000000000000..da0ab17b4b71 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ActiveDirectoryConfigListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The response of a ActiveDirectoryConfig list operation. + internal partial class ActiveDirectoryConfigListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The ActiveDirectoryConfig items on this page. + /// is null. + internal ActiveDirectoryConfigListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The ActiveDirectoryConfig items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ActiveDirectoryConfigListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ActiveDirectoryConfigListResult() + { + } + + /// The ActiveDirectoryConfig items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ActiveDirectoryConfigPatch.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ActiveDirectoryConfigPatch.Serialization.cs new file mode 100644 index 000000000000..569d495b0597 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ActiveDirectoryConfigPatch.Serialization.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ActiveDirectoryConfigPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ActiveDirectoryConfigPatch)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + writer.WriteObjectValue(Identity, options); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ActiveDirectoryConfigPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ActiveDirectoryConfigPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeActiveDirectoryConfigPatch(document.RootElement, options); + } + + internal static ActiveDirectoryConfigPatch DeserializeActiveDirectoryConfigPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AzureResourceManagerCommonTypesManagedServiceIdentityUpdate identity = default; + IDictionary tags = default; + ActiveDirectoryConfigUpdateProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = AzureResourceManagerCommonTypesManagedServiceIdentityUpdate.DeserializeAzureResourceManagerCommonTypesManagedServiceIdentityUpdate(property.Value, options); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ActiveDirectoryConfigUpdateProperties.DeserializeActiveDirectoryConfigUpdateProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ActiveDirectoryConfigPatch(identity, tags ?? new ChangeTrackingDictionary(), properties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ActiveDirectoryConfigPatch)} does not support writing '{options.Format}' format."); + } + } + + ActiveDirectoryConfigPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeActiveDirectoryConfigPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ActiveDirectoryConfigPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ActiveDirectoryConfigPatch.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ActiveDirectoryConfigPatch.cs new file mode 100644 index 000000000000..493d9f1b7550 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ActiveDirectoryConfigPatch.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The type used for update operations of the ActiveDirectoryConfig. + public partial class ActiveDirectoryConfigPatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ActiveDirectoryConfigPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The managed service identities assigned to this resource. + /// Resource tags. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal ActiveDirectoryConfigPatch(AzureResourceManagerCommonTypesManagedServiceIdentityUpdate identity, IDictionary tags, ActiveDirectoryConfigUpdateProperties properties, IDictionary serializedAdditionalRawData) + { + Identity = identity; + Tags = tags; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The managed service identities assigned to this resource. + public AzureResourceManagerCommonTypesManagedServiceIdentityUpdate Identity { get; set; } + /// Resource tags. + public IDictionary Tags { get; } + /// The resource-specific properties for this resource. + public ActiveDirectoryConfigUpdateProperties Properties { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ActiveDirectoryConfigProperties.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ActiveDirectoryConfigProperties.Serialization.cs new file mode 100644 index 000000000000..c2718839f9b5 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ActiveDirectoryConfigProperties.Serialization.cs @@ -0,0 +1,321 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ActiveDirectoryConfigProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ActiveDirectoryConfigProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(UserName)) + { + writer.WritePropertyName("userName"u8); + writer.WriteStringValue(UserName); + } + if (Optional.IsCollectionDefined(Dns)) + { + writer.WritePropertyName("dns"u8); + writer.WriteStartArray(); + foreach (var item in Dns) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(SmbServerName)) + { + writer.WritePropertyName("smbServerName"u8); + writer.WriteStringValue(SmbServerName); + } + if (Optional.IsDefined(OrganizationalUnit)) + { + writer.WritePropertyName("organizationalUnit"u8); + writer.WriteStringValue(OrganizationalUnit); + } + if (Optional.IsDefined(Site)) + { + writer.WritePropertyName("site"u8); + writer.WriteStringValue(Site); + } + if (Optional.IsCollectionDefined(BackupOperators)) + { + writer.WritePropertyName("backupOperators"u8); + writer.WriteStartArray(); + foreach (var item in BackupOperators) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Administrators)) + { + writer.WritePropertyName("administrators"u8); + writer.WriteStartArray(); + foreach (var item in Administrators) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(SecurityOperators)) + { + writer.WritePropertyName("securityOperators"u8); + writer.WriteStartArray(); + foreach (var item in SecurityOperators) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(ActiveDirectoryStatus)) + { + writer.WritePropertyName("activeDirectoryStatus"u8); + writer.WriteStringValue(ActiveDirectoryStatus.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToSerialString()); + } + writer.WritePropertyName("domain"u8); + writer.WriteStringValue(Domain); + writer.WritePropertyName("secretPassword"u8); + writer.WriteObjectValue(SecretPassword, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ActiveDirectoryConfigProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ActiveDirectoryConfigProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeActiveDirectoryConfigProperties(document.RootElement, options); + } + + internal static ActiveDirectoryConfigProperties DeserializeActiveDirectoryConfigProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string userName = default; + IList dns = default; + string smbServerName = default; + string organizationalUnit = default; + string site = default; + IList backupOperators = default; + IList administrators = default; + IList securityOperators = default; + NetAppAccountActiveDirectoryStatus? activeDirectoryStatus = default; + NetAppProvisioningState? provisioningState = default; + string domain = default; + SecretPassword secretPassword = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("userName"u8)) + { + userName = property.Value.GetString(); + continue; + } + if (property.NameEquals("dns"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + dns = array; + continue; + } + if (property.NameEquals("smbServerName"u8)) + { + smbServerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("organizationalUnit"u8)) + { + organizationalUnit = property.Value.GetString(); + continue; + } + if (property.NameEquals("site"u8)) + { + site = property.Value.GetString(); + continue; + } + if (property.NameEquals("backupOperators"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + backupOperators = array; + continue; + } + if (property.NameEquals("administrators"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + administrators = array; + continue; + } + if (property.NameEquals("securityOperators"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + securityOperators = array; + continue; + } + if (property.NameEquals("activeDirectoryStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + activeDirectoryStatus = new NetAppAccountActiveDirectoryStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = property.Value.GetString().ToNetAppProvisioningState(); + continue; + } + if (property.NameEquals("domain"u8)) + { + domain = property.Value.GetString(); + continue; + } + if (property.NameEquals("secretPassword"u8)) + { + secretPassword = SecretPassword.DeserializeSecretPassword(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ActiveDirectoryConfigProperties( + userName, + dns ?? new ChangeTrackingList(), + smbServerName, + organizationalUnit, + site, + backupOperators ?? new ChangeTrackingList(), + administrators ?? new ChangeTrackingList(), + securityOperators ?? new ChangeTrackingList(), + activeDirectoryStatus, + provisioningState, + domain, + secretPassword, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ActiveDirectoryConfigProperties)} does not support writing '{options.Format}' format."); + } + } + + ActiveDirectoryConfigProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeActiveDirectoryConfigProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ActiveDirectoryConfigProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ActiveDirectoryConfigProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ActiveDirectoryConfigProperties.cs new file mode 100644 index 000000000000..72e1cdc17fac --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ActiveDirectoryConfigProperties.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Active Directory Configuration properties. + public partial class ActiveDirectoryConfigProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Name of the Active Directory domain. + /// Access password from Azure KeyVault Secrets to connect Active Directory. + /// or is null. + public ActiveDirectoryConfigProperties(string domain, SecretPassword secretPassword) + { + Argument.AssertNotNull(domain, nameof(domain)); + Argument.AssertNotNull(secretPassword, nameof(secretPassword)); + + Dns = new ChangeTrackingList(); + BackupOperators = new ChangeTrackingList(); + Administrators = new ChangeTrackingList(); + SecurityOperators = new ChangeTrackingList(); + Domain = domain; + SecretPassword = secretPassword; + } + + /// Initializes a new instance of . + /// A domain user account with permission to create machine accounts. + /// An array of DNS server IP addresses(IPv4 only) for the Active Directory. + /// NetBIOS name of the SMB server. This name will be registered as a computer account in the AD and used to mount volumes. + /// The Organizational Unit (OU) within the Windows Active Directory. + /// The Active Directory site the service will limit Domain Controller discovery to. + /// Users to be added to the Built-in Backup Operator active directory group. A list of unique usernames without domain specifier. + /// Users to be added to the Built-in Administrators active directory group. A list of unique usernames without domain specifier. + /// 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. + /// Status of the Active Directory. + /// Azure lifecycle management. + /// Name of the Active Directory domain. + /// Access password from Azure KeyVault Secrets to connect Active Directory. + /// Keeps track of any properties unknown to the library. + internal ActiveDirectoryConfigProperties(string userName, IList dns, string smbServerName, string organizationalUnit, string site, IList backupOperators, IList administrators, IList securityOperators, NetAppAccountActiveDirectoryStatus? activeDirectoryStatus, NetAppProvisioningState? provisioningState, string domain, SecretPassword secretPassword, IDictionary serializedAdditionalRawData) + { + UserName = userName; + Dns = dns; + SmbServerName = smbServerName; + OrganizationalUnit = organizationalUnit; + Site = site; + BackupOperators = backupOperators; + Administrators = administrators; + SecurityOperators = securityOperators; + ActiveDirectoryStatus = activeDirectoryStatus; + ProvisioningState = provisioningState; + Domain = domain; + SecretPassword = secretPassword; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ActiveDirectoryConfigProperties() + { + } + + /// A domain user account with permission to create machine accounts. + public string UserName { get; set; } + /// An array of DNS server IP addresses(IPv4 only) for the Active Directory. + public IList Dns { get; } + /// NetBIOS name of the SMB server. This name will be registered as a computer account in the AD and used to mount volumes. + public string SmbServerName { get; set; } + /// The Organizational Unit (OU) within the Windows Active Directory. + public string OrganizationalUnit { get; set; } + /// The Active Directory site the service will limit Domain Controller discovery to. + public string Site { get; set; } + /// Users to be added to the Built-in Backup Operator active directory group. A list of unique usernames without domain specifier. + public IList BackupOperators { get; } + /// Users to be added to the Built-in Administrators active directory group. A list of unique usernames without domain specifier. + public IList Administrators { get; } + /// 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. + public IList SecurityOperators { get; } + /// Status of the Active Directory. + public NetAppAccountActiveDirectoryStatus? ActiveDirectoryStatus { get; } + /// Azure lifecycle management. + public NetAppProvisioningState? ProvisioningState { get; } + /// Name of the Active Directory domain. + public string Domain { get; set; } + /// Access password from Azure KeyVault Secrets to connect Active Directory. + public SecretPassword SecretPassword { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ActiveDirectoryConfigUpdateProperties.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ActiveDirectoryConfigUpdateProperties.Serialization.cs new file mode 100644 index 000000000000..792868e1cd95 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ActiveDirectoryConfigUpdateProperties.Serialization.cs @@ -0,0 +1,299 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ActiveDirectoryConfigUpdateProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ActiveDirectoryConfigUpdateProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(UserName)) + { + writer.WritePropertyName("userName"u8); + writer.WriteStringValue(UserName); + } + if (Optional.IsCollectionDefined(Dns)) + { + writer.WritePropertyName("dns"u8); + writer.WriteStartArray(); + foreach (var item in Dns) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(SmbServerName)) + { + writer.WritePropertyName("smbServerName"u8); + writer.WriteStringValue(SmbServerName); + } + if (Optional.IsDefined(OrganizationalUnit)) + { + writer.WritePropertyName("organizationalUnit"u8); + writer.WriteStringValue(OrganizationalUnit); + } + if (Optional.IsDefined(Site)) + { + writer.WritePropertyName("site"u8); + writer.WriteStringValue(Site); + } + if (Optional.IsCollectionDefined(BackupOperators)) + { + writer.WritePropertyName("backupOperators"u8); + writer.WriteStartArray(); + foreach (var item in BackupOperators) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Administrators)) + { + writer.WritePropertyName("administrators"u8); + writer.WriteStartArray(); + foreach (var item in Administrators) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(SecurityOperators)) + { + writer.WritePropertyName("securityOperators"u8); + writer.WriteStartArray(); + foreach (var item in SecurityOperators) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Domain)) + { + writer.WritePropertyName("domain"u8); + writer.WriteStringValue(Domain); + } + if (Optional.IsDefined(SecretPassword)) + { + writer.WritePropertyName("secretPassword"u8); + writer.WriteObjectValue(SecretPassword, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ActiveDirectoryConfigUpdateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ActiveDirectoryConfigUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeActiveDirectoryConfigUpdateProperties(document.RootElement, options); + } + + internal static ActiveDirectoryConfigUpdateProperties DeserializeActiveDirectoryConfigUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string userName = default; + IList dns = default; + string smbServerName = default; + string organizationalUnit = default; + string site = default; + IList backupOperators = default; + IList administrators = default; + IList securityOperators = default; + string domain = default; + SecretPasswordUpdate secretPassword = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("userName"u8)) + { + userName = property.Value.GetString(); + continue; + } + if (property.NameEquals("dns"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + dns = array; + continue; + } + if (property.NameEquals("smbServerName"u8)) + { + smbServerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("organizationalUnit"u8)) + { + organizationalUnit = property.Value.GetString(); + continue; + } + if (property.NameEquals("site"u8)) + { + site = property.Value.GetString(); + continue; + } + if (property.NameEquals("backupOperators"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + backupOperators = array; + continue; + } + if (property.NameEquals("administrators"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + administrators = array; + continue; + } + if (property.NameEquals("securityOperators"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + securityOperators = array; + continue; + } + if (property.NameEquals("domain"u8)) + { + domain = property.Value.GetString(); + continue; + } + if (property.NameEquals("secretPassword"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + secretPassword = SecretPasswordUpdate.DeserializeSecretPasswordUpdate(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ActiveDirectoryConfigUpdateProperties( + userName, + dns ?? new ChangeTrackingList(), + smbServerName, + organizationalUnit, + site, + backupOperators ?? new ChangeTrackingList(), + administrators ?? new ChangeTrackingList(), + securityOperators ?? new ChangeTrackingList(), + domain, + secretPassword, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ActiveDirectoryConfigUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + ActiveDirectoryConfigUpdateProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeActiveDirectoryConfigUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ActiveDirectoryConfigUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ActiveDirectoryConfigUpdateProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ActiveDirectoryConfigUpdateProperties.cs new file mode 100644 index 000000000000..b79ee2cdb28f --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ActiveDirectoryConfigUpdateProperties.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The updatable properties of the ActiveDirectoryConfig. + public partial class ActiveDirectoryConfigUpdateProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ActiveDirectoryConfigUpdateProperties() + { + Dns = new ChangeTrackingList(); + BackupOperators = new ChangeTrackingList(); + Administrators = new ChangeTrackingList(); + SecurityOperators = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A domain user account with permission to create machine accounts. + /// An array of DNS server IP addresses(IPv4 only) for the Active Directory. + /// NetBIOS name of the SMB server. This name will be registered as a computer account in the AD and used to mount volumes. + /// The Organizational Unit (OU) within the Windows Active Directory. + /// The Active Directory site the service will limit Domain Controller discovery to. + /// Users to be added to the Built-in Backup Operator active directory group. A list of unique usernames without domain specifier. + /// Users to be added to the Built-in Administrators active directory group. A list of unique usernames without domain specifier. + /// 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. + /// Name of the Active Directory domain. + /// Access password from Azure KeyVault Secrets to connect Active Directory. + /// Keeps track of any properties unknown to the library. + internal ActiveDirectoryConfigUpdateProperties(string userName, IList dns, string smbServerName, string organizationalUnit, string site, IList backupOperators, IList administrators, IList securityOperators, string domain, SecretPasswordUpdate secretPassword, IDictionary serializedAdditionalRawData) + { + UserName = userName; + Dns = dns; + SmbServerName = smbServerName; + OrganizationalUnit = organizationalUnit; + Site = site; + BackupOperators = backupOperators; + Administrators = administrators; + SecurityOperators = securityOperators; + Domain = domain; + SecretPassword = secretPassword; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A domain user account with permission to create machine accounts. + public string UserName { get; set; } + /// An array of DNS server IP addresses(IPv4 only) for the Active Directory. + public IList Dns { get; } + /// NetBIOS name of the SMB server. This name will be registered as a computer account in the AD and used to mount volumes. + public string SmbServerName { get; set; } + /// The Organizational Unit (OU) within the Windows Active Directory. + public string OrganizationalUnit { get; set; } + /// The Active Directory site the service will limit Domain Controller discovery to. + public string Site { get; set; } + /// Users to be added to the Built-in Backup Operator active directory group. A list of unique usernames without domain specifier. + public IList BackupOperators { get; } + /// Users to be added to the Built-in Administrators active directory group. A list of unique usernames without domain specifier. + public IList Administrators { get; } + /// 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. + public IList SecurityOperators { get; } + /// Name of the Active Directory domain. + public string Domain { get; set; } + /// Access password from Azure KeyVault Secrets to connect Active Directory. + public SecretPasswordUpdate SecretPassword { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ActualRansomwareProtectionState.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ActualRansomwareProtectionState.cs new file mode 100644 index 000000000000..79b1275bd8ed --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ActualRansomwareProtectionState.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The actual state of the Advanced Ransomware Protection feature. + public readonly partial struct ActualRansomwareProtectionState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ActualRansomwareProtectionState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DisabledValue = "Disabled"; + private const string EnabledValue = "Enabled"; + private const string LearningValue = "Learning"; + private const string PausedValue = "Paused"; + + /// Advanced Ransomware Protection is disabled. + public static ActualRansomwareProtectionState Disabled { get; } = new ActualRansomwareProtectionState(DisabledValue); + /// Advanced Ransomware Protection is enabled. + public static ActualRansomwareProtectionState Enabled { get; } = new ActualRansomwareProtectionState(EnabledValue); + /// Advanced Ransomware Protection is in learning mode. + public static ActualRansomwareProtectionState Learning { get; } = new ActualRansomwareProtectionState(LearningValue); + /// Advanced Ransomware Protection is in paused state. + public static ActualRansomwareProtectionState Paused { get; } = new ActualRansomwareProtectionState(PausedValue); + /// Determines if two values are the same. + public static bool operator ==(ActualRansomwareProtectionState left, ActualRansomwareProtectionState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ActualRansomwareProtectionState left, ActualRansomwareProtectionState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ActualRansomwareProtectionState(string value) => new ActualRansomwareProtectionState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ActualRansomwareProtectionState other && Equals(other); + /// + public bool Equals(ActualRansomwareProtectionState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/AzureResourceManagerCommonTypesManagedServiceIdentityUpdate.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/AzureResourceManagerCommonTypesManagedServiceIdentityUpdate.Serialization.cs new file mode 100644 index 000000000000..9a902d019ab5 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/AzureResourceManagerCommonTypesManagedServiceIdentityUpdate.Serialization.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class AzureResourceManagerCommonTypesManagedServiceIdentityUpdate : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureResourceManagerCommonTypesManagedServiceIdentityUpdate)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ManagedServiceIdentityType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ManagedServiceIdentityType.Value.ToString()); + } + if (Optional.IsCollectionDefined(UserAssignedIdentities)) + { + writer.WritePropertyName("userAssignedIdentities"u8); + writer.WriteStartObject(); + foreach (var item in UserAssignedIdentities) + { + writer.WritePropertyName(item.Key); + ((IJsonModel)item.Value).Write(writer, options); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AzureResourceManagerCommonTypesManagedServiceIdentityUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureResourceManagerCommonTypesManagedServiceIdentityUpdate)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureResourceManagerCommonTypesManagedServiceIdentityUpdate(document.RootElement, options); + } + + internal static AzureResourceManagerCommonTypesManagedServiceIdentityUpdate DeserializeAzureResourceManagerCommonTypesManagedServiceIdentityUpdate(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ManagedServiceIdentityType? type = default; + IDictionary userAssignedIdentities = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new ManagedServiceIdentityType(property.Value.GetString()); + continue; + } + if (property.NameEquals("userAssignedIdentities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property0.Value.GetRawText())), options, AzureResourceManagerNetAppContext.Default)); + } + userAssignedIdentities = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureResourceManagerCommonTypesManagedServiceIdentityUpdate(type, userAssignedIdentities ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(AzureResourceManagerCommonTypesManagedServiceIdentityUpdate)} does not support writing '{options.Format}' format."); + } + } + + AzureResourceManagerCommonTypesManagedServiceIdentityUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureResourceManagerCommonTypesManagedServiceIdentityUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureResourceManagerCommonTypesManagedServiceIdentityUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/AzureResourceManagerCommonTypesManagedServiceIdentityUpdate.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/AzureResourceManagerCommonTypesManagedServiceIdentityUpdate.cs new file mode 100644 index 000000000000..a84165a753a4 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/AzureResourceManagerCommonTypesManagedServiceIdentityUpdate.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Managed service identity (system assigned and/or user assigned identities). + public partial class AzureResourceManagerCommonTypesManagedServiceIdentityUpdate + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AzureResourceManagerCommonTypesManagedServiceIdentityUpdate() + { + UserAssignedIdentities = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The type of managed identity assigned to this resource. + /// The identities assigned to this resource by the user. + /// Keeps track of any properties unknown to the library. + internal AzureResourceManagerCommonTypesManagedServiceIdentityUpdate(ManagedServiceIdentityType? managedServiceIdentityType, IDictionary userAssignedIdentities, IDictionary serializedAdditionalRawData) + { + ManagedServiceIdentityType = managedServiceIdentityType; + UserAssignedIdentities = userAssignedIdentities; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The type of managed identity assigned to this resource. + public ManagedServiceIdentityType? ManagedServiceIdentityType { get; set; } + /// The identities assigned to this resource by the user. + public IDictionary UserAssignedIdentities { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/AzureResourceManagerNetAppContext.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/AzureResourceManagerNetAppContext.cs index 572c3046b277..76dbfe2c7fe4 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/AzureResourceManagerNetAppContext.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/AzureResourceManagerNetAppContext.cs @@ -15,18 +15,102 @@ namespace Azure.ResourceManager.NetApp /// Context class which will be filled in by the System.ClientModel.SourceGeneration. /// For more information see 'https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/System.ClientModel/src/docs/ModelReaderWriterContext.md' /// + [ModelReaderWriterBuildable(typeof(ActiveDirectoryConfigData))] + [ModelReaderWriterBuildable(typeof(ActiveDirectoryConfigListResult))] + [ModelReaderWriterBuildable(typeof(ActiveDirectoryConfigPatch))] + [ModelReaderWriterBuildable(typeof(ActiveDirectoryConfigProperties))] + [ModelReaderWriterBuildable(typeof(ActiveDirectoryConfigResource))] + [ModelReaderWriterBuildable(typeof(ActiveDirectoryConfigUpdateProperties))] [ModelReaderWriterBuildable(typeof(AvailabilityZoneMapping))] + [ModelReaderWriterBuildable(typeof(AzureResourceManagerCommonTypesManagedServiceIdentityUpdate))] [ModelReaderWriterBuildable(typeof(BackupPoliciesList))] [ModelReaderWriterBuildable(typeof(BackupsList))] [ModelReaderWriterBuildable(typeof(BackupsMigrationContent))] [ModelReaderWriterBuildable(typeof(BackupVaultsList))] + [ModelReaderWriterBuildable(typeof(CacheData))] + [ModelReaderWriterBuildable(typeof(CacheList))] + [ModelReaderWriterBuildable(typeof(CacheMountTargetProperties))] + [ModelReaderWriterBuildable(typeof(CachePatch))] + [ModelReaderWriterBuildable(typeof(CacheProperties))] + [ModelReaderWriterBuildable(typeof(CacheResource))] + [ModelReaderWriterBuildable(typeof(CacheUpdateProperties))] [ModelReaderWriterBuildable(typeof(CapacityPoolData))] [ModelReaderWriterBuildable(typeof(CapacityPoolList))] [ModelReaderWriterBuildable(typeof(CapacityPoolPatch))] [ModelReaderWriterBuildable(typeof(CapacityPoolResource))] + [ModelReaderWriterBuildable(typeof(ChangeZoneContent))] + [ModelReaderWriterBuildable(typeof(CheckElasticResourceAvailabilityResult))] + [ModelReaderWriterBuildable(typeof(CheckElasticVolumeFilePathAvailabilityContent))] + [ModelReaderWriterBuildable(typeof(CifsUser))] [ModelReaderWriterBuildable(typeof(ClusterPeerCommandResult))] + [ModelReaderWriterBuildable(typeof(ElasticAccountData))] + [ModelReaderWriterBuildable(typeof(ElasticAccountListResult))] + [ModelReaderWriterBuildable(typeof(ElasticAccountPatch))] + [ModelReaderWriterBuildable(typeof(ElasticAccountProperties))] + [ModelReaderWriterBuildable(typeof(ElasticAccountResource))] + [ModelReaderWriterBuildable(typeof(ElasticAccountUpdateProperties))] + [ModelReaderWriterBuildable(typeof(ElasticBackupData))] + [ModelReaderWriterBuildable(typeof(ElasticBackupListResult))] + [ModelReaderWriterBuildable(typeof(ElasticBackupPatch))] + [ModelReaderWriterBuildable(typeof(ElasticBackupPolicyData))] + [ModelReaderWriterBuildable(typeof(ElasticBackupPolicyListResult))] + [ModelReaderWriterBuildable(typeof(ElasticBackupPolicyPatch))] + [ModelReaderWriterBuildable(typeof(ElasticBackupPolicyProperties))] + [ModelReaderWriterBuildable(typeof(ElasticBackupPolicyResource))] + [ModelReaderWriterBuildable(typeof(ElasticBackupPolicyUpdateProperties))] + [ModelReaderWriterBuildable(typeof(ElasticBackupProperties))] + [ModelReaderWriterBuildable(typeof(ElasticBackupPropertiesUpdate))] + [ModelReaderWriterBuildable(typeof(ElasticBackupResource))] + [ModelReaderWriterBuildable(typeof(ElasticBackupVaultData))] + [ModelReaderWriterBuildable(typeof(ElasticBackupVaultListResult))] + [ModelReaderWriterBuildable(typeof(ElasticBackupVaultPatch))] + [ModelReaderWriterBuildable(typeof(ElasticBackupVaultProperties))] + [ModelReaderWriterBuildable(typeof(ElasticBackupVaultResource))] + [ModelReaderWriterBuildable(typeof(ElasticCapacityPoolData))] + [ModelReaderWriterBuildable(typeof(ElasticCapacityPoolListResult))] + [ModelReaderWriterBuildable(typeof(ElasticCapacityPoolPatch))] + [ModelReaderWriterBuildable(typeof(ElasticCapacityPoolProperties))] + [ModelReaderWriterBuildable(typeof(ElasticCapacityPoolResource))] + [ModelReaderWriterBuildable(typeof(ElasticCapacityPoolUpdateProperties))] + [ModelReaderWriterBuildable(typeof(ElasticEncryption))] + [ModelReaderWriterBuildable(typeof(ElasticEncryptionConfiguration))] + [ModelReaderWriterBuildable(typeof(ElasticEncryptionConfigurationUpdate))] + [ModelReaderWriterBuildable(typeof(ElasticEncryptionIdentity))] + [ModelReaderWriterBuildable(typeof(ElasticExportPolicy))] + [ModelReaderWriterBuildable(typeof(ElasticExportPolicyRule))] + [ModelReaderWriterBuildable(typeof(ElasticKeyVaultProperties))] + [ModelReaderWriterBuildable(typeof(ElasticMountTargetProperties))] + [ModelReaderWriterBuildable(typeof(ElasticSmbPatchProperties))] + [ModelReaderWriterBuildable(typeof(ElasticSmbProperties))] + [ModelReaderWriterBuildable(typeof(ElasticSnapshotData))] + [ModelReaderWriterBuildable(typeof(ElasticSnapshotListResult))] + [ModelReaderWriterBuildable(typeof(ElasticSnapshotPolicyDailySchedule))] + [ModelReaderWriterBuildable(typeof(ElasticSnapshotPolicyData))] + [ModelReaderWriterBuildable(typeof(ElasticSnapshotPolicyHourlySchedule))] + [ModelReaderWriterBuildable(typeof(ElasticSnapshotPolicyListResult))] + [ModelReaderWriterBuildable(typeof(ElasticSnapshotPolicyMonthlySchedule))] + [ModelReaderWriterBuildable(typeof(ElasticSnapshotPolicyPatch))] + [ModelReaderWriterBuildable(typeof(ElasticSnapshotPolicyProperties))] + [ModelReaderWriterBuildable(typeof(ElasticSnapshotPolicyResource))] + [ModelReaderWriterBuildable(typeof(ElasticSnapshotPolicyUpdateProperties))] + [ModelReaderWriterBuildable(typeof(ElasticSnapshotPolicyVolumeList))] + [ModelReaderWriterBuildable(typeof(ElasticSnapshotPolicyWeeklySchedule))] + [ModelReaderWriterBuildable(typeof(ElasticSnapshotProperties))] + [ModelReaderWriterBuildable(typeof(ElasticSnapshotResource))] + [ModelReaderWriterBuildable(typeof(ElasticVolumeBackupProperties))] + [ModelReaderWriterBuildable(typeof(ElasticVolumeData))] + [ModelReaderWriterBuildable(typeof(ElasticVolumeDataProtectionPatchProperties))] + [ModelReaderWriterBuildable(typeof(ElasticVolumeDataProtectionProperties))] + [ModelReaderWriterBuildable(typeof(ElasticVolumeListResult))] + [ModelReaderWriterBuildable(typeof(ElasticVolumePatch))] + [ModelReaderWriterBuildable(typeof(ElasticVolumeProperties))] + [ModelReaderWriterBuildable(typeof(ElasticVolumeResource))] + [ModelReaderWriterBuildable(typeof(ElasticVolumeRevert))] + [ModelReaderWriterBuildable(typeof(ElasticVolumeSnapshotProperties))] + [ModelReaderWriterBuildable(typeof(ElasticVolumeUpdateProperties))] [ModelReaderWriterBuildable(typeof(GetGroupIdListForLdapUserContent))] [ModelReaderWriterBuildable(typeof(GetGroupIdListForLdapUserResult))] + [ModelReaderWriterBuildable(typeof(LdapConfiguration))] [ModelReaderWriterBuildable(typeof(ListReplications))] [ModelReaderWriterBuildable(typeof(ListReplicationsContent))] [ModelReaderWriterBuildable(typeof(ManagedServiceIdentity))] @@ -45,6 +129,16 @@ namespace Azure.ResourceManager.NetApp [ModelReaderWriterBuildable(typeof(NetAppBackupVaultData))] [ModelReaderWriterBuildable(typeof(NetAppBackupVaultPatch))] [ModelReaderWriterBuildable(typeof(NetAppBackupVaultResource))] + [ModelReaderWriterBuildable(typeof(NetAppBucketCredentialsExpiry))] + [ModelReaderWriterBuildable(typeof(NetAppBucketData))] + [ModelReaderWriterBuildable(typeof(NetAppBucketFileSystemUser))] + [ModelReaderWriterBuildable(typeof(NetAppBucketGenerateCredentials))] + [ModelReaderWriterBuildable(typeof(NetAppBucketList))] + [ModelReaderWriterBuildable(typeof(NetAppBucketNfsUser))] + [ModelReaderWriterBuildable(typeof(NetAppBucketPatch))] + [ModelReaderWriterBuildable(typeof(NetAppBucketResource))] + [ModelReaderWriterBuildable(typeof(NetAppBucketServerPatchProperties))] + [ModelReaderWriterBuildable(typeof(NetAppBucketServerProperties))] [ModelReaderWriterBuildable(typeof(NetAppChangeKeyVault))] [ModelReaderWriterBuildable(typeof(NetAppCheckAvailabilityResult))] [ModelReaderWriterBuildable(typeof(NetAppDestinationReplication))] @@ -87,6 +181,8 @@ namespace Azure.ResourceManager.NetApp [ModelReaderWriterBuildable(typeof(NetAppVolumePatchDataProtection))] [ModelReaderWriterBuildable(typeof(NetAppVolumePlacementRule))] [ModelReaderWriterBuildable(typeof(NetAppVolumePoolChangeContent))] + [ModelReaderWriterBuildable(typeof(NetAppVolumeQuotaReport))] + [ModelReaderWriterBuildable(typeof(NetAppVolumeQuotaReportListResult))] [ModelReaderWriterBuildable(typeof(NetAppVolumeQuotaRuleData))] [ModelReaderWriterBuildable(typeof(NetAppVolumeQuotaRulePatch))] [ModelReaderWriterBuildable(typeof(NetAppVolumeQuotaRuleResource))] @@ -101,15 +197,31 @@ namespace Azure.ResourceManager.NetApp [ModelReaderWriterBuildable(typeof(NetAppVolumeSnapshotRestoreFilesContent))] [ModelReaderWriterBuildable(typeof(NetworkSiblingSet))] [ModelReaderWriterBuildable(typeof(NicInfo))] + [ModelReaderWriterBuildable(typeof(OriginClusterInformation))] [ModelReaderWriterBuildable(typeof(PeerClusterForVolumeMigrationContent))] + [ModelReaderWriterBuildable(typeof(PeeringPassphrases))] [ModelReaderWriterBuildable(typeof(QueryNetworkSiblingSetContent))] [ModelReaderWriterBuildable(typeof(QuotaItemList))] + [ModelReaderWriterBuildable(typeof(RansomwareProtectionPatchSettings))] + [ModelReaderWriterBuildable(typeof(RansomwareProtectionSettings))] + [ModelReaderWriterBuildable(typeof(RansomwareReportData))] + [ModelReaderWriterBuildable(typeof(RansomwareReportProperties))] + [ModelReaderWriterBuildable(typeof(RansomwareReportResource))] + [ModelReaderWriterBuildable(typeof(RansomwareReportsList))] + [ModelReaderWriterBuildable(typeof(RansomwareSuspects))] + [ModelReaderWriterBuildable(typeof(RansomwareSuspectsClearContent))] [ModelReaderWriterBuildable(typeof(RegionInfoResource))] [ModelReaderWriterBuildable(typeof(RegionInfoResourceData))] [ModelReaderWriterBuildable(typeof(RegionInfosList))] [ModelReaderWriterBuildable(typeof(RelocateVolumeContent))] [ModelReaderWriterBuildable(typeof(RemotePath))] [ModelReaderWriterBuildable(typeof(ResponseError))] + [ModelReaderWriterBuildable(typeof(SecretPassword))] + [ModelReaderWriterBuildable(typeof(SecretPasswordIdentity))] + [ModelReaderWriterBuildable(typeof(SecretPasswordKeyVaultProperties))] + [ModelReaderWriterBuildable(typeof(SecretPasswordKeyVaultPropertiesUpdate))] + [ModelReaderWriterBuildable(typeof(SecretPasswordUpdate))] + [ModelReaderWriterBuildable(typeof(SmbSettings))] [ModelReaderWriterBuildable(typeof(SnapshotPoliciesList))] [ModelReaderWriterBuildable(typeof(SnapshotPolicyDailySchedule))] [ModelReaderWriterBuildable(typeof(SnapshotPolicyData))] @@ -121,6 +233,7 @@ namespace Azure.ResourceManager.NetApp [ModelReaderWriterBuildable(typeof(SnapshotPolicyWeeklySchedule))] [ModelReaderWriterBuildable(typeof(SnapshotsList))] [ModelReaderWriterBuildable(typeof(SubvolumesList))] + [ModelReaderWriterBuildable(typeof(SuspectFile))] [ModelReaderWriterBuildable(typeof(SvmPeerCommandResult))] [ModelReaderWriterBuildable(typeof(SystemData))] [ModelReaderWriterBuildable(typeof(UpdateNetworkSiblingSetContent))] diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/BreakthroughMode.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/BreakthroughMode.cs new file mode 100644 index 000000000000..a3f33ba72429 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/BreakthroughMode.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// + /// 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 readonly partial struct BreakthroughMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BreakthroughMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// The volume runs on the resources configured for Breakthrough mode which ensures consistent high performance and a higher throughput. + public static BreakthroughMode Enabled { get; } = new BreakthroughMode(EnabledValue); + /// The volume uses configuration that provides basic performance and throughput. + public static BreakthroughMode Disabled { get; } = new BreakthroughMode(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(BreakthroughMode left, BreakthroughMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BreakthroughMode left, BreakthroughMode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator BreakthroughMode(string value) => new BreakthroughMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BreakthroughMode other && Equals(other); + /// + public bool Equals(BreakthroughMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CacheLifeCycleState.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CacheLifeCycleState.cs new file mode 100644 index 000000000000..887d75a95e6e --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CacheLifeCycleState.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Azure NetApp Files Cache lifecycle management. + public readonly partial struct CacheLifeCycleState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CacheLifeCycleState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ClusterPeeringOfferSentValue = "ClusterPeeringOfferSent"; + private const string VserverPeeringOfferSentValue = "VserverPeeringOfferSent"; + private const string CreatingValue = "Creating"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + + /// Cluster peering offer has been sent. + public static CacheLifeCycleState ClusterPeeringOfferSent { get; } = new CacheLifeCycleState(ClusterPeeringOfferSentValue); + /// VServer peering offer has been sent. + public static CacheLifeCycleState VserverPeeringOfferSent { get; } = new CacheLifeCycleState(VserverPeeringOfferSentValue); + /// Cache creation in progress. + public static CacheLifeCycleState Creating { get; } = new CacheLifeCycleState(CreatingValue); + /// Cache creation succeeded and is available for use. + public static CacheLifeCycleState Succeeded { get; } = new CacheLifeCycleState(SucceededValue); + /// Cache is in a failed state. + public static CacheLifeCycleState Failed { get; } = new CacheLifeCycleState(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(CacheLifeCycleState left, CacheLifeCycleState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CacheLifeCycleState left, CacheLifeCycleState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CacheLifeCycleState(string value) => new CacheLifeCycleState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CacheLifeCycleState other && Equals(other); + /// + public bool Equals(CacheLifeCycleState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CacheList.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CacheList.Serialization.cs new file mode 100644 index 000000000000..97efa6323e2d --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CacheList.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + internal partial class CacheList : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CacheList)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CacheList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CacheList)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCacheList(document.RootElement, options); + } + + internal static CacheList DeserializeCacheList(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CacheData.DeserializeCacheData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CacheList(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(CacheList)} does not support writing '{options.Format}' format."); + } + } + + CacheList IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCacheList(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CacheList)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CacheList.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CacheList.cs new file mode 100644 index 000000000000..ca6eaaa496a3 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CacheList.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// List of Cache resources. + internal partial class CacheList + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Cache items on this page. + /// is null. + internal CacheList(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Cache items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal CacheList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CacheList() + { + } + + /// The Cache items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CacheMountTargetProperties.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CacheMountTargetProperties.Serialization.cs new file mode 100644 index 000000000000..47de03b50ee0 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CacheMountTargetProperties.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class CacheMountTargetProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CacheMountTargetProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(MountTargetId)) + { + writer.WritePropertyName("mountTargetId"u8); + writer.WriteStringValue(MountTargetId); + } + if (options.Format != "W" && Optional.IsDefined(IPAddress)) + { + writer.WritePropertyName("ipAddress"u8); + writer.WriteStringValue(IPAddress); + } + if (options.Format != "W" && Optional.IsDefined(SmbServerFqdn)) + { + writer.WritePropertyName("smbServerFqdn"u8); + writer.WriteStringValue(SmbServerFqdn); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CacheMountTargetProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CacheMountTargetProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCacheMountTargetProperties(document.RootElement, options); + } + + internal static CacheMountTargetProperties DeserializeCacheMountTargetProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string mountTargetId = default; + string ipAddress = default; + string smbServerFqdn = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mountTargetId"u8)) + { + mountTargetId = property.Value.GetString(); + continue; + } + if (property.NameEquals("ipAddress"u8)) + { + ipAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("smbServerFqdn"u8)) + { + smbServerFqdn = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CacheMountTargetProperties(mountTargetId, ipAddress, smbServerFqdn, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(CacheMountTargetProperties)} does not support writing '{options.Format}' format."); + } + } + + CacheMountTargetProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCacheMountTargetProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CacheMountTargetProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CacheMountTargetProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CacheMountTargetProperties.cs new file mode 100644 index 000000000000..986103937c46 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CacheMountTargetProperties.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Contains all the information needed to mount a cache. + public partial class CacheMountTargetProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal CacheMountTargetProperties() + { + } + + /// Initializes a new instance of . + /// UUID v4 used to identify the MountTarget. + /// The mount target's IPv4 address, used to mount the cache. + /// The SMB server's Fully Qualified Domain Name, FQDN. + /// Keeps track of any properties unknown to the library. + internal CacheMountTargetProperties(string mountTargetId, string ipAddress, string smbServerFqdn, IDictionary serializedAdditionalRawData) + { + MountTargetId = mountTargetId; + IPAddress = ipAddress; + SmbServerFqdn = smbServerFqdn; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// UUID v4 used to identify the MountTarget. + public string MountTargetId { get; } + /// The mount target's IPv4 address, used to mount the cache. + public string IPAddress { get; } + /// The SMB server's Fully Qualified Domain Name, FQDN. + public string SmbServerFqdn { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CachePatch.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CachePatch.Serialization.cs new file mode 100644 index 000000000000..1ca73160737d --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CachePatch.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class CachePatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CachePatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CachePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CachePatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCachePatch(document.RootElement, options); + } + + internal static CachePatch DeserializeCachePatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + CacheUpdateProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = CacheUpdateProperties.DeserializeCacheUpdateProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CachePatch(tags ?? new ChangeTrackingDictionary(), properties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(CachePatch)} does not support writing '{options.Format}' format."); + } + } + + CachePatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCachePatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CachePatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CachePatch.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CachePatch.cs new file mode 100644 index 000000000000..9046cb0b8d75 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CachePatch.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The type used for update operations of the Cache. + public partial class CachePatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public CachePatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Resource tags. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal CachePatch(IDictionary tags, CacheUpdateProperties properties, IDictionary serializedAdditionalRawData) + { + Tags = tags; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource tags. + public IDictionary Tags { get; } + /// The resource-specific properties for this resource. + public CacheUpdateProperties Properties { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CacheProperties.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CacheProperties.Serialization.cs new file mode 100644 index 000000000000..1c7eb96323a3 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CacheProperties.Serialization.cs @@ -0,0 +1,491 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class CacheProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CacheProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("filepath"u8); + writer.WriteStringValue(Filepath); + writer.WritePropertyName("size"u8); + writer.WriteNumberValue(Size); + if (Optional.IsCollectionDefined(ExportPolicy)) + { + writer.WritePropertyName("exportPolicy"u8); + writer.WriteStartArray(); + foreach (var item in ExportPolicy) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ProtocolTypes)) + { + writer.WritePropertyName("protocolTypes"u8); + writer.WriteStartArray(); + foreach (var item in ProtocolTypes) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(CacheState)) + { + writer.WritePropertyName("cacheState"u8); + writer.WriteStringValue(CacheState.Value.ToString()); + } + writer.WritePropertyName("cacheSubnetResourceId"u8); + writer.WriteStringValue(CacheSubnetResourceId); + writer.WritePropertyName("peeringSubnetResourceId"u8); + writer.WriteStringValue(PeeringSubnetResourceId); + if (options.Format != "W" && Optional.IsCollectionDefined(MountTargets)) + { + writer.WritePropertyName("mountTargets"u8); + writer.WriteStartArray(); + foreach (var item in MountTargets) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Kerberos)) + { + writer.WritePropertyName("kerberos"u8); + writer.WriteStringValue(Kerberos.Value.ToString()); + } + if (Optional.IsDefined(SmbSettings)) + { + writer.WritePropertyName("smbSettings"u8); + writer.WriteObjectValue(SmbSettings, options); + } + if (Optional.IsDefined(ThroughputMibps)) + { + writer.WritePropertyName("throughputMibps"u8); + writer.WriteNumberValue(ThroughputMibps.Value); + } + if (options.Format != "W" && Optional.IsDefined(ActualThroughputMibps)) + { + writer.WritePropertyName("actualThroughputMibps"u8); + writer.WriteNumberValue(ActualThroughputMibps.Value); + } + writer.WritePropertyName("encryptionKeySource"u8); + writer.WriteStringValue(EncryptionKeySource.ToString()); + if (Optional.IsDefined(KeyVaultPrivateEndpointResourceId)) + { + writer.WritePropertyName("keyVaultPrivateEndpointResourceId"u8); + writer.WriteStringValue(KeyVaultPrivateEndpointResourceId); + } + if (options.Format != "W" && Optional.IsDefined(MaximumNumberOfFiles)) + { + writer.WritePropertyName("maximumNumberOfFiles"u8); + writer.WriteNumberValue(MaximumNumberOfFiles.Value); + } + if (options.Format != "W" && Optional.IsDefined(Encryption)) + { + writer.WritePropertyName("encryption"u8); + writer.WriteStringValue(Encryption.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language.Value.ToString()); + } + if (Optional.IsDefined(Ldap)) + { + writer.WritePropertyName("ldap"u8); + writer.WriteStringValue(Ldap.Value.ToString()); + } + if (Optional.IsDefined(LdapServerType)) + { + writer.WritePropertyName("ldapServerType"u8); + writer.WriteStringValue(LdapServerType.Value.ToString()); + } + writer.WritePropertyName("originClusterInformation"u8); + writer.WriteObjectValue(OriginClusterInformation, options); + if (Optional.IsDefined(CifsChangeNotifications)) + { + writer.WritePropertyName("cifsChangeNotifications"u8); + writer.WriteStringValue(CifsChangeNotifications.Value.ToString()); + } + if (Optional.IsDefined(GlobalFileLocking)) + { + writer.WritePropertyName("globalFileLocking"u8); + writer.WriteStringValue(GlobalFileLocking.Value.ToString()); + } + if (Optional.IsDefined(WriteBack)) + { + writer.WritePropertyName("writeBack"u8); + writer.WriteStringValue(WriteBack.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CacheProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CacheProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCacheProperties(document.RootElement, options); + } + + internal static CacheProperties DeserializeCacheProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string filepath = default; + long size = default; + IList exportPolicy = default; + IList protocolTypes = default; + CacheProvisioningState? provisioningState = default; + CacheLifeCycleState? cacheState = default; + ResourceIdentifier cacheSubnetResourceId = default; + ResourceIdentifier peeringSubnetResourceId = default; + IReadOnlyList mountTargets = default; + KerberosState? kerberos = default; + SmbSettings smbSettings = default; + float? throughputMibps = default; + float? actualThroughputMibps = default; + NetAppEncryptionKeySource encryptionKeySource = default; + ResourceIdentifier keyVaultPrivateEndpointResourceId = default; + long? maximumNumberOfFiles = default; + EncryptionState? encryption = default; + NetAppVolumeLanguage? language = default; + LdapState? ldap = default; + LdapServerType? ldapServerType = default; + OriginClusterInformation originClusterInformation = default; + CifsChangeNotifyState? cifsChangeNotifications = default; + GlobalFileLockingState? globalFileLocking = default; + EnableWriteBackState? writeBack = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("filepath"u8)) + { + filepath = property.Value.GetString(); + continue; + } + if (property.NameEquals("size"u8)) + { + size = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("exportPolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NetAppVolumeExportPolicyRule.DeserializeNetAppVolumeExportPolicyRule(item, options)); + } + exportPolicy = array; + continue; + } + if (property.NameEquals("protocolTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new ProtocolType(item.GetString())); + } + protocolTypes = array; + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new CacheProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("cacheState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cacheState = new CacheLifeCycleState(property.Value.GetString()); + continue; + } + if (property.NameEquals("cacheSubnetResourceId"u8)) + { + cacheSubnetResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("peeringSubnetResourceId"u8)) + { + peeringSubnetResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("mountTargets"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CacheMountTargetProperties.DeserializeCacheMountTargetProperties(item, options)); + } + mountTargets = array; + continue; + } + if (property.NameEquals("kerberos"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + kerberos = new KerberosState(property.Value.GetString()); + continue; + } + if (property.NameEquals("smbSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + smbSettings = SmbSettings.DeserializeSmbSettings(property.Value, options); + continue; + } + if (property.NameEquals("throughputMibps"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + throughputMibps = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("actualThroughputMibps"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + actualThroughputMibps = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("encryptionKeySource"u8)) + { + encryptionKeySource = new NetAppEncryptionKeySource(property.Value.GetString()); + continue; + } + if (property.NameEquals("keyVaultPrivateEndpointResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyVaultPrivateEndpointResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("maximumNumberOfFiles"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maximumNumberOfFiles = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("encryption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryption = new EncryptionState(property.Value.GetString()); + continue; + } + if (property.NameEquals("language"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + language = new NetAppVolumeLanguage(property.Value.GetString()); + continue; + } + if (property.NameEquals("ldap"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ldap = new LdapState(property.Value.GetString()); + continue; + } + if (property.NameEquals("ldapServerType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ldapServerType = new LdapServerType(property.Value.GetString()); + continue; + } + if (property.NameEquals("originClusterInformation"u8)) + { + originClusterInformation = OriginClusterInformation.DeserializeOriginClusterInformation(property.Value, options); + continue; + } + if (property.NameEquals("cifsChangeNotifications"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cifsChangeNotifications = new CifsChangeNotifyState(property.Value.GetString()); + continue; + } + if (property.NameEquals("globalFileLocking"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + globalFileLocking = new GlobalFileLockingState(property.Value.GetString()); + continue; + } + if (property.NameEquals("writeBack"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + writeBack = new EnableWriteBackState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CacheProperties( + filepath, + size, + exportPolicy ?? new ChangeTrackingList(), + protocolTypes ?? new ChangeTrackingList(), + provisioningState, + cacheState, + cacheSubnetResourceId, + peeringSubnetResourceId, + mountTargets ?? new ChangeTrackingList(), + kerberos, + smbSettings, + throughputMibps, + actualThroughputMibps, + encryptionKeySource, + keyVaultPrivateEndpointResourceId, + maximumNumberOfFiles, + encryption, + language, + ldap, + ldapServerType, + originClusterInformation, + cifsChangeNotifications, + globalFileLocking, + writeBack, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(CacheProperties)} does not support writing '{options.Format}' format."); + } + } + + CacheProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCacheProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CacheProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CacheProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CacheProperties.cs new file mode 100644 index 000000000000..742fa5cac0b7 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CacheProperties.cs @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Cache resource properties. + public partial class CacheProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The file path of the Cache. + /// 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. + /// The Azure Resource URI for a delegated cache subnet that will be used to allocate data IPs. + /// The Azure Resource URI for a delegated subnet that will be used for ANF Intercluster Interface IP addresses. + /// 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'. + /// Origin cluster information. + /// , , or is null. + public CacheProperties(string filepath, long size, ResourceIdentifier cacheSubnetResourceId, ResourceIdentifier peeringSubnetResourceId, NetAppEncryptionKeySource encryptionKeySource, OriginClusterInformation originClusterInformation) + { + Argument.AssertNotNull(filepath, nameof(filepath)); + Argument.AssertNotNull(cacheSubnetResourceId, nameof(cacheSubnetResourceId)); + Argument.AssertNotNull(peeringSubnetResourceId, nameof(peeringSubnetResourceId)); + Argument.AssertNotNull(originClusterInformation, nameof(originClusterInformation)); + + Filepath = filepath; + Size = size; + ExportPolicy = new ChangeTrackingList(); + ProtocolTypes = new ChangeTrackingList(); + CacheSubnetResourceId = cacheSubnetResourceId; + PeeringSubnetResourceId = peeringSubnetResourceId; + MountTargets = new ChangeTrackingList(); + EncryptionKeySource = encryptionKeySource; + OriginClusterInformation = originClusterInformation; + } + + /// Initializes a new instance of . + /// The file path of the Cache. + /// 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. + /// Set of export policy rules. + /// Set of protocol types, default NFSv3, CIFS for SMB protocol. + /// Azure lifecycle management. + /// Azure NetApp Files Cache lifecycle management. + /// The Azure Resource URI for a delegated cache subnet that will be used to allocate data IPs. + /// The Azure Resource URI for a delegated subnet that will be used for ANF Intercluster Interface IP addresses. + /// List of mount targets that can be used to mount this cache. + /// Describe if a cache is Kerberos enabled. + /// SMB information for the cache. + /// 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. + /// Actual throughput in MiB/s for auto qosType volumes calculated based on size and serviceLevel. + /// 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'. + /// The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + /// Maximum number of files allowed. + /// Specifies if the cache is encryption or not. + /// Language supported for volume. + /// Specifies whether LDAP is enabled or not for flexcache volume. + /// Specifies the type of LDAP server for flexcache volume. + /// Origin cluster information. + /// Flag indicating whether a CIFS change notification is enabled for the cache. + /// Flag indicating whether the global file lock is enabled for the cache. + /// Flag indicating whether writeback is enabled for the cache. + /// Keeps track of any properties unknown to the library. + internal CacheProperties(string filepath, long size, IList exportPolicy, IList protocolTypes, CacheProvisioningState? provisioningState, CacheLifeCycleState? cacheState, ResourceIdentifier cacheSubnetResourceId, ResourceIdentifier peeringSubnetResourceId, IReadOnlyList mountTargets, KerberosState? kerberos, SmbSettings smbSettings, float? throughputMibps, float? actualThroughputMibps, NetAppEncryptionKeySource encryptionKeySource, ResourceIdentifier keyVaultPrivateEndpointResourceId, long? maximumNumberOfFiles, EncryptionState? encryption, NetAppVolumeLanguage? language, LdapState? ldap, LdapServerType? ldapServerType, OriginClusterInformation originClusterInformation, CifsChangeNotifyState? cifsChangeNotifications, GlobalFileLockingState? globalFileLocking, EnableWriteBackState? writeBack, IDictionary serializedAdditionalRawData) + { + Filepath = filepath; + Size = size; + ExportPolicy = exportPolicy; + ProtocolTypes = protocolTypes; + ProvisioningState = provisioningState; + CacheState = cacheState; + CacheSubnetResourceId = cacheSubnetResourceId; + PeeringSubnetResourceId = peeringSubnetResourceId; + MountTargets = mountTargets; + Kerberos = kerberos; + SmbSettings = smbSettings; + ThroughputMibps = throughputMibps; + ActualThroughputMibps = actualThroughputMibps; + EncryptionKeySource = encryptionKeySource; + KeyVaultPrivateEndpointResourceId = keyVaultPrivateEndpointResourceId; + MaximumNumberOfFiles = maximumNumberOfFiles; + Encryption = encryption; + Language = language; + Ldap = ldap; + LdapServerType = ldapServerType; + OriginClusterInformation = originClusterInformation; + CifsChangeNotifications = cifsChangeNotifications; + GlobalFileLocking = globalFileLocking; + WriteBack = writeBack; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CacheProperties() + { + } + + /// The file path of the Cache. + public string Filepath { get; set; } + /// 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. + public long Size { get; set; } + /// Set of export policy rules. + public IList ExportPolicy { get; } + /// Set of protocol types, default NFSv3, CIFS for SMB protocol. + public IList ProtocolTypes { get; } + /// Azure lifecycle management. + public CacheProvisioningState? ProvisioningState { get; } + /// Azure NetApp Files Cache lifecycle management. + public CacheLifeCycleState? CacheState { get; } + /// The Azure Resource URI for a delegated cache subnet that will be used to allocate data IPs. + public ResourceIdentifier CacheSubnetResourceId { get; set; } + /// The Azure Resource URI for a delegated subnet that will be used for ANF Intercluster Interface IP addresses. + public ResourceIdentifier PeeringSubnetResourceId { get; set; } + /// List of mount targets that can be used to mount this cache. + public IReadOnlyList MountTargets { get; } + /// Describe if a cache is Kerberos enabled. + public KerberosState? Kerberos { get; set; } + /// SMB information for the cache. + public SmbSettings SmbSettings { get; set; } + /// 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. + public float? ThroughputMibps { get; set; } + /// Actual throughput in MiB/s for auto qosType volumes calculated based on size and serviceLevel. + public float? ActualThroughputMibps { get; } + /// 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'. + public NetAppEncryptionKeySource EncryptionKeySource { get; set; } + /// The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + public ResourceIdentifier KeyVaultPrivateEndpointResourceId { get; set; } + /// Maximum number of files allowed. + public long? MaximumNumberOfFiles { get; } + /// Specifies if the cache is encryption or not. + public EncryptionState? Encryption { get; } + /// Language supported for volume. + public NetAppVolumeLanguage? Language { get; } + /// Specifies whether LDAP is enabled or not for flexcache volume. + public LdapState? Ldap { get; set; } + /// Specifies the type of LDAP server for flexcache volume. + public LdapServerType? LdapServerType { get; set; } + /// Origin cluster information. + public OriginClusterInformation OriginClusterInformation { get; set; } + /// Flag indicating whether a CIFS change notification is enabled for the cache. + public CifsChangeNotifyState? CifsChangeNotifications { get; set; } + /// Flag indicating whether the global file lock is enabled for the cache. + public GlobalFileLockingState? GlobalFileLocking { get; set; } + /// Flag indicating whether writeback is enabled for the cache. + public EnableWriteBackState? WriteBack { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CacheProvisioningState.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CacheProvisioningState.cs new file mode 100644 index 000000000000..45f247653e0c --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CacheProvisioningState.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Azure lifecycle management. + public readonly partial struct CacheProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CacheProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatingValue = "Creating"; + private const string UpdatingValue = "Updating"; + private const string DeletingValue = "Deleting"; + private const string FailedValue = "Failed"; + private const string SucceededValue = "Succeeded"; + private const string CanceledValue = "Canceled"; + + /// The resource is being created. + public static CacheProvisioningState Creating { get; } = new CacheProvisioningState(CreatingValue); + /// The resource is being updated. + public static CacheProvisioningState Updating { get; } = new CacheProvisioningState(UpdatingValue); + /// The resource is being deleted. + public static CacheProvisioningState Deleting { get; } = new CacheProvisioningState(DeletingValue); + /// The resource is in a failed state. + public static CacheProvisioningState Failed { get; } = new CacheProvisioningState(FailedValue); + /// The resource is succeeded. + public static CacheProvisioningState Succeeded { get; } = new CacheProvisioningState(SucceededValue); + /// Resource creation was canceled. + public static CacheProvisioningState Canceled { get; } = new CacheProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(CacheProvisioningState left, CacheProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CacheProvisioningState left, CacheProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CacheProvisioningState(string value) => new CacheProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CacheProvisioningState other && Equals(other); + /// + public bool Equals(CacheProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CacheUpdateProperties.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CacheUpdateProperties.Serialization.cs new file mode 100644 index 000000000000..8c32a6fddd24 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CacheUpdateProperties.Serialization.cs @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class CacheUpdateProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CacheUpdateProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Size)) + { + writer.WritePropertyName("size"u8); + writer.WriteNumberValue(Size.Value); + } + if (Optional.IsCollectionDefined(ExportPolicy)) + { + writer.WritePropertyName("exportPolicy"u8); + writer.WriteStartArray(); + foreach (var item in ExportPolicy) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ProtocolTypes)) + { + writer.WritePropertyName("protocolTypes"u8); + writer.WriteStartArray(); + foreach (var item in ProtocolTypes) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(SmbSettings)) + { + writer.WritePropertyName("smbSettings"u8); + writer.WriteObjectValue(SmbSettings, options); + } + if (Optional.IsDefined(ThroughputMibps)) + { + writer.WritePropertyName("throughputMibps"u8); + writer.WriteNumberValue(ThroughputMibps.Value); + } + if (Optional.IsDefined(KeyVaultPrivateEndpointResourceId)) + { + writer.WritePropertyName("keyVaultPrivateEndpointResourceId"u8); + writer.WriteStringValue(KeyVaultPrivateEndpointResourceId); + } + if (Optional.IsDefined(CifsChangeNotifications)) + { + writer.WritePropertyName("cifsChangeNotifications"u8); + writer.WriteStringValue(CifsChangeNotifications.Value.ToString()); + } + if (Optional.IsDefined(WriteBack)) + { + writer.WritePropertyName("writeBack"u8); + writer.WriteStringValue(WriteBack.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CacheUpdateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CacheUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCacheUpdateProperties(document.RootElement, options); + } + + internal static CacheUpdateProperties DeserializeCacheUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long? size = default; + IList exportPolicy = default; + IList protocolTypes = default; + SmbSettings smbSettings = default; + float? throughputMibps = default; + ResourceIdentifier keyVaultPrivateEndpointResourceId = default; + CifsChangeNotifyState? cifsChangeNotifications = default; + EnableWriteBackState? writeBack = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("size"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + size = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("exportPolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NetAppVolumeExportPolicyRule.DeserializeNetAppVolumeExportPolicyRule(item, options)); + } + exportPolicy = array; + continue; + } + if (property.NameEquals("protocolTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new ProtocolType(item.GetString())); + } + protocolTypes = array; + continue; + } + if (property.NameEquals("smbSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + smbSettings = SmbSettings.DeserializeSmbSettings(property.Value, options); + continue; + } + if (property.NameEquals("throughputMibps"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + throughputMibps = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("keyVaultPrivateEndpointResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyVaultPrivateEndpointResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("cifsChangeNotifications"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cifsChangeNotifications = new CifsChangeNotifyState(property.Value.GetString()); + continue; + } + if (property.NameEquals("writeBack"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + writeBack = new EnableWriteBackState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CacheUpdateProperties( + size, + exportPolicy ?? new ChangeTrackingList(), + protocolTypes ?? new ChangeTrackingList(), + smbSettings, + throughputMibps, + keyVaultPrivateEndpointResourceId, + cifsChangeNotifications, + writeBack, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(CacheUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + CacheUpdateProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCacheUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CacheUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CacheUpdateProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CacheUpdateProperties.cs new file mode 100644 index 000000000000..6fef4503660e --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CacheUpdateProperties.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The updatable properties of the Cache. + public partial class CacheUpdateProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public CacheUpdateProperties() + { + ExportPolicy = new ChangeTrackingList(); + ProtocolTypes = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// 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. + /// Set of export policy rules. + /// Set of protocol types, default NFSv3, CIFS for SMB protocol. + /// SMB information for the cache. + /// 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. + /// The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + /// Flag indicating whether a CIFS change notification is enabled for the cache. + /// Flag indicating whether writeback is enabled for the cache. + /// Keeps track of any properties unknown to the library. + internal CacheUpdateProperties(long? size, IList exportPolicy, IList protocolTypes, SmbSettings smbSettings, float? throughputMibps, ResourceIdentifier keyVaultPrivateEndpointResourceId, CifsChangeNotifyState? cifsChangeNotifications, EnableWriteBackState? writeBack, IDictionary serializedAdditionalRawData) + { + Size = size; + ExportPolicy = exportPolicy; + ProtocolTypes = protocolTypes; + SmbSettings = smbSettings; + ThroughputMibps = throughputMibps; + KeyVaultPrivateEndpointResourceId = keyVaultPrivateEndpointResourceId; + CifsChangeNotifications = cifsChangeNotifications; + WriteBack = writeBack; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// 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. + public long? Size { get; set; } + /// Set of export policy rules. + public IList ExportPolicy { get; } + /// Set of protocol types, default NFSv3, CIFS for SMB protocol. + public IList ProtocolTypes { get; } + /// SMB information for the cache. + public SmbSettings SmbSettings { get; set; } + /// 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. + public float? ThroughputMibps { get; set; } + /// The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + public ResourceIdentifier KeyVaultPrivateEndpointResourceId { get; set; } + /// Flag indicating whether a CIFS change notification is enabled for the cache. + public CifsChangeNotifyState? CifsChangeNotifications { get; set; } + /// Flag indicating whether writeback is enabled for the cache. + public EnableWriteBackState? WriteBack { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ChangeZoneContent.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ChangeZoneContent.Serialization.cs new file mode 100644 index 000000000000..f1cd7d806667 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ChangeZoneContent.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ChangeZoneContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ChangeZoneContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("newZone"u8); + writer.WriteStringValue(NewZone); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ChangeZoneContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ChangeZoneContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeChangeZoneContent(document.RootElement, options); + } + + internal static ChangeZoneContent DeserializeChangeZoneContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string newZone = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("newZone"u8)) + { + newZone = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ChangeZoneContent(newZone, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ChangeZoneContent)} does not support writing '{options.Format}' format."); + } + } + + ChangeZoneContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeChangeZoneContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ChangeZoneContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ChangeZoneContent.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ChangeZoneContent.cs new file mode 100644 index 000000000000..c114afac6bfa --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ChangeZoneContent.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Changes the zone for the Zone Redundant elastic capacity pool. + public partial class ChangeZoneContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Availability zone to move Zone Redundant elastic capacity pool to. + /// is null. + public ChangeZoneContent(string newZone) + { + Argument.AssertNotNull(newZone, nameof(newZone)); + + NewZone = newZone; + } + + /// Initializes a new instance of . + /// Availability zone to move Zone Redundant elastic capacity pool to. + /// Keeps track of any properties unknown to the library. + internal ChangeZoneContent(string newZone, IDictionary serializedAdditionalRawData) + { + NewZone = newZone; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ChangeZoneContent() + { + } + + /// Availability zone to move Zone Redundant elastic capacity pool to. + public string NewZone { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CheckElasticResourceAvailabilityReason.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CheckElasticResourceAvailabilityReason.cs new file mode 100644 index 000000000000..afb4b9cfd57f --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CheckElasticResourceAvailabilityReason.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Availability reason. + public readonly partial struct CheckElasticResourceAvailabilityReason : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CheckElasticResourceAvailabilityReason(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InvalidValue = "Invalid"; + private const string AlreadyExistsValue = "AlreadyExists"; + + /// Value indicating the name provided does not match Azure NetApp Files naming requirements. + public static CheckElasticResourceAvailabilityReason Invalid { get; } = new CheckElasticResourceAvailabilityReason(InvalidValue); + /// Value indicating the name is already in use and is therefore unavailable. + public static CheckElasticResourceAvailabilityReason AlreadyExists { get; } = new CheckElasticResourceAvailabilityReason(AlreadyExistsValue); + /// Determines if two values are the same. + public static bool operator ==(CheckElasticResourceAvailabilityReason left, CheckElasticResourceAvailabilityReason right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CheckElasticResourceAvailabilityReason left, CheckElasticResourceAvailabilityReason right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CheckElasticResourceAvailabilityReason(string value) => new CheckElasticResourceAvailabilityReason(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CheckElasticResourceAvailabilityReason other && Equals(other); + /// + public bool Equals(CheckElasticResourceAvailabilityReason other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CheckElasticResourceAvailabilityResult.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CheckElasticResourceAvailabilityResult.Serialization.cs new file mode 100644 index 000000000000..ff00cee70d9d --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CheckElasticResourceAvailabilityResult.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class CheckElasticResourceAvailabilityResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CheckElasticResourceAvailabilityResult)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IsAvailable)) + { + writer.WritePropertyName("isAvailable"u8); + writer.WriteStringValue(IsAvailable.Value.ToString()); + } + if (Optional.IsDefined(Reason)) + { + writer.WritePropertyName("reason"u8); + writer.WriteStringValue(Reason.Value.ToString()); + } + if (Optional.IsDefined(Message)) + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CheckElasticResourceAvailabilityResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CheckElasticResourceAvailabilityResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCheckElasticResourceAvailabilityResult(document.RootElement, options); + } + + internal static CheckElasticResourceAvailabilityResult DeserializeCheckElasticResourceAvailabilityResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CheckElasticResourceAvailabilityStatus? isAvailable = default; + CheckElasticResourceAvailabilityReason? reason = default; + string message = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("isAvailable"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAvailable = new CheckElasticResourceAvailabilityStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("reason"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + reason = new CheckElasticResourceAvailabilityReason(property.Value.GetString()); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CheckElasticResourceAvailabilityResult(isAvailable, reason, message, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(CheckElasticResourceAvailabilityResult)} does not support writing '{options.Format}' format."); + } + } + + CheckElasticResourceAvailabilityResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCheckElasticResourceAvailabilityResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CheckElasticResourceAvailabilityResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CheckElasticResourceAvailabilityResult.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CheckElasticResourceAvailabilityResult.cs new file mode 100644 index 000000000000..4bf0c8bbbcd0 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CheckElasticResourceAvailabilityResult.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Information regarding availability of a resource. + public partial class CheckElasticResourceAvailabilityResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal CheckElasticResourceAvailabilityResult() + { + } + + /// Initializes a new instance of . + /// True indicates name is valid and available. False indicates the name is invalid, unavailable, or both. + /// 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. + /// 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. + /// Keeps track of any properties unknown to the library. + internal CheckElasticResourceAvailabilityResult(CheckElasticResourceAvailabilityStatus? isAvailable, CheckElasticResourceAvailabilityReason? reason, string message, IDictionary serializedAdditionalRawData) + { + IsAvailable = isAvailable; + Reason = reason; + Message = message; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// True indicates name is valid and available. False indicates the name is invalid, unavailable, or both. + public CheckElasticResourceAvailabilityStatus? IsAvailable { get; } + /// 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. + public CheckElasticResourceAvailabilityReason? Reason { get; } + /// 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. + public string Message { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CheckElasticResourceAvailabilityStatus.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CheckElasticResourceAvailabilityStatus.cs new file mode 100644 index 000000000000..56c5deb70391 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CheckElasticResourceAvailabilityStatus.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Availability status. + public readonly partial struct CheckElasticResourceAvailabilityStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CheckElasticResourceAvailabilityStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TrueValue = "True"; + private const string FalseValue = "False"; + + /// Value indicating the name is valid and available. + public static CheckElasticResourceAvailabilityStatus True { get; } = new CheckElasticResourceAvailabilityStatus(TrueValue); + /// Value indicating the the name is invalid, unavailable, or both. + public static CheckElasticResourceAvailabilityStatus False { get; } = new CheckElasticResourceAvailabilityStatus(FalseValue); + /// Determines if two values are the same. + public static bool operator ==(CheckElasticResourceAvailabilityStatus left, CheckElasticResourceAvailabilityStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CheckElasticResourceAvailabilityStatus left, CheckElasticResourceAvailabilityStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CheckElasticResourceAvailabilityStatus(string value) => new CheckElasticResourceAvailabilityStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CheckElasticResourceAvailabilityStatus other && Equals(other); + /// + public bool Equals(CheckElasticResourceAvailabilityStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CheckElasticVolumeFilePathAvailabilityContent.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CheckElasticVolumeFilePathAvailabilityContent.Serialization.cs new file mode 100644 index 000000000000..7751153c2f69 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CheckElasticVolumeFilePathAvailabilityContent.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class CheckElasticVolumeFilePathAvailabilityContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CheckElasticVolumeFilePathAvailabilityContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("filePath"u8); + writer.WriteStringValue(FilePath); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CheckElasticVolumeFilePathAvailabilityContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CheckElasticVolumeFilePathAvailabilityContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCheckElasticVolumeFilePathAvailabilityContent(document.RootElement, options); + } + + internal static CheckElasticVolumeFilePathAvailabilityContent DeserializeCheckElasticVolumeFilePathAvailabilityContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string filePath = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("filePath"u8)) + { + filePath = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CheckElasticVolumeFilePathAvailabilityContent(filePath, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(CheckElasticVolumeFilePathAvailabilityContent)} does not support writing '{options.Format}' format."); + } + } + + CheckElasticVolumeFilePathAvailabilityContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCheckElasticVolumeFilePathAvailabilityContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CheckElasticVolumeFilePathAvailabilityContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CheckElasticVolumeFilePathAvailabilityContent.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CheckElasticVolumeFilePathAvailabilityContent.cs new file mode 100644 index 000000000000..dd42f0d7e8c0 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CheckElasticVolumeFilePathAvailabilityContent.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// File path availability request content - availability is based on the elastic volume filePath within the given elastic capacityPool. + public partial class CheckElasticVolumeFilePathAvailabilityContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// A unique file path for the volume. Used when creating mount targets. This needs to be unique within the elastic capacity pool. + /// is null. + public CheckElasticVolumeFilePathAvailabilityContent(string filePath) + { + Argument.AssertNotNull(filePath, nameof(filePath)); + + FilePath = filePath; + } + + /// Initializes a new instance of . + /// A unique file path for the volume. Used when creating mount targets. This needs to be unique within the elastic capacity pool. + /// Keeps track of any properties unknown to the library. + internal CheckElasticVolumeFilePathAvailabilityContent(string filePath, IDictionary serializedAdditionalRawData) + { + FilePath = filePath; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CheckElasticVolumeFilePathAvailabilityContent() + { + } + + /// A unique file path for the volume. Used when creating mount targets. This needs to be unique within the elastic capacity pool. + public string FilePath { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CifsChangeNotifyState.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CifsChangeNotifyState.cs new file mode 100644 index 000000000000..8bb77ff351a3 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CifsChangeNotifyState.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Flag indicating whether a CIFS change notification is enabled for the cache. + public readonly partial struct CifsChangeNotifyState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CifsChangeNotifyState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DisabledValue = "Disabled"; + private const string EnabledValue = "Enabled"; + + /// CIFS change notification is disabled. + public static CifsChangeNotifyState Disabled { get; } = new CifsChangeNotifyState(DisabledValue); + /// CIFS change notification is enabled. + public static CifsChangeNotifyState Enabled { get; } = new CifsChangeNotifyState(EnabledValue); + /// Determines if two values are the same. + public static bool operator ==(CifsChangeNotifyState left, CifsChangeNotifyState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CifsChangeNotifyState left, CifsChangeNotifyState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CifsChangeNotifyState(string value) => new CifsChangeNotifyState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CifsChangeNotifyState other && Equals(other); + /// + public bool Equals(CifsChangeNotifyState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CifsUser.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CifsUser.Serialization.cs new file mode 100644 index 000000000000..1108a82ec8c6 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CifsUser.Serialization.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + internal partial class CifsUser : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CifsUser)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Username)) + { + writer.WritePropertyName("username"u8); + writer.WriteStringValue(Username); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CifsUser IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CifsUser)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCifsUser(document.RootElement, options); + } + + internal static CifsUser DeserializeCifsUser(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string username = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("username"u8)) + { + username = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CifsUser(username, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(CifsUser)} does not support writing '{options.Format}' format."); + } + } + + CifsUser IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCifsUser(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CifsUser)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CifsUser.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CifsUser.cs new file mode 100644 index 000000000000..7f4917acbbe3 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/CifsUser.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The effective CIFS username when accessing the volume data. + internal partial class CifsUser + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public CifsUser() + { + } + + /// Initializes a new instance of . + /// The CIFS user's username. + /// Keeps track of any properties unknown to the library. + internal CifsUser(string username, IDictionary serializedAdditionalRawData) + { + Username = username; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The CIFS user's username. + public string Username { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/DayOfWeek.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/DayOfWeek.cs new file mode 100644 index 000000000000..8b830dd473f7 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/DayOfWeek.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Day of the week. + public readonly partial struct DayOfWeek : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DayOfWeek(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SundayValue = "Sunday"; + private const string MondayValue = "Monday"; + private const string TuesdayValue = "Tuesday"; + private const string WednesdayValue = "Wednesday"; + private const string ThursdayValue = "Thursday"; + private const string FridayValue = "Friday"; + private const string SaturdayValue = "Saturday"; + + /// Take a snapshot each Sunday. + public static DayOfWeek Sunday { get; } = new DayOfWeek(SundayValue); + /// Take a snapshot each Monday. + public static DayOfWeek Monday { get; } = new DayOfWeek(MondayValue); + /// Take a snapshot each Tuesday. + public static DayOfWeek Tuesday { get; } = new DayOfWeek(TuesdayValue); + /// Take a snapshot each Wednesday. + public static DayOfWeek Wednesday { get; } = new DayOfWeek(WednesdayValue); + /// Take a snapshot each Thursday. + public static DayOfWeek Thursday { get; } = new DayOfWeek(ThursdayValue); + /// Take a snapshot each Friday. + public static DayOfWeek Friday { get; } = new DayOfWeek(FridayValue); + /// Take a snapshot each Saturday. + public static DayOfWeek Saturday { get; } = new DayOfWeek(SaturdayValue); + /// Determines if two values are the same. + public static bool operator ==(DayOfWeek left, DayOfWeek right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DayOfWeek left, DayOfWeek right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DayOfWeek(string value) => new DayOfWeek(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DayOfWeek other && Equals(other); + /// + public bool Equals(DayOfWeek other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/DesiredRansomwareProtectionState.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/DesiredRansomwareProtectionState.cs new file mode 100644 index 000000000000..ef8f0a6601f2 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/DesiredRansomwareProtectionState.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The desired state of the Advanced Ransomware Protection feature. + public readonly partial struct DesiredRansomwareProtectionState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DesiredRansomwareProtectionState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DisabledValue = "Disabled"; + private const string EnabledValue = "Enabled"; + + /// Advanced Ransomware Protection is disabled. + public static DesiredRansomwareProtectionState Disabled { get; } = new DesiredRansomwareProtectionState(DisabledValue); + /// Advanced Ransomware Protection is enabled. + public static DesiredRansomwareProtectionState Enabled { get; } = new DesiredRansomwareProtectionState(EnabledValue); + /// Determines if two values are the same. + public static bool operator ==(DesiredRansomwareProtectionState left, DesiredRansomwareProtectionState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DesiredRansomwareProtectionState left, DesiredRansomwareProtectionState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DesiredRansomwareProtectionState(string value) => new DesiredRansomwareProtectionState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DesiredRansomwareProtectionState other && Equals(other); + /// + public bool Equals(DesiredRansomwareProtectionState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticAccountListResult.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticAccountListResult.Serialization.cs new file mode 100644 index 000000000000..1428446b0cb6 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticAccountListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + internal partial class ElasticAccountListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticAccountListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticAccountListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticAccountListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticAccountListResult(document.RootElement, options); + } + + internal static ElasticAccountListResult DeserializeElasticAccountListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ElasticAccountData.DeserializeElasticAccountData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticAccountListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticAccountListResult)} does not support writing '{options.Format}' format."); + } + } + + ElasticAccountListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticAccountListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticAccountListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticAccountListResult.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticAccountListResult.cs new file mode 100644 index 000000000000..e59181ccbf6b --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticAccountListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The response of a ElasticAccount list operation. + internal partial class ElasticAccountListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The ElasticAccount items on this page. + /// is null. + internal ElasticAccountListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The ElasticAccount items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ElasticAccountListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ElasticAccountListResult() + { + } + + /// The ElasticAccount items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticAccountPatch.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticAccountPatch.Serialization.cs new file mode 100644 index 000000000000..1734a5c2787d --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticAccountPatch.Serialization.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticAccountPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticAccountPatch)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + writer.WriteObjectValue(Identity, options); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticAccountPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticAccountPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticAccountPatch(document.RootElement, options); + } + + internal static ElasticAccountPatch DeserializeElasticAccountPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AzureResourceManagerCommonTypesManagedServiceIdentityUpdate identity = default; + IDictionary tags = default; + ElasticAccountUpdateProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = AzureResourceManagerCommonTypesManagedServiceIdentityUpdate.DeserializeAzureResourceManagerCommonTypesManagedServiceIdentityUpdate(property.Value, options); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ElasticAccountUpdateProperties.DeserializeElasticAccountUpdateProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticAccountPatch(identity, tags ?? new ChangeTrackingDictionary(), properties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticAccountPatch)} does not support writing '{options.Format}' format."); + } + } + + ElasticAccountPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticAccountPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticAccountPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticAccountPatch.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticAccountPatch.cs new file mode 100644 index 000000000000..92eecc886c59 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticAccountPatch.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The type used for update operations of the ElasticAccount. + public partial class ElasticAccountPatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticAccountPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The managed service identities assigned to this resource. + /// Resource tags. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal ElasticAccountPatch(AzureResourceManagerCommonTypesManagedServiceIdentityUpdate identity, IDictionary tags, ElasticAccountUpdateProperties properties, IDictionary serializedAdditionalRawData) + { + Identity = identity; + Tags = tags; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The managed service identities assigned to this resource. + public AzureResourceManagerCommonTypesManagedServiceIdentityUpdate Identity { get; set; } + /// Resource tags. + public IDictionary Tags { get; } + /// The resource-specific properties for this resource. + internal ElasticAccountUpdateProperties Properties { get; set; } + /// Encryption settings. + public ElasticEncryption ElasticAccountUpdateEncryption + { + get => Properties is null ? default : Properties.Encryption; + set + { + if (Properties is null) + Properties = new ElasticAccountUpdateProperties(); + Properties.Encryption = value; + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticAccountProperties.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticAccountProperties.Serialization.cs new file mode 100644 index 000000000000..b6377c9e532a --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticAccountProperties.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticAccountProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticAccountProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToSerialString()); + } + if (Optional.IsDefined(Encryption)) + { + writer.WritePropertyName("encryption"u8); + writer.WriteObjectValue(Encryption, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticAccountProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticAccountProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticAccountProperties(document.RootElement, options); + } + + internal static ElasticAccountProperties DeserializeElasticAccountProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NetAppProvisioningState? provisioningState = default; + ElasticEncryption encryption = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = property.Value.GetString().ToNetAppProvisioningState(); + continue; + } + if (property.NameEquals("encryption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryption = ElasticEncryption.DeserializeElasticEncryption(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticAccountProperties(provisioningState, encryption, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticAccountProperties)} does not support writing '{options.Format}' format."); + } + } + + ElasticAccountProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticAccountProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticAccountProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticAccountProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticAccountProperties.cs new file mode 100644 index 000000000000..c81527c464ce --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticAccountProperties.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// NetApp elastic account properties. + public partial class ElasticAccountProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticAccountProperties() + { + } + + /// Initializes a new instance of . + /// Azure lifecycle management. + /// Encryption settings. + /// Keeps track of any properties unknown to the library. + internal ElasticAccountProperties(NetAppProvisioningState? provisioningState, ElasticEncryption encryption, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + Encryption = encryption; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Azure lifecycle management. + public NetAppProvisioningState? ProvisioningState { get; } + /// Encryption settings. + public ElasticEncryption Encryption { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticAccountUpdateProperties.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticAccountUpdateProperties.Serialization.cs new file mode 100644 index 000000000000..dcf6627ef0c4 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticAccountUpdateProperties.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + internal partial class ElasticAccountUpdateProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticAccountUpdateProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Encryption)) + { + writer.WritePropertyName("encryption"u8); + writer.WriteObjectValue(Encryption, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticAccountUpdateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticAccountUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticAccountUpdateProperties(document.RootElement, options); + } + + internal static ElasticAccountUpdateProperties DeserializeElasticAccountUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ElasticEncryption encryption = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("encryption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryption = ElasticEncryption.DeserializeElasticEncryption(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticAccountUpdateProperties(encryption, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticAccountUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + ElasticAccountUpdateProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticAccountUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticAccountUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticAccountUpdateProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticAccountUpdateProperties.cs new file mode 100644 index 000000000000..52853aaf6022 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticAccountUpdateProperties.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The updatable properties of the ElasticAccount. + internal partial class ElasticAccountUpdateProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticAccountUpdateProperties() + { + } + + /// Initializes a new instance of . + /// Encryption settings. + /// Keeps track of any properties unknown to the library. + internal ElasticAccountUpdateProperties(ElasticEncryption encryption, IDictionary serializedAdditionalRawData) + { + Encryption = encryption; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Encryption settings. + public ElasticEncryption Encryption { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupListResult.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupListResult.Serialization.cs new file mode 100644 index 000000000000..63ec87cdd69c --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + internal partial class ElasticBackupListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticBackupListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticBackupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticBackupListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticBackupListResult(document.RootElement, options); + } + + internal static ElasticBackupListResult DeserializeElasticBackupListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ElasticBackupData.DeserializeElasticBackupData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticBackupListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticBackupListResult)} does not support writing '{options.Format}' format."); + } + } + + ElasticBackupListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticBackupListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticBackupListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupListResult.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupListResult.cs new file mode 100644 index 000000000000..b4374496ad3e --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The response of a ElasticBackup list operation. + internal partial class ElasticBackupListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The ElasticBackup items on this page. + /// is null. + internal ElasticBackupListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The ElasticBackup items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ElasticBackupListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ElasticBackupListResult() + { + } + + /// The ElasticBackup items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPatch.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPatch.Serialization.cs new file mode 100644 index 000000000000..11225e1557b4 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPatch.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticBackupPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticBackupPatch)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + ElasticBackupPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticBackupPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticBackupPatch(document.RootElement, options); + } + + internal static ElasticBackupPatch DeserializeElasticBackupPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ElasticBackupPropertiesUpdate properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ElasticBackupPropertiesUpdate.DeserializeElasticBackupPropertiesUpdate(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerNetAppContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticBackupPatch( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticBackupPatch)} does not support writing '{options.Format}' format."); + } + } + + ElasticBackupPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticBackupPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticBackupPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPatch.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPatch.cs new file mode 100644 index 000000000000..1b877fccf9da --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPatch.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// NetApp Elastic Backup under an elastic Backup Vault. + public partial class ElasticBackupPatch : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticBackupPatch() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal ElasticBackupPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ElasticBackupPropertiesUpdate properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + internal ElasticBackupPropertiesUpdate Properties { get; set; } + /// Label for backup. + public string ElasticBackupPropertiesUpdateLabel + { + get => Properties is null ? default : Properties.Label; + set + { + if (Properties is null) + Properties = new ElasticBackupPropertiesUpdate(); + Properties.Label = value; + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPolicyListResult.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPolicyListResult.Serialization.cs new file mode 100644 index 000000000000..44e0a2dfae3d --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPolicyListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + internal partial class ElasticBackupPolicyListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticBackupPolicyListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticBackupPolicyListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticBackupPolicyListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticBackupPolicyListResult(document.RootElement, options); + } + + internal static ElasticBackupPolicyListResult DeserializeElasticBackupPolicyListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ElasticBackupPolicyData.DeserializeElasticBackupPolicyData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticBackupPolicyListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticBackupPolicyListResult)} does not support writing '{options.Format}' format."); + } + } + + ElasticBackupPolicyListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticBackupPolicyListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticBackupPolicyListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPolicyListResult.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPolicyListResult.cs new file mode 100644 index 000000000000..bc7e0f44ddcc --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPolicyListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The response of a ElasticBackupPolicy list operation. + internal partial class ElasticBackupPolicyListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The ElasticBackupPolicy items on this page. + /// is null. + internal ElasticBackupPolicyListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The ElasticBackupPolicy items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ElasticBackupPolicyListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ElasticBackupPolicyListResult() + { + } + + /// The ElasticBackupPolicy items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPolicyPatch.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPolicyPatch.Serialization.cs new file mode 100644 index 000000000000..f0f61854e884 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPolicyPatch.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticBackupPolicyPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticBackupPolicyPatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticBackupPolicyPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticBackupPolicyPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticBackupPolicyPatch(document.RootElement, options); + } + + internal static ElasticBackupPolicyPatch DeserializeElasticBackupPolicyPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + ElasticBackupPolicyUpdateProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ElasticBackupPolicyUpdateProperties.DeserializeElasticBackupPolicyUpdateProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticBackupPolicyPatch(tags ?? new ChangeTrackingDictionary(), properties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticBackupPolicyPatch)} does not support writing '{options.Format}' format."); + } + } + + ElasticBackupPolicyPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticBackupPolicyPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticBackupPolicyPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPolicyPatch.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPolicyPatch.cs new file mode 100644 index 000000000000..a56f44fecc37 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPolicyPatch.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The type used for update operations of the ElasticBackupPolicy. + public partial class ElasticBackupPolicyPatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticBackupPolicyPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Resource tags. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal ElasticBackupPolicyPatch(IDictionary tags, ElasticBackupPolicyUpdateProperties properties, IDictionary serializedAdditionalRawData) + { + Tags = tags; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource tags. + public IDictionary Tags { get; } + /// The resource-specific properties for this resource. + public ElasticBackupPolicyUpdateProperties Properties { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPolicyProperties.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPolicyProperties.Serialization.cs new file mode 100644 index 000000000000..bdd5adb81881 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPolicyProperties.Serialization.cs @@ -0,0 +1,215 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticBackupPolicyProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticBackupPolicyProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToSerialString()); + } + if (Optional.IsDefined(DailyBackupsToKeep)) + { + writer.WritePropertyName("dailyBackupsToKeep"u8); + writer.WriteNumberValue(DailyBackupsToKeep.Value); + } + if (Optional.IsDefined(WeeklyBackupsToKeep)) + { + writer.WritePropertyName("weeklyBackupsToKeep"u8); + writer.WriteNumberValue(WeeklyBackupsToKeep.Value); + } + if (Optional.IsDefined(MonthlyBackupsToKeep)) + { + writer.WritePropertyName("monthlyBackupsToKeep"u8); + writer.WriteNumberValue(MonthlyBackupsToKeep.Value); + } + if (options.Format != "W" && Optional.IsDefined(AssignedVolumesCount)) + { + writer.WritePropertyName("assignedVolumesCount"u8); + writer.WriteNumberValue(AssignedVolumesCount.Value); + } + if (Optional.IsDefined(PolicyState)) + { + writer.WritePropertyName("policyState"u8); + writer.WriteStringValue(PolicyState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticBackupPolicyProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticBackupPolicyProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticBackupPolicyProperties(document.RootElement, options); + } + + internal static ElasticBackupPolicyProperties DeserializeElasticBackupPolicyProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NetAppProvisioningState? provisioningState = default; + int? dailyBackupsToKeep = default; + int? weeklyBackupsToKeep = default; + int? monthlyBackupsToKeep = default; + int? assignedVolumesCount = default; + ElasticBackupPolicyState? policyState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = property.Value.GetString().ToNetAppProvisioningState(); + continue; + } + if (property.NameEquals("dailyBackupsToKeep"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dailyBackupsToKeep = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("weeklyBackupsToKeep"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + weeklyBackupsToKeep = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("monthlyBackupsToKeep"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + monthlyBackupsToKeep = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("assignedVolumesCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + assignedVolumesCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("policyState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policyState = new ElasticBackupPolicyState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticBackupPolicyProperties( + provisioningState, + dailyBackupsToKeep, + weeklyBackupsToKeep, + monthlyBackupsToKeep, + assignedVolumesCount, + policyState, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticBackupPolicyProperties)} does not support writing '{options.Format}' format."); + } + } + + ElasticBackupPolicyProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticBackupPolicyProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticBackupPolicyProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPolicyProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPolicyProperties.cs new file mode 100644 index 000000000000..3caf25616f80 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPolicyProperties.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Elastic Backup Policy properties. + public partial class ElasticBackupPolicyProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticBackupPolicyProperties() + { + } + + /// Initializes a new instance of . + /// Azure lifecycle management. + /// Daily backups count to keep. + /// Weekly backups count to keep. + /// Monthly backups count to keep. + /// The number of volumes currently using this Backup Policy. + /// The property to identify whether Backup Policy is enabled or not. + /// Keeps track of any properties unknown to the library. + internal ElasticBackupPolicyProperties(NetAppProvisioningState? provisioningState, int? dailyBackupsToKeep, int? weeklyBackupsToKeep, int? monthlyBackupsToKeep, int? assignedVolumesCount, ElasticBackupPolicyState? policyState, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + DailyBackupsToKeep = dailyBackupsToKeep; + WeeklyBackupsToKeep = weeklyBackupsToKeep; + MonthlyBackupsToKeep = monthlyBackupsToKeep; + AssignedVolumesCount = assignedVolumesCount; + PolicyState = policyState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Azure lifecycle management. + public NetAppProvisioningState? ProvisioningState { get; } + /// Daily backups count to keep. + public int? DailyBackupsToKeep { get; set; } + /// Weekly backups count to keep. + public int? WeeklyBackupsToKeep { get; set; } + /// Monthly backups count to keep. + public int? MonthlyBackupsToKeep { get; set; } + /// The number of volumes currently using this Backup Policy. + public int? AssignedVolumesCount { get; } + /// The property to identify whether Backup Policy is enabled or not. + public ElasticBackupPolicyState? PolicyState { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPolicyState.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPolicyState.cs new file mode 100644 index 000000000000..e9ac8f1b95b1 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPolicyState.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Elastic Backup Policy state. + public readonly partial struct ElasticBackupPolicyState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ElasticBackupPolicyState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Value indicating the policy is enabled. + public static ElasticBackupPolicyState Enabled { get; } = new ElasticBackupPolicyState(EnabledValue); + /// Value indicating the policy is disabled. + public static ElasticBackupPolicyState Disabled { get; } = new ElasticBackupPolicyState(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(ElasticBackupPolicyState left, ElasticBackupPolicyState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ElasticBackupPolicyState left, ElasticBackupPolicyState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ElasticBackupPolicyState(string value) => new ElasticBackupPolicyState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ElasticBackupPolicyState other && Equals(other); + /// + public bool Equals(ElasticBackupPolicyState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPolicyUpdateProperties.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPolicyUpdateProperties.Serialization.cs new file mode 100644 index 000000000000..902c3a327e73 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPolicyUpdateProperties.Serialization.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticBackupPolicyUpdateProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticBackupPolicyUpdateProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(DailyBackupsToKeep)) + { + writer.WritePropertyName("dailyBackupsToKeep"u8); + writer.WriteNumberValue(DailyBackupsToKeep.Value); + } + if (Optional.IsDefined(WeeklyBackupsToKeep)) + { + writer.WritePropertyName("weeklyBackupsToKeep"u8); + writer.WriteNumberValue(WeeklyBackupsToKeep.Value); + } + if (Optional.IsDefined(MonthlyBackupsToKeep)) + { + writer.WritePropertyName("monthlyBackupsToKeep"u8); + writer.WriteNumberValue(MonthlyBackupsToKeep.Value); + } + if (Optional.IsDefined(PolicyState)) + { + writer.WritePropertyName("policyState"u8); + writer.WriteStringValue(PolicyState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticBackupPolicyUpdateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticBackupPolicyUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticBackupPolicyUpdateProperties(document.RootElement, options); + } + + internal static ElasticBackupPolicyUpdateProperties DeserializeElasticBackupPolicyUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? dailyBackupsToKeep = default; + int? weeklyBackupsToKeep = default; + int? monthlyBackupsToKeep = default; + ElasticBackupPolicyState? policyState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dailyBackupsToKeep"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dailyBackupsToKeep = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("weeklyBackupsToKeep"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + weeklyBackupsToKeep = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("monthlyBackupsToKeep"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + monthlyBackupsToKeep = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("policyState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policyState = new ElasticBackupPolicyState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticBackupPolicyUpdateProperties(dailyBackupsToKeep, weeklyBackupsToKeep, monthlyBackupsToKeep, policyState, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticBackupPolicyUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + ElasticBackupPolicyUpdateProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticBackupPolicyUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticBackupPolicyUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPolicyUpdateProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPolicyUpdateProperties.cs new file mode 100644 index 000000000000..be981d24d6cf --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPolicyUpdateProperties.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The updatable properties of the ElasticBackupPolicy. + public partial class ElasticBackupPolicyUpdateProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticBackupPolicyUpdateProperties() + { + } + + /// Initializes a new instance of . + /// Daily backups count to keep. + /// Weekly backups count to keep. + /// Monthly backups count to keep. + /// The property to identify whether Backup Policy is enabled or not. + /// Keeps track of any properties unknown to the library. + internal ElasticBackupPolicyUpdateProperties(int? dailyBackupsToKeep, int? weeklyBackupsToKeep, int? monthlyBackupsToKeep, ElasticBackupPolicyState? policyState, IDictionary serializedAdditionalRawData) + { + DailyBackupsToKeep = dailyBackupsToKeep; + WeeklyBackupsToKeep = weeklyBackupsToKeep; + MonthlyBackupsToKeep = monthlyBackupsToKeep; + PolicyState = policyState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Daily backups count to keep. + public int? DailyBackupsToKeep { get; set; } + /// Weekly backups count to keep. + public int? WeeklyBackupsToKeep { get; set; } + /// Monthly backups count to keep. + public int? MonthlyBackupsToKeep { get; set; } + /// The property to identify whether Backup Policy is enabled or not. + public ElasticBackupPolicyState? PolicyState { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupProperties.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupProperties.Serialization.cs new file mode 100644 index 000000000000..ec94f3213481 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupProperties.Serialization.cs @@ -0,0 +1,312 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticBackupProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticBackupProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(CreatedOn)) + { + writer.WritePropertyName("creationDate"u8); + writer.WriteStringValue(CreatedOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(SnapshotCreationOn)) + { + writer.WritePropertyName("snapshotCreationDate"u8); + writer.WriteStringValue(SnapshotCreationOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(CompletionOn)) + { + writer.WritePropertyName("completionDate"u8); + writer.WriteStringValue(CompletionOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToSerialString()); + } + if (options.Format != "W" && Optional.IsDefined(Size)) + { + writer.WritePropertyName("size"u8); + writer.WriteNumberValue(Size.Value); + } + if (Optional.IsDefined(Label)) + { + writer.WritePropertyName("label"u8); + writer.WriteStringValue(Label); + } + if (options.Format != "W" && Optional.IsDefined(BackupType)) + { + writer.WritePropertyName("backupType"u8); + writer.WriteStringValue(BackupType.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(FailureReason)) + { + writer.WritePropertyName("failureReason"u8); + writer.WriteStringValue(FailureReason); + } + writer.WritePropertyName("elasticVolumeResourceId"u8); + writer.WriteStringValue(ElasticVolumeResourceId); + if (Optional.IsDefined(SnapshotUsage)) + { + writer.WritePropertyName("snapshotUsage"u8); + writer.WriteStringValue(SnapshotUsage.Value.ToString()); + } + if (Optional.IsDefined(ElasticSnapshotResourceId)) + { + writer.WritePropertyName("elasticSnapshotResourceId"u8); + writer.WriteStringValue(ElasticSnapshotResourceId); + } + if (options.Format != "W" && Optional.IsDefined(ElasticBackupPolicyResourceId)) + { + writer.WritePropertyName("elasticBackupPolicyResourceId"u8); + writer.WriteStringValue(ElasticBackupPolicyResourceId); + } + if (options.Format != "W" && Optional.IsDefined(VolumeSize)) + { + writer.WritePropertyName("volumeSize"u8); + writer.WriteStringValue(VolumeSize.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticBackupProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticBackupProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticBackupProperties(document.RootElement, options); + } + + internal static ElasticBackupProperties DeserializeElasticBackupProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? creationDate = default; + DateTimeOffset? snapshotCreationDate = default; + DateTimeOffset? completionDate = default; + NetAppProvisioningState? provisioningState = default; + long? size = default; + string label = default; + ElasticBackupType? backupType = default; + string failureReason = default; + ResourceIdentifier elasticVolumeResourceId = default; + SnapshotUsage? snapshotUsage = default; + ResourceIdentifier elasticSnapshotResourceId = default; + ResourceIdentifier elasticBackupPolicyResourceId = default; + VolumeSize? volumeSize = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("creationDate"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + creationDate = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("snapshotCreationDate"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + snapshotCreationDate = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("completionDate"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + completionDate = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = property.Value.GetString().ToNetAppProvisioningState(); + continue; + } + if (property.NameEquals("size"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + size = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("label"u8)) + { + label = property.Value.GetString(); + continue; + } + if (property.NameEquals("backupType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + backupType = new ElasticBackupType(property.Value.GetString()); + continue; + } + if (property.NameEquals("failureReason"u8)) + { + failureReason = property.Value.GetString(); + continue; + } + if (property.NameEquals("elasticVolumeResourceId"u8)) + { + elasticVolumeResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("snapshotUsage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + snapshotUsage = new SnapshotUsage(property.Value.GetString()); + continue; + } + if (property.NameEquals("elasticSnapshotResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + elasticSnapshotResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("elasticBackupPolicyResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + elasticBackupPolicyResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("volumeSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + volumeSize = new VolumeSize(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticBackupProperties( + creationDate, + snapshotCreationDate, + completionDate, + provisioningState, + size, + label, + backupType, + failureReason, + elasticVolumeResourceId, + snapshotUsage, + elasticSnapshotResourceId, + elasticBackupPolicyResourceId, + volumeSize, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticBackupProperties)} does not support writing '{options.Format}' format."); + } + } + + ElasticBackupProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticBackupProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticBackupProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupProperties.cs new file mode 100644 index 000000000000..c261a016e6d8 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupProperties.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Elastic Backup properties. + public partial class ElasticBackupProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// ResourceId used to identify the Elastic Volume. + /// is null. + public ElasticBackupProperties(ResourceIdentifier elasticVolumeResourceId) + { + Argument.AssertNotNull(elasticVolumeResourceId, nameof(elasticVolumeResourceId)); + + ElasticVolumeResourceId = elasticVolumeResourceId; + } + + /// Initializes a new instance of . + /// The creation date of the backup. + /// The snapshot creation date of the backup. + /// The completion date of the backup. + /// Azure lifecycle management. + /// Size of backup in bytes. + /// Label for backup. + /// Type of backup Manual or Scheduled. + /// Failure reason. + /// ResourceId used to identify the Elastic Volume. + /// Manual backup using an already existing snapshot. This will always be CreateNewSnapshot for scheduled backups and UseExistingSnapshot/CreateNewSnapshot for manual backups. + /// ResourceId used to identify the elastic snapshot resource. This is required when an existing snapshot needs to be used for creating a manual backup. + /// ResourceId used to identify the elastic backup policy. + /// Specifies if the backup is for a large volume. + /// Keeps track of any properties unknown to the library. + internal ElasticBackupProperties(DateTimeOffset? createdOn, DateTimeOffset? snapshotCreationOn, DateTimeOffset? completionOn, NetAppProvisioningState? provisioningState, long? size, string label, ElasticBackupType? backupType, string failureReason, ResourceIdentifier elasticVolumeResourceId, SnapshotUsage? snapshotUsage, ResourceIdentifier elasticSnapshotResourceId, ResourceIdentifier elasticBackupPolicyResourceId, VolumeSize? volumeSize, IDictionary serializedAdditionalRawData) + { + CreatedOn = createdOn; + SnapshotCreationOn = snapshotCreationOn; + CompletionOn = completionOn; + ProvisioningState = provisioningState; + Size = size; + Label = label; + BackupType = backupType; + FailureReason = failureReason; + ElasticVolumeResourceId = elasticVolumeResourceId; + SnapshotUsage = snapshotUsage; + ElasticSnapshotResourceId = elasticSnapshotResourceId; + ElasticBackupPolicyResourceId = elasticBackupPolicyResourceId; + VolumeSize = volumeSize; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ElasticBackupProperties() + { + } + + /// The creation date of the backup. + public DateTimeOffset? CreatedOn { get; } + /// The snapshot creation date of the backup. + public DateTimeOffset? SnapshotCreationOn { get; } + /// The completion date of the backup. + public DateTimeOffset? CompletionOn { get; } + /// Azure lifecycle management. + public NetAppProvisioningState? ProvisioningState { get; } + /// Size of backup in bytes. + public long? Size { get; } + /// Label for backup. + public string Label { get; set; } + /// Type of backup Manual or Scheduled. + public ElasticBackupType? BackupType { get; } + /// Failure reason. + public string FailureReason { get; } + /// ResourceId used to identify the Elastic Volume. + public ResourceIdentifier ElasticVolumeResourceId { get; set; } + /// Manual backup using an already existing snapshot. This will always be CreateNewSnapshot for scheduled backups and UseExistingSnapshot/CreateNewSnapshot for manual backups. + public SnapshotUsage? SnapshotUsage { get; set; } + /// ResourceId used to identify the elastic snapshot resource. This is required when an existing snapshot needs to be used for creating a manual backup. + public ResourceIdentifier ElasticSnapshotResourceId { get; set; } + /// ResourceId used to identify the elastic backup policy. + public ResourceIdentifier ElasticBackupPolicyResourceId { get; } + /// Specifies if the backup is for a large volume. + public VolumeSize? VolumeSize { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPropertiesUpdate.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPropertiesUpdate.Serialization.cs new file mode 100644 index 000000000000..8cd20422bc67 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPropertiesUpdate.Serialization.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + internal partial class ElasticBackupPropertiesUpdate : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticBackupPropertiesUpdate)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Label)) + { + writer.WritePropertyName("label"u8); + writer.WriteStringValue(Label); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticBackupPropertiesUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticBackupPropertiesUpdate)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticBackupPropertiesUpdate(document.RootElement, options); + } + + internal static ElasticBackupPropertiesUpdate DeserializeElasticBackupPropertiesUpdate(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string label = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("label"u8)) + { + label = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticBackupPropertiesUpdate(label, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticBackupPropertiesUpdate)} does not support writing '{options.Format}' format."); + } + } + + ElasticBackupPropertiesUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticBackupPropertiesUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticBackupPropertiesUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPropertiesUpdate.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPropertiesUpdate.cs new file mode 100644 index 000000000000..cb09a0c1b882 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupPropertiesUpdate.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Elastic Backup properties. + internal partial class ElasticBackupPropertiesUpdate + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticBackupPropertiesUpdate() + { + } + + /// Initializes a new instance of . + /// Label for backup. + /// Keeps track of any properties unknown to the library. + internal ElasticBackupPropertiesUpdate(string label, IDictionary serializedAdditionalRawData) + { + Label = label; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Label for backup. + public string Label { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupType.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupType.cs new file mode 100644 index 000000000000..d1ea2fddc9bc --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Type of backup. + public readonly partial struct ElasticBackupType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ElasticBackupType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ManualValue = "Manual"; + private const string ScheduledValue = "Scheduled"; + + /// Manual backup type. + public static ElasticBackupType Manual { get; } = new ElasticBackupType(ManualValue); + /// Scheduled backup type. + public static ElasticBackupType Scheduled { get; } = new ElasticBackupType(ScheduledValue); + /// Determines if two values are the same. + public static bool operator ==(ElasticBackupType left, ElasticBackupType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ElasticBackupType left, ElasticBackupType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ElasticBackupType(string value) => new ElasticBackupType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ElasticBackupType other && Equals(other); + /// + public bool Equals(ElasticBackupType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupVaultListResult.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupVaultListResult.Serialization.cs new file mode 100644 index 000000000000..810c23805f91 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupVaultListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + internal partial class ElasticBackupVaultListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticBackupVaultListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticBackupVaultListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticBackupVaultListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticBackupVaultListResult(document.RootElement, options); + } + + internal static ElasticBackupVaultListResult DeserializeElasticBackupVaultListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ElasticBackupVaultData.DeserializeElasticBackupVaultData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticBackupVaultListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticBackupVaultListResult)} does not support writing '{options.Format}' format."); + } + } + + ElasticBackupVaultListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticBackupVaultListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticBackupVaultListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupVaultListResult.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupVaultListResult.cs new file mode 100644 index 000000000000..c63e7df751c5 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupVaultListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The response of a ElasticBackupVault list operation. + internal partial class ElasticBackupVaultListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The ElasticBackupVault items on this page. + /// is null. + internal ElasticBackupVaultListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The ElasticBackupVault items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ElasticBackupVaultListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ElasticBackupVaultListResult() + { + } + + /// The ElasticBackupVault items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupVaultPatch.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupVaultPatch.Serialization.cs new file mode 100644 index 000000000000..96fbb27dfd2d --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupVaultPatch.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticBackupVaultPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticBackupVaultPatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticBackupVaultPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticBackupVaultPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticBackupVaultPatch(document.RootElement, options); + } + + internal static ElasticBackupVaultPatch DeserializeElasticBackupVaultPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticBackupVaultPatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticBackupVaultPatch)} does not support writing '{options.Format}' format."); + } + } + + ElasticBackupVaultPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticBackupVaultPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticBackupVaultPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupVaultPatch.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupVaultPatch.cs new file mode 100644 index 000000000000..1f2a7977314a --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupVaultPatch.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The type used for update operations of the ElasticBackupVault. + public partial class ElasticBackupVaultPatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticBackupVaultPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Resource tags. + /// Keeps track of any properties unknown to the library. + internal ElasticBackupVaultPatch(IDictionary tags, IDictionary serializedAdditionalRawData) + { + Tags = tags; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupVaultProperties.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupVaultProperties.Serialization.cs new file mode 100644 index 000000000000..f33e1273cd86 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupVaultProperties.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + internal partial class ElasticBackupVaultProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticBackupVaultProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToSerialString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticBackupVaultProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticBackupVaultProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticBackupVaultProperties(document.RootElement, options); + } + + internal static ElasticBackupVaultProperties DeserializeElasticBackupVaultProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NetAppProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = property.Value.GetString().ToNetAppProvisioningState(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticBackupVaultProperties(provisioningState, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticBackupVaultProperties)} does not support writing '{options.Format}' format."); + } + } + + ElasticBackupVaultProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticBackupVaultProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticBackupVaultProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupVaultProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupVaultProperties.cs new file mode 100644 index 000000000000..7392e6dbd42f --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticBackupVaultProperties.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Elastic Backup Vault properties. + internal partial class ElasticBackupVaultProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticBackupVaultProperties() + { + } + + /// Initializes a new instance of . + /// Azure lifecycle management. + /// Keeps track of any properties unknown to the library. + internal ElasticBackupVaultProperties(NetAppProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Azure lifecycle management. + public NetAppProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticCapacityPoolListResult.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticCapacityPoolListResult.Serialization.cs new file mode 100644 index 000000000000..95d8e6249d33 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticCapacityPoolListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + internal partial class ElasticCapacityPoolListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticCapacityPoolListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticCapacityPoolListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticCapacityPoolListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticCapacityPoolListResult(document.RootElement, options); + } + + internal static ElasticCapacityPoolListResult DeserializeElasticCapacityPoolListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ElasticCapacityPoolData.DeserializeElasticCapacityPoolData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticCapacityPoolListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticCapacityPoolListResult)} does not support writing '{options.Format}' format."); + } + } + + ElasticCapacityPoolListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticCapacityPoolListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticCapacityPoolListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticCapacityPoolListResult.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticCapacityPoolListResult.cs new file mode 100644 index 000000000000..c903daf9a3eb --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticCapacityPoolListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The response of a ElasticCapacityPool list operation. + internal partial class ElasticCapacityPoolListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The ElasticCapacityPool items on this page. + /// is null. + internal ElasticCapacityPoolListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The ElasticCapacityPool items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ElasticCapacityPoolListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ElasticCapacityPoolListResult() + { + } + + /// The ElasticCapacityPool items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticCapacityPoolPatch.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticCapacityPoolPatch.Serialization.cs new file mode 100644 index 000000000000..bcef4a9412f7 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticCapacityPoolPatch.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticCapacityPoolPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticCapacityPoolPatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticCapacityPoolPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticCapacityPoolPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticCapacityPoolPatch(document.RootElement, options); + } + + internal static ElasticCapacityPoolPatch DeserializeElasticCapacityPoolPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + ElasticCapacityPoolUpdateProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ElasticCapacityPoolUpdateProperties.DeserializeElasticCapacityPoolUpdateProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticCapacityPoolPatch(tags ?? new ChangeTrackingDictionary(), properties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticCapacityPoolPatch)} does not support writing '{options.Format}' format."); + } + } + + ElasticCapacityPoolPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticCapacityPoolPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticCapacityPoolPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticCapacityPoolPatch.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticCapacityPoolPatch.cs new file mode 100644 index 000000000000..ded046aa38a0 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticCapacityPoolPatch.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The type used for update operations of the ElasticCapacityPool. + public partial class ElasticCapacityPoolPatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticCapacityPoolPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Resource tags. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal ElasticCapacityPoolPatch(IDictionary tags, ElasticCapacityPoolUpdateProperties properties, IDictionary serializedAdditionalRawData) + { + Tags = tags; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource tags. + public IDictionary Tags { get; } + /// The resource-specific properties for this resource. + public ElasticCapacityPoolUpdateProperties Properties { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticCapacityPoolProperties.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticCapacityPoolProperties.Serialization.cs new file mode 100644 index 000000000000..7ca526320833 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticCapacityPoolProperties.Serialization.cs @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticCapacityPoolProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticCapacityPoolProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("size"u8); + writer.WriteNumberValue(Size); + writer.WritePropertyName("serviceLevel"u8); + writer.WriteStringValue(ServiceLevel.ToString()); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToSerialString()); + } + if (Optional.IsDefined(Encryption)) + { + writer.WritePropertyName("encryption"u8); + writer.WriteObjectValue(Encryption, options); + } + if (options.Format != "W" && Optional.IsDefined(TotalThroughputMibps)) + { + writer.WritePropertyName("totalThroughputMibps"u8); + writer.WriteNumberValue(TotalThroughputMibps.Value); + } + writer.WritePropertyName("subnetResourceId"u8); + writer.WriteStringValue(SubnetResourceId); + if (options.Format != "W" && Optional.IsDefined(CurrentZone)) + { + writer.WritePropertyName("currentZone"u8); + writer.WriteStringValue(CurrentZone); + } + if (options.Format != "W" && Optional.IsDefined(AvailabilityStatus)) + { + writer.WritePropertyName("availabilityStatus"u8); + writer.WriteStringValue(AvailabilityStatus.Value.ToString()); + } + if (Optional.IsDefined(ActiveDirectoryConfigResourceId)) + { + writer.WritePropertyName("activeDirectoryConfigResourceId"u8); + writer.WriteStringValue(ActiveDirectoryConfigResourceId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticCapacityPoolProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticCapacityPoolProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticCapacityPoolProperties(document.RootElement, options); + } + + internal static ElasticCapacityPoolProperties DeserializeElasticCapacityPoolProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long size = default; + ElasticServiceLevel serviceLevel = default; + NetAppProvisioningState? provisioningState = default; + ElasticEncryptionConfiguration encryption = default; + double? totalThroughputMibps = default; + ResourceIdentifier subnetResourceId = default; + string currentZone = default; + ElasticResourceAvailabilityStatus? availabilityStatus = default; + ResourceIdentifier activeDirectoryConfigResourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("size"u8)) + { + size = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("serviceLevel"u8)) + { + serviceLevel = new ElasticServiceLevel(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = property.Value.GetString().ToNetAppProvisioningState(); + continue; + } + if (property.NameEquals("encryption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryption = ElasticEncryptionConfiguration.DeserializeElasticEncryptionConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("totalThroughputMibps"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + totalThroughputMibps = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("subnetResourceId"u8)) + { + subnetResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("currentZone"u8)) + { + currentZone = property.Value.GetString(); + continue; + } + if (property.NameEquals("availabilityStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + availabilityStatus = new ElasticResourceAvailabilityStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("activeDirectoryConfigResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + activeDirectoryConfigResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticCapacityPoolProperties( + size, + serviceLevel, + provisioningState, + encryption, + totalThroughputMibps, + subnetResourceId, + currentZone, + availabilityStatus, + activeDirectoryConfigResourceId, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticCapacityPoolProperties)} does not support writing '{options.Format}' format."); + } + } + + ElasticCapacityPoolProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticCapacityPoolProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticCapacityPoolProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticCapacityPoolProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticCapacityPoolProperties.cs new file mode 100644 index 000000000000..0ccbd701d54e --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticCapacityPoolProperties.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Elastic capacity pool properties. + public partial class ElasticCapacityPoolProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// 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. + /// The service level of the elastic capacity pool. + /// 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. + /// is null. + public ElasticCapacityPoolProperties(long size, ElasticServiceLevel serviceLevel, ResourceIdentifier subnetResourceId) + { + Argument.AssertNotNull(subnetResourceId, nameof(subnetResourceId)); + + Size = size; + ServiceLevel = serviceLevel; + SubnetResourceId = subnetResourceId; + } + + /// Initializes a new instance of . + /// 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. + /// The service level of the elastic capacity pool. + /// Azure lifecycle management. + /// Encryption settings. + /// Total throughput of the pool in MiB/s. + /// 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. + /// Indicates the current zone of the pool. This can be changed for zoneRedundant service level pool with the changeZone action. + /// Current availability status of the resource. + /// The Azure Resource URI for an Active Directory configuration. This is used by all the SMB volumes within the pool. + /// Keeps track of any properties unknown to the library. + internal ElasticCapacityPoolProperties(long size, ElasticServiceLevel serviceLevel, NetAppProvisioningState? provisioningState, ElasticEncryptionConfiguration encryption, double? totalThroughputMibps, ResourceIdentifier subnetResourceId, string currentZone, ElasticResourceAvailabilityStatus? availabilityStatus, ResourceIdentifier activeDirectoryConfigResourceId, IDictionary serializedAdditionalRawData) + { + Size = size; + ServiceLevel = serviceLevel; + ProvisioningState = provisioningState; + Encryption = encryption; + TotalThroughputMibps = totalThroughputMibps; + SubnetResourceId = subnetResourceId; + CurrentZone = currentZone; + AvailabilityStatus = availabilityStatus; + ActiveDirectoryConfigResourceId = activeDirectoryConfigResourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ElasticCapacityPoolProperties() + { + } + + /// 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. + public long Size { get; set; } + /// The service level of the elastic capacity pool. + public ElasticServiceLevel ServiceLevel { get; set; } + /// Azure lifecycle management. + public NetAppProvisioningState? ProvisioningState { get; } + /// Encryption settings. + public ElasticEncryptionConfiguration Encryption { get; set; } + /// Total throughput of the pool in MiB/s. + public double? TotalThroughputMibps { get; } + /// 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. + public ResourceIdentifier SubnetResourceId { get; set; } + /// Indicates the current zone of the pool. This can be changed for zoneRedundant service level pool with the changeZone action. + public string CurrentZone { get; } + /// Current availability status of the resource. + public ElasticResourceAvailabilityStatus? AvailabilityStatus { get; } + /// The Azure Resource URI for an Active Directory configuration. This is used by all the SMB volumes within the pool. + public ResourceIdentifier ActiveDirectoryConfigResourceId { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticCapacityPoolUpdateProperties.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticCapacityPoolUpdateProperties.Serialization.cs new file mode 100644 index 000000000000..126606699b08 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticCapacityPoolUpdateProperties.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticCapacityPoolUpdateProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticCapacityPoolUpdateProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Size)) + { + writer.WritePropertyName("size"u8); + writer.WriteNumberValue(Size.Value); + } + if (Optional.IsDefined(Encryption)) + { + writer.WritePropertyName("encryption"u8); + writer.WriteObjectValue(Encryption, options); + } + if (Optional.IsDefined(ActiveDirectoryConfigResourceId)) + { + writer.WritePropertyName("activeDirectoryConfigResourceId"u8); + writer.WriteStringValue(ActiveDirectoryConfigResourceId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticCapacityPoolUpdateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticCapacityPoolUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticCapacityPoolUpdateProperties(document.RootElement, options); + } + + internal static ElasticCapacityPoolUpdateProperties DeserializeElasticCapacityPoolUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long? size = default; + ElasticEncryptionConfigurationUpdate encryption = default; + ResourceIdentifier activeDirectoryConfigResourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("size"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + size = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("encryption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryption = ElasticEncryptionConfigurationUpdate.DeserializeElasticEncryptionConfigurationUpdate(property.Value, options); + continue; + } + if (property.NameEquals("activeDirectoryConfigResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + activeDirectoryConfigResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticCapacityPoolUpdateProperties(size, encryption, activeDirectoryConfigResourceId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticCapacityPoolUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + ElasticCapacityPoolUpdateProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticCapacityPoolUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticCapacityPoolUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticCapacityPoolUpdateProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticCapacityPoolUpdateProperties.cs new file mode 100644 index 000000000000..ca3a9c3842e5 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticCapacityPoolUpdateProperties.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The updatable properties of the ElasticCapacityPool. + public partial class ElasticCapacityPoolUpdateProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticCapacityPoolUpdateProperties() + { + } + + /// Initializes a new instance of . + /// 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. + /// Encryption settings. + /// The Azure Resource URI for an Active Directory configuration. This is used by all the SMB volumes within the pool. + /// Keeps track of any properties unknown to the library. + internal ElasticCapacityPoolUpdateProperties(long? size, ElasticEncryptionConfigurationUpdate encryption, ResourceIdentifier activeDirectoryConfigResourceId, IDictionary serializedAdditionalRawData) + { + Size = size; + Encryption = encryption; + ActiveDirectoryConfigResourceId = activeDirectoryConfigResourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// 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. + public long? Size { get; set; } + /// Encryption settings. + public ElasticEncryptionConfigurationUpdate Encryption { get; set; } + /// The Azure Resource URI for an Active Directory configuration. This is used by all the SMB volumes within the pool. + public ResourceIdentifier ActiveDirectoryConfigResourceId { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticEncryption.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticEncryption.Serialization.cs new file mode 100644 index 000000000000..77f64227c8e4 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticEncryption.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticEncryption : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticEncryption)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(KeySource)) + { + writer.WritePropertyName("keySource"u8); + writer.WriteStringValue(KeySource.Value.ToString()); + } + if (Optional.IsDefined(KeyVaultProperties)) + { + writer.WritePropertyName("keyVaultProperties"u8); + writer.WriteObjectValue(KeyVaultProperties, options); + } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + writer.WriteObjectValue(Identity, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticEncryption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticEncryption)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticEncryption(document.RootElement, options); + } + + internal static ElasticEncryption DeserializeElasticEncryption(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NetAppKeySource? keySource = default; + ElasticKeyVaultProperties keyVaultProperties = default; + ElasticEncryptionIdentity identity = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keySource"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keySource = new NetAppKeySource(property.Value.GetString()); + continue; + } + if (property.NameEquals("keyVaultProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyVaultProperties = ElasticKeyVaultProperties.DeserializeElasticKeyVaultProperties(property.Value, options); + continue; + } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = ElasticEncryptionIdentity.DeserializeElasticEncryptionIdentity(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticEncryption(keySource, keyVaultProperties, identity, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticEncryption)} does not support writing '{options.Format}' format."); + } + } + + ElasticEncryption IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticEncryption(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticEncryption)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticEncryption.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticEncryption.cs new file mode 100644 index 000000000000..348786a3a3f0 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticEncryption.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Encryption settings. + public partial class ElasticEncryption + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticEncryption() + { + } + + /// Initializes a new instance of . + /// The encryption keySource (provider). Possible values (case-insensitive): Microsoft.NetApp, Microsoft.KeyVault. + /// Properties provided by KeyVault. Applicable if keySource is 'Microsoft.KeyVault'. + /// Identity used to authenticate to KeyVault. Applicable if keySource is 'Microsoft.KeyVault'. + /// Keeps track of any properties unknown to the library. + internal ElasticEncryption(NetAppKeySource? keySource, ElasticKeyVaultProperties keyVaultProperties, ElasticEncryptionIdentity identity, IDictionary serializedAdditionalRawData) + { + KeySource = keySource; + KeyVaultProperties = keyVaultProperties; + Identity = identity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The encryption keySource (provider). Possible values (case-insensitive): Microsoft.NetApp, Microsoft.KeyVault. + public NetAppKeySource? KeySource { get; set; } + /// Properties provided by KeyVault. Applicable if keySource is 'Microsoft.KeyVault'. + public ElasticKeyVaultProperties KeyVaultProperties { get; set; } + /// Identity used to authenticate to KeyVault. Applicable if keySource is 'Microsoft.KeyVault'. + public ElasticEncryptionIdentity Identity { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticEncryptionConfiguration.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticEncryptionConfiguration.Serialization.cs new file mode 100644 index 000000000000..5f87a14ad655 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticEncryptionConfiguration.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticEncryptionConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticEncryptionConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("elasticPoolEncryptionKeySource"u8); + writer.WriteStringValue(ElasticPoolEncryptionKeySource.ToString()); + writer.WritePropertyName("keyVaultPrivateEndpointResourceId"u8); + writer.WriteStringValue(KeyVaultPrivateEndpointResourceId); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticEncryptionConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticEncryptionConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticEncryptionConfiguration(document.RootElement, options); + } + + internal static ElasticEncryptionConfiguration DeserializeElasticEncryptionConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ElasticPoolEncryptionKeySource elasticPoolEncryptionKeySource = default; + ResourceIdentifier keyVaultPrivateEndpointResourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("elasticPoolEncryptionKeySource"u8)) + { + elasticPoolEncryptionKeySource = new ElasticPoolEncryptionKeySource(property.Value.GetString()); + continue; + } + if (property.NameEquals("keyVaultPrivateEndpointResourceId"u8)) + { + keyVaultPrivateEndpointResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticEncryptionConfiguration(elasticPoolEncryptionKeySource, keyVaultPrivateEndpointResourceId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticEncryptionConfiguration)} does not support writing '{options.Format}' format."); + } + } + + ElasticEncryptionConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticEncryptionConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticEncryptionConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticEncryptionConfiguration.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticEncryptionConfiguration.cs new file mode 100644 index 000000000000..e09f1201513b --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticEncryptionConfiguration.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// CMK Encryption Configuration. + public partial class ElasticEncryptionConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Pool Encryption Key Source. + /// The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + /// is null. + public ElasticEncryptionConfiguration(ElasticPoolEncryptionKeySource elasticPoolEncryptionKeySource, ResourceIdentifier keyVaultPrivateEndpointResourceId) + { + Argument.AssertNotNull(keyVaultPrivateEndpointResourceId, nameof(keyVaultPrivateEndpointResourceId)); + + ElasticPoolEncryptionKeySource = elasticPoolEncryptionKeySource; + KeyVaultPrivateEndpointResourceId = keyVaultPrivateEndpointResourceId; + } + + /// Initializes a new instance of . + /// Pool Encryption Key Source. + /// The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + /// Keeps track of any properties unknown to the library. + internal ElasticEncryptionConfiguration(ElasticPoolEncryptionKeySource elasticPoolEncryptionKeySource, ResourceIdentifier keyVaultPrivateEndpointResourceId, IDictionary serializedAdditionalRawData) + { + ElasticPoolEncryptionKeySource = elasticPoolEncryptionKeySource; + KeyVaultPrivateEndpointResourceId = keyVaultPrivateEndpointResourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ElasticEncryptionConfiguration() + { + } + + /// Pool Encryption Key Source. + public ElasticPoolEncryptionKeySource ElasticPoolEncryptionKeySource { get; set; } + /// The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + public ResourceIdentifier KeyVaultPrivateEndpointResourceId { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticEncryptionConfigurationUpdate.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticEncryptionConfigurationUpdate.Serialization.cs new file mode 100644 index 000000000000..2aa5d3af7e1c --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticEncryptionConfigurationUpdate.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticEncryptionConfigurationUpdate : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticEncryptionConfigurationUpdate)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ElasticPoolEncryptionKeySource)) + { + writer.WritePropertyName("elasticPoolEncryptionKeySource"u8); + writer.WriteStringValue(ElasticPoolEncryptionKeySource.Value.ToString()); + } + if (Optional.IsDefined(KeyVaultPrivateEndpointResourceId)) + { + writer.WritePropertyName("keyVaultPrivateEndpointResourceId"u8); + writer.WriteStringValue(KeyVaultPrivateEndpointResourceId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticEncryptionConfigurationUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticEncryptionConfigurationUpdate)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticEncryptionConfigurationUpdate(document.RootElement, options); + } + + internal static ElasticEncryptionConfigurationUpdate DeserializeElasticEncryptionConfigurationUpdate(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ElasticPoolEncryptionKeySource? elasticPoolEncryptionKeySource = default; + ResourceIdentifier keyVaultPrivateEndpointResourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("elasticPoolEncryptionKeySource"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + elasticPoolEncryptionKeySource = new ElasticPoolEncryptionKeySource(property.Value.GetString()); + continue; + } + if (property.NameEquals("keyVaultPrivateEndpointResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyVaultPrivateEndpointResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticEncryptionConfigurationUpdate(elasticPoolEncryptionKeySource, keyVaultPrivateEndpointResourceId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticEncryptionConfigurationUpdate)} does not support writing '{options.Format}' format."); + } + } + + ElasticEncryptionConfigurationUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticEncryptionConfigurationUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticEncryptionConfigurationUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticEncryptionConfigurationUpdate.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticEncryptionConfigurationUpdate.cs new file mode 100644 index 000000000000..a909bde28ebf --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticEncryptionConfigurationUpdate.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// CMK Encryption Configuration. + public partial class ElasticEncryptionConfigurationUpdate + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticEncryptionConfigurationUpdate() + { + } + + /// Initializes a new instance of . + /// Pool Encryption Key Source. + /// The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + /// Keeps track of any properties unknown to the library. + internal ElasticEncryptionConfigurationUpdate(ElasticPoolEncryptionKeySource? elasticPoolEncryptionKeySource, ResourceIdentifier keyVaultPrivateEndpointResourceId, IDictionary serializedAdditionalRawData) + { + ElasticPoolEncryptionKeySource = elasticPoolEncryptionKeySource; + KeyVaultPrivateEndpointResourceId = keyVaultPrivateEndpointResourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Pool Encryption Key Source. + public ElasticPoolEncryptionKeySource? ElasticPoolEncryptionKeySource { get; set; } + /// The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. + public ResourceIdentifier KeyVaultPrivateEndpointResourceId { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticEncryptionIdentity.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticEncryptionIdentity.Serialization.cs new file mode 100644 index 000000000000..f2791b5af754 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticEncryptionIdentity.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticEncryptionIdentity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticEncryptionIdentity)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(PrincipalId)) + { + writer.WritePropertyName("principalId"u8); + writer.WriteStringValue(PrincipalId); + } + if (Optional.IsDefined(UserAssignedIdentity)) + { + writer.WritePropertyName("userAssignedIdentity"u8); + writer.WriteStringValue(UserAssignedIdentity); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticEncryptionIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticEncryptionIdentity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticEncryptionIdentity(document.RootElement, options); + } + + internal static ElasticEncryptionIdentity DeserializeElasticEncryptionIdentity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string principalId = default; + ResourceIdentifier userAssignedIdentity = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("principalId"u8)) + { + principalId = property.Value.GetString(); + continue; + } + if (property.NameEquals("userAssignedIdentity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userAssignedIdentity = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticEncryptionIdentity(principalId, userAssignedIdentity, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticEncryptionIdentity)} does not support writing '{options.Format}' format."); + } + } + + ElasticEncryptionIdentity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticEncryptionIdentity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticEncryptionIdentity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticEncryptionIdentity.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticEncryptionIdentity.cs new file mode 100644 index 000000000000..55d3df3e1940 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticEncryptionIdentity.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Identity used to authenticate with key vault. + public partial class ElasticEncryptionIdentity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticEncryptionIdentity() + { + } + + /// Initializes a new instance of . + /// The principal ID (object ID) of the identity used to authenticate with key vault. Read-only. + /// 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. + /// Keeps track of any properties unknown to the library. + internal ElasticEncryptionIdentity(string principalId, ResourceIdentifier userAssignedIdentity, IDictionary serializedAdditionalRawData) + { + PrincipalId = principalId; + UserAssignedIdentity = userAssignedIdentity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The principal ID (object ID) of the identity used to authenticate with key vault. Read-only. + public string PrincipalId { get; } + /// 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. + public ResourceIdentifier UserAssignedIdentity { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticExportPolicy.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticExportPolicy.Serialization.cs new file mode 100644 index 000000000000..035f5b93231e --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticExportPolicy.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + internal partial class ElasticExportPolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticExportPolicy)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Rules)) + { + writer.WritePropertyName("rules"u8); + writer.WriteStartArray(); + foreach (var item in Rules) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticExportPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticExportPolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticExportPolicy(document.RootElement, options); + } + + internal static ElasticExportPolicy DeserializeElasticExportPolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList rules = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("rules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ElasticExportPolicyRule.DeserializeElasticExportPolicyRule(item, options)); + } + rules = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticExportPolicy(rules ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticExportPolicy)} does not support writing '{options.Format}' format."); + } + } + + ElasticExportPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticExportPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticExportPolicy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticExportPolicy.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticExportPolicy.cs new file mode 100644 index 000000000000..6e23a15114d3 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticExportPolicy.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Set of export policy rules. + internal partial class ElasticExportPolicy + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticExportPolicy() + { + Rules = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Export policy rule. + /// Keeps track of any properties unknown to the library. + internal ElasticExportPolicy(IList rules, IDictionary serializedAdditionalRawData) + { + Rules = rules; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Export policy rule. + public IList Rules { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticExportPolicyRule.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticExportPolicyRule.Serialization.cs new file mode 100644 index 000000000000..c9dd85734591 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticExportPolicyRule.Serialization.cs @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticExportPolicyRule : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticExportPolicyRule)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(RuleIndex)) + { + writer.WritePropertyName("ruleIndex"u8); + writer.WriteNumberValue(RuleIndex.Value); + } + if (Optional.IsDefined(UnixAccessRule)) + { + writer.WritePropertyName("unixAccessRule"u8); + writer.WriteStringValue(UnixAccessRule.Value.ToString()); + } + if (Optional.IsDefined(Nfsv3)) + { + writer.WritePropertyName("nfsv3"u8); + writer.WriteStringValue(Nfsv3.Value.ToString()); + } + if (Optional.IsDefined(Nfsv4)) + { + writer.WritePropertyName("nfsv4"u8); + writer.WriteStringValue(Nfsv4.Value.ToString()); + } + if (Optional.IsCollectionDefined(AllowedClients)) + { + writer.WritePropertyName("allowedClients"u8); + writer.WriteStartArray(); + foreach (var item in AllowedClients) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(RootAccess)) + { + writer.WritePropertyName("rootAccess"u8); + writer.WriteStringValue(RootAccess.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticExportPolicyRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticExportPolicyRule)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticExportPolicyRule(document.RootElement, options); + } + + internal static ElasticExportPolicyRule DeserializeElasticExportPolicyRule(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? ruleIndex = default; + ElasticUnixAccessRule? unixAccessRule = default; + ElasticNfsv3Access? nfsv3 = default; + ElasticNfsv4Access? nfsv4 = default; + IList allowedClients = default; + ElasticRootAccess? rootAccess = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ruleIndex"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ruleIndex = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("unixAccessRule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + unixAccessRule = new ElasticUnixAccessRule(property.Value.GetString()); + continue; + } + if (property.NameEquals("nfsv3"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nfsv3 = new ElasticNfsv3Access(property.Value.GetString()); + continue; + } + if (property.NameEquals("nfsv4"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nfsv4 = new ElasticNfsv4Access(property.Value.GetString()); + continue; + } + if (property.NameEquals("allowedClients"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + allowedClients = array; + continue; + } + if (property.NameEquals("rootAccess"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + rootAccess = new ElasticRootAccess(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticExportPolicyRule( + ruleIndex, + unixAccessRule, + nfsv3, + nfsv4, + allowedClients ?? new ChangeTrackingList(), + rootAccess, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticExportPolicyRule)} does not support writing '{options.Format}' format."); + } + } + + ElasticExportPolicyRule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticExportPolicyRule(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticExportPolicyRule)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticExportPolicyRule.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticExportPolicyRule.cs new file mode 100644 index 000000000000..8ca87016c5ef --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticExportPolicyRule.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Elastic Volume Export Policy Rule. + public partial class ElasticExportPolicyRule + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticExportPolicyRule() + { + AllowedClients = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// 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. + /// 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. + /// Allows clients to access the volume with the NFSv3 protocol. Enable only for NFSv3 type volumes. + /// Allows clients to access the volume with at least NFSv4.1 protocol. + /// Client ingress specification for the export policy as list of IPv4 CIDRs, IPv4 host addresses and host names. + /// Indicates whether root access to the volume is granted to clients affected by this rule. + /// Keeps track of any properties unknown to the library. + internal ElasticExportPolicyRule(int? ruleIndex, ElasticUnixAccessRule? unixAccessRule, ElasticNfsv3Access? nfsv3, ElasticNfsv4Access? nfsv4, IList allowedClients, ElasticRootAccess? rootAccess, IDictionary serializedAdditionalRawData) + { + RuleIndex = ruleIndex; + UnixAccessRule = unixAccessRule; + Nfsv3 = nfsv3; + Nfsv4 = nfsv4; + AllowedClients = allowedClients; + RootAccess = rootAccess; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// 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. + public int? RuleIndex { get; set; } + /// 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. + public ElasticUnixAccessRule? UnixAccessRule { get; set; } + /// Allows clients to access the volume with the NFSv3 protocol. Enable only for NFSv3 type volumes. + public ElasticNfsv3Access? Nfsv3 { get; set; } + /// Allows clients to access the volume with at least NFSv4.1 protocol. + public ElasticNfsv4Access? Nfsv4 { get; set; } + /// Client ingress specification for the export policy as list of IPv4 CIDRs, IPv4 host addresses and host names. + public IList AllowedClients { get; } + /// Indicates whether root access to the volume is granted to clients affected by this rule. + public ElasticRootAccess? RootAccess { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticKeyVaultProperties.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticKeyVaultProperties.Serialization.cs new file mode 100644 index 000000000000..bffc9659e7e3 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticKeyVaultProperties.Serialization.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticKeyVaultProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticKeyVaultProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(KeyVaultUri)) + { + writer.WritePropertyName("keyVaultUri"u8); + writer.WriteStringValue(KeyVaultUri.AbsoluteUri); + } + if (Optional.IsDefined(KeyName)) + { + writer.WritePropertyName("keyName"u8); + writer.WriteStringValue(KeyName); + } + if (Optional.IsDefined(KeyVaultResourceId)) + { + writer.WritePropertyName("keyVaultResourceId"u8); + writer.WriteStringValue(KeyVaultResourceId); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticKeyVaultProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticKeyVaultProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticKeyVaultProperties(document.RootElement, options); + } + + internal static ElasticKeyVaultProperties DeserializeElasticKeyVaultProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Uri keyVaultUri = default; + string keyName = default; + ResourceIdentifier keyVaultResourceId = default; + ElasticKeyVaultStatus? status = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keyVaultUri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyVaultUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("keyName"u8)) + { + keyName = property.Value.GetString(); + continue; + } + if (property.NameEquals("keyVaultResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyVaultResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new ElasticKeyVaultStatus(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticKeyVaultProperties(keyVaultUri, keyName, keyVaultResourceId, status, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticKeyVaultProperties)} does not support writing '{options.Format}' format."); + } + } + + ElasticKeyVaultProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticKeyVaultProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticKeyVaultProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticKeyVaultProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticKeyVaultProperties.cs new file mode 100644 index 000000000000..c17392271930 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticKeyVaultProperties.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Properties of key vault. + public partial class ElasticKeyVaultProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticKeyVaultProperties() + { + } + + /// Initializes a new instance of . + /// The Uri of KeyVault. + /// The name of KeyVault key. + /// The resource ID of KeyVault. + /// Status of the KeyVault connection. + /// Keeps track of any properties unknown to the library. + internal ElasticKeyVaultProperties(Uri keyVaultUri, string keyName, ResourceIdentifier keyVaultResourceId, ElasticKeyVaultStatus? status, IDictionary serializedAdditionalRawData) + { + KeyVaultUri = keyVaultUri; + KeyName = keyName; + KeyVaultResourceId = keyVaultResourceId; + Status = status; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The Uri of KeyVault. + public Uri KeyVaultUri { get; set; } + /// The name of KeyVault key. + public string KeyName { get; set; } + /// The resource ID of KeyVault. + public ResourceIdentifier KeyVaultResourceId { get; set; } + /// Status of the KeyVault connection. + public ElasticKeyVaultStatus? Status { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticKeyVaultStatus.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticKeyVaultStatus.cs new file mode 100644 index 000000000000..76644bd9c192 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticKeyVaultStatus.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// KeyVault status. + public readonly partial struct ElasticKeyVaultStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ElasticKeyVaultStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatedValue = "Created"; + private const string InUseValue = "InUse"; + private const string DeletedValue = "Deleted"; + private const string ErrorValue = "Error"; + private const string UpdatingValue = "Updating"; + + /// KeyVault connection created but not in use. + public static ElasticKeyVaultStatus Created { get; } = new ElasticKeyVaultStatus(CreatedValue); + /// KeyVault connection in use by SMB Volume. + public static ElasticKeyVaultStatus InUse { get; } = new ElasticKeyVaultStatus(InUseValue); + /// KeyVault connection Deleted. + public static ElasticKeyVaultStatus Deleted { get; } = new ElasticKeyVaultStatus(DeletedValue); + /// Error with the KeyVault connection. + public static ElasticKeyVaultStatus Error { get; } = new ElasticKeyVaultStatus(ErrorValue); + /// KeyVault connection Updating. + public static ElasticKeyVaultStatus Updating { get; } = new ElasticKeyVaultStatus(UpdatingValue); + /// Determines if two values are the same. + public static bool operator ==(ElasticKeyVaultStatus left, ElasticKeyVaultStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ElasticKeyVaultStatus left, ElasticKeyVaultStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ElasticKeyVaultStatus(string value) => new ElasticKeyVaultStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ElasticKeyVaultStatus other && Equals(other); + /// + public bool Equals(ElasticKeyVaultStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticMountTargetProperties.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticMountTargetProperties.Serialization.cs new file mode 100644 index 000000000000..343e7e78aafa --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticMountTargetProperties.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticMountTargetProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticMountTargetProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(IPAddress)) + { + writer.WritePropertyName("ipAddress"u8); + writer.WriteStringValue(IPAddress); + } + if (options.Format != "W" && Optional.IsDefined(SmbServerFqdn)) + { + writer.WritePropertyName("smbServerFqdn"u8); + writer.WriteStringValue(SmbServerFqdn); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticMountTargetProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticMountTargetProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticMountTargetProperties(document.RootElement, options); + } + + internal static ElasticMountTargetProperties DeserializeElasticMountTargetProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string ipAddress = default; + string smbServerFqdn = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ipAddress"u8)) + { + ipAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("smbServerFqdn"u8)) + { + smbServerFqdn = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticMountTargetProperties(ipAddress, smbServerFqdn, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticMountTargetProperties)} does not support writing '{options.Format}' format."); + } + } + + ElasticMountTargetProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticMountTargetProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticMountTargetProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticMountTargetProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticMountTargetProperties.cs new file mode 100644 index 000000000000..155890b77e6d --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticMountTargetProperties.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Contains all the information needed to mount an elastic volume. + public partial class ElasticMountTargetProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ElasticMountTargetProperties() + { + } + + /// Initializes a new instance of . + /// The mount target's IPv4 address, used to mount the volume. + /// The SMB server's Fully Qualified Domain Name, FQDN. + /// Keeps track of any properties unknown to the library. + internal ElasticMountTargetProperties(string ipAddress, string smbServerFqdn, IDictionary serializedAdditionalRawData) + { + IPAddress = ipAddress; + SmbServerFqdn = smbServerFqdn; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The mount target's IPv4 address, used to mount the volume. + public string IPAddress { get; } + /// The SMB server's Fully Qualified Domain Name, FQDN. + public string SmbServerFqdn { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticNfsv3Access.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticNfsv3Access.cs new file mode 100644 index 000000000000..ee65123fdd02 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticNfsv3Access.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Allows clients to access the volume with the NFSv3 protocol. Enable only for NFSv3 type volumes. + public readonly partial struct ElasticNfsv3Access : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ElasticNfsv3Access(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Clients can connect to the volume using the NFSv3 protocol. + public static ElasticNfsv3Access Enabled { get; } = new ElasticNfsv3Access(EnabledValue); + /// Clients can't connect to the volume using the NFSv3 protocol. + public static ElasticNfsv3Access Disabled { get; } = new ElasticNfsv3Access(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(ElasticNfsv3Access left, ElasticNfsv3Access right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ElasticNfsv3Access left, ElasticNfsv3Access right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ElasticNfsv3Access(string value) => new ElasticNfsv3Access(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ElasticNfsv3Access other && Equals(other); + /// + public bool Equals(ElasticNfsv3Access other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticNfsv4Access.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticNfsv4Access.cs new file mode 100644 index 000000000000..ebd9b78b76ad --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticNfsv4Access.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Allows clients to access the volume with at least NFSv4.1 protocol. + public readonly partial struct ElasticNfsv4Access : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ElasticNfsv4Access(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Clients can connect to the volume using the NFSv4 protocol. + public static ElasticNfsv4Access Enabled { get; } = new ElasticNfsv4Access(EnabledValue); + /// Clients can't connect to the volume using the NFSv4 protocol. + public static ElasticNfsv4Access Disabled { get; } = new ElasticNfsv4Access(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(ElasticNfsv4Access left, ElasticNfsv4Access right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ElasticNfsv4Access left, ElasticNfsv4Access right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ElasticNfsv4Access(string value) => new ElasticNfsv4Access(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ElasticNfsv4Access other && Equals(other); + /// + public bool Equals(ElasticNfsv4Access other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticPoolEncryptionKeySource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticPoolEncryptionKeySource.cs new file mode 100644 index 000000000000..ca37106a56ba --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticPoolEncryptionKeySource.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Pool Encryption Key Source. + public readonly partial struct ElasticPoolEncryptionKeySource : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ElasticPoolEncryptionKeySource(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NetAppValue = "NetApp"; + private const string KeyVaultValue = "KeyVault"; + + /// Represents the encryption key source of Elastic pool is Microsoft.NetApp. + public static ElasticPoolEncryptionKeySource NetApp { get; } = new ElasticPoolEncryptionKeySource(NetAppValue); + /// Represents the encryption key source of Elastic pool is Microsoft.KeyVault. + public static ElasticPoolEncryptionKeySource KeyVault { get; } = new ElasticPoolEncryptionKeySource(KeyVaultValue); + /// Determines if two values are the same. + public static bool operator ==(ElasticPoolEncryptionKeySource left, ElasticPoolEncryptionKeySource right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ElasticPoolEncryptionKeySource left, ElasticPoolEncryptionKeySource right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ElasticPoolEncryptionKeySource(string value) => new ElasticPoolEncryptionKeySource(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ElasticPoolEncryptionKeySource other && Equals(other); + /// + public bool Equals(ElasticPoolEncryptionKeySource other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticProtocolType.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticProtocolType.cs new file mode 100644 index 000000000000..f147f21f1344 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticProtocolType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Protocol types for elastic volume. + public readonly partial struct ElasticProtocolType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ElasticProtocolType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NFSv3Value = "NFSv3"; + private const string NFSv4Value = "NFSv4"; + private const string SMBValue = "SMB"; + + /// NFSv3 protocol type. + public static ElasticProtocolType NFSv3 { get; } = new ElasticProtocolType(NFSv3Value); + /// NFSv4 protocol type. + public static ElasticProtocolType NFSv4 { get; } = new ElasticProtocolType(NFSv4Value); + /// SMB/CIFS protocol type. + public static ElasticProtocolType SMB { get; } = new ElasticProtocolType(SMBValue); + /// Determines if two values are the same. + public static bool operator ==(ElasticProtocolType left, ElasticProtocolType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ElasticProtocolType left, ElasticProtocolType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ElasticProtocolType(string value) => new ElasticProtocolType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ElasticProtocolType other && Equals(other); + /// + public bool Equals(ElasticProtocolType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticResourceAvailabilityStatus.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticResourceAvailabilityStatus.cs new file mode 100644 index 000000000000..87079f065ac2 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticResourceAvailabilityStatus.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Current availability status of the resource. + public readonly partial struct ElasticResourceAvailabilityStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ElasticResourceAvailabilityStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string OnlineValue = "Online"; + private const string OfflineValue = "Offline"; + + /// The resource is currently Online and accessible. + public static ElasticResourceAvailabilityStatus Online { get; } = new ElasticResourceAvailabilityStatus(OnlineValue); + /// The resource is currently Offline and not accessible. + public static ElasticResourceAvailabilityStatus Offline { get; } = new ElasticResourceAvailabilityStatus(OfflineValue); + /// Determines if two values are the same. + public static bool operator ==(ElasticResourceAvailabilityStatus left, ElasticResourceAvailabilityStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ElasticResourceAvailabilityStatus left, ElasticResourceAvailabilityStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ElasticResourceAvailabilityStatus(string value) => new ElasticResourceAvailabilityStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ElasticResourceAvailabilityStatus other && Equals(other); + /// + public bool Equals(ElasticResourceAvailabilityStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticRootAccess.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticRootAccess.cs new file mode 100644 index 000000000000..8b0e7238192a --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticRootAccess.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Indicates whether root access to the volume is granted to clients affected by this rule. + public readonly partial struct ElasticRootAccess : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ElasticRootAccess(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Root user access is enabled for clients affected by this rule. + public static ElasticRootAccess Enabled { get; } = new ElasticRootAccess(EnabledValue); + /// Root user access is disabled for clients affected by this rule. + public static ElasticRootAccess Disabled { get; } = new ElasticRootAccess(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(ElasticRootAccess left, ElasticRootAccess right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ElasticRootAccess left, ElasticRootAccess right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ElasticRootAccess(string value) => new ElasticRootAccess(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ElasticRootAccess other && Equals(other); + /// + public bool Equals(ElasticRootAccess other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticServiceLevel.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticServiceLevel.cs new file mode 100644 index 000000000000..2954e31a1d97 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticServiceLevel.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Service level for elastic capacity pool. + public readonly partial struct ElasticServiceLevel : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ElasticServiceLevel(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ZoneRedundantValue = "ZoneRedundant"; + + /// Zone redundant storage service level. + public static ElasticServiceLevel ZoneRedundant { get; } = new ElasticServiceLevel(ZoneRedundantValue); + /// Determines if two values are the same. + public static bool operator ==(ElasticServiceLevel left, ElasticServiceLevel right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ElasticServiceLevel left, ElasticServiceLevel right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ElasticServiceLevel(string value) => new ElasticServiceLevel(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ElasticServiceLevel other && Equals(other); + /// + public bool Equals(ElasticServiceLevel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSmbEncryption.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSmbEncryption.cs new file mode 100644 index 000000000000..a002bb3942b4 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSmbEncryption.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// SMB encryption. + public readonly partial struct ElasticSmbEncryption : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ElasticSmbEncryption(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Value indicating the SMB encryption is enabled. + public static ElasticSmbEncryption Enabled { get; } = new ElasticSmbEncryption(EnabledValue); + /// Value indicating the SMB encryption is disabled. + public static ElasticSmbEncryption Disabled { get; } = new ElasticSmbEncryption(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(ElasticSmbEncryption left, ElasticSmbEncryption right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ElasticSmbEncryption left, ElasticSmbEncryption right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ElasticSmbEncryption(string value) => new ElasticSmbEncryption(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ElasticSmbEncryption other && Equals(other); + /// + public bool Equals(ElasticSmbEncryption other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSmbPatchProperties.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSmbPatchProperties.Serialization.cs new file mode 100644 index 000000000000..978f4485c61a --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSmbPatchProperties.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + internal partial class ElasticSmbPatchProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSmbPatchProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SmbEncryption)) + { + writer.WritePropertyName("smbEncryption"u8); + writer.WriteStringValue(SmbEncryption.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticSmbPatchProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSmbPatchProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticSmbPatchProperties(document.RootElement, options); + } + + internal static ElasticSmbPatchProperties DeserializeElasticSmbPatchProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ElasticSmbEncryption? smbEncryption = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("smbEncryption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + smbEncryption = new ElasticSmbEncryption(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticSmbPatchProperties(smbEncryption, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticSmbPatchProperties)} does not support writing '{options.Format}' format."); + } + } + + ElasticSmbPatchProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticSmbPatchProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticSmbPatchProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSmbPatchProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSmbPatchProperties.cs new file mode 100644 index 000000000000..7555bd487b5b --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSmbPatchProperties.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// SMB Patch Properties. + internal partial class ElasticSmbPatchProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticSmbPatchProperties() + { + } + + /// Initializes a new instance of . + /// 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. + /// Keeps track of any properties unknown to the library. + internal ElasticSmbPatchProperties(ElasticSmbEncryption? smbEncryption, IDictionary serializedAdditionalRawData) + { + SmbEncryption = smbEncryption; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// 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. + public ElasticSmbEncryption? SmbEncryption { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSmbProperties.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSmbProperties.Serialization.cs new file mode 100644 index 000000000000..8c897fd55858 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSmbProperties.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + internal partial class ElasticSmbProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSmbProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SmbEncryption)) + { + writer.WritePropertyName("smbEncryption"u8); + writer.WriteStringValue(SmbEncryption.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticSmbProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSmbProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticSmbProperties(document.RootElement, options); + } + + internal static ElasticSmbProperties DeserializeElasticSmbProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ElasticSmbEncryption? smbEncryption = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("smbEncryption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + smbEncryption = new ElasticSmbEncryption(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticSmbProperties(smbEncryption, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticSmbProperties)} does not support writing '{options.Format}' format."); + } + } + + ElasticSmbProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticSmbProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticSmbProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSmbProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSmbProperties.cs new file mode 100644 index 000000000000..f894722acd14 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSmbProperties.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// SMB Properties. + internal partial class ElasticSmbProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticSmbProperties() + { + } + + /// Initializes a new instance of . + /// 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. + /// Keeps track of any properties unknown to the library. + internal ElasticSmbProperties(ElasticSmbEncryption? smbEncryption, IDictionary serializedAdditionalRawData) + { + SmbEncryption = smbEncryption; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// 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. + public ElasticSmbEncryption? SmbEncryption { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotListResult.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotListResult.Serialization.cs new file mode 100644 index 000000000000..2dbe33285d08 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + internal partial class ElasticSnapshotListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSnapshotListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticSnapshotListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSnapshotListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticSnapshotListResult(document.RootElement, options); + } + + internal static ElasticSnapshotListResult DeserializeElasticSnapshotListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ElasticSnapshotData.DeserializeElasticSnapshotData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticSnapshotListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticSnapshotListResult)} does not support writing '{options.Format}' format."); + } + } + + ElasticSnapshotListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticSnapshotListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticSnapshotListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotListResult.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotListResult.cs new file mode 100644 index 000000000000..d01f992b9957 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The response of a ElasticSnapshot list operation. + internal partial class ElasticSnapshotListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The ElasticSnapshot items on this page. + /// is null. + internal ElasticSnapshotListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The ElasticSnapshot items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ElasticSnapshotListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ElasticSnapshotListResult() + { + } + + /// The ElasticSnapshot items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyDailySchedule.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyDailySchedule.Serialization.cs new file mode 100644 index 000000000000..960b674f744a --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyDailySchedule.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticSnapshotPolicyDailySchedule : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyDailySchedule)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SnapshotsToKeep)) + { + writer.WritePropertyName("snapshotsToKeep"u8); + writer.WriteNumberValue(SnapshotsToKeep.Value); + } + if (Optional.IsDefined(Hour)) + { + writer.WritePropertyName("hour"u8); + writer.WriteNumberValue(Hour.Value); + } + if (Optional.IsDefined(Minute)) + { + writer.WritePropertyName("minute"u8); + writer.WriteNumberValue(Minute.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticSnapshotPolicyDailySchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyDailySchedule)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticSnapshotPolicyDailySchedule(document.RootElement, options); + } + + internal static ElasticSnapshotPolicyDailySchedule DeserializeElasticSnapshotPolicyDailySchedule(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? snapshotsToKeep = default; + int? hour = default; + int? minute = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("snapshotsToKeep"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + snapshotsToKeep = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("hour"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hour = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("minute"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + minute = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticSnapshotPolicyDailySchedule(snapshotsToKeep, hour, minute, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyDailySchedule)} does not support writing '{options.Format}' format."); + } + } + + ElasticSnapshotPolicyDailySchedule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticSnapshotPolicyDailySchedule(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyDailySchedule)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyDailySchedule.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyDailySchedule.cs new file mode 100644 index 000000000000..33cc1db0db3f --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyDailySchedule.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Daily Schedule properties used to create NetApp snapshot policy. + public partial class ElasticSnapshotPolicyDailySchedule + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticSnapshotPolicyDailySchedule() + { + } + + /// Initializes a new instance of . + /// Daily snapshot count to keep. + /// Indicates which hour in UTC timezone a snapshot should be taken. + /// Indicates which minute snapshot should be taken. + /// Keeps track of any properties unknown to the library. + internal ElasticSnapshotPolicyDailySchedule(int? snapshotsToKeep, int? hour, int? minute, IDictionary serializedAdditionalRawData) + { + SnapshotsToKeep = snapshotsToKeep; + Hour = hour; + Minute = minute; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Daily snapshot count to keep. + public int? SnapshotsToKeep { get; set; } + /// Indicates which hour in UTC timezone a snapshot should be taken. + public int? Hour { get; set; } + /// Indicates which minute snapshot should be taken. + public int? Minute { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyHourlySchedule.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyHourlySchedule.Serialization.cs new file mode 100644 index 000000000000..1c6b55ff6601 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyHourlySchedule.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticSnapshotPolicyHourlySchedule : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyHourlySchedule)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SnapshotsToKeep)) + { + writer.WritePropertyName("snapshotsToKeep"u8); + writer.WriteNumberValue(SnapshotsToKeep.Value); + } + if (Optional.IsDefined(Minute)) + { + writer.WritePropertyName("minute"u8); + writer.WriteNumberValue(Minute.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticSnapshotPolicyHourlySchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyHourlySchedule)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticSnapshotPolicyHourlySchedule(document.RootElement, options); + } + + internal static ElasticSnapshotPolicyHourlySchedule DeserializeElasticSnapshotPolicyHourlySchedule(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? snapshotsToKeep = default; + int? minute = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("snapshotsToKeep"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + snapshotsToKeep = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("minute"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + minute = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticSnapshotPolicyHourlySchedule(snapshotsToKeep, minute, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyHourlySchedule)} does not support writing '{options.Format}' format."); + } + } + + ElasticSnapshotPolicyHourlySchedule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticSnapshotPolicyHourlySchedule(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyHourlySchedule)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyHourlySchedule.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyHourlySchedule.cs new file mode 100644 index 000000000000..0c48eac69fbb --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyHourlySchedule.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Hourly Schedule properties used to create NetApp snapshot policy. + public partial class ElasticSnapshotPolicyHourlySchedule + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticSnapshotPolicyHourlySchedule() + { + } + + /// Initializes a new instance of . + /// Hourly snapshot count to keep. + /// Indicates which minute snapshot should be taken. + /// Keeps track of any properties unknown to the library. + internal ElasticSnapshotPolicyHourlySchedule(int? snapshotsToKeep, int? minute, IDictionary serializedAdditionalRawData) + { + SnapshotsToKeep = snapshotsToKeep; + Minute = minute; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Hourly snapshot count to keep. + public int? SnapshotsToKeep { get; set; } + /// Indicates which minute snapshot should be taken. + public int? Minute { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyListResult.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyListResult.Serialization.cs new file mode 100644 index 000000000000..087b455bcd31 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + internal partial class ElasticSnapshotPolicyListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticSnapshotPolicyListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticSnapshotPolicyListResult(document.RootElement, options); + } + + internal static ElasticSnapshotPolicyListResult DeserializeElasticSnapshotPolicyListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ElasticSnapshotPolicyData.DeserializeElasticSnapshotPolicyData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticSnapshotPolicyListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyListResult)} does not support writing '{options.Format}' format."); + } + } + + ElasticSnapshotPolicyListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticSnapshotPolicyListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyListResult.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyListResult.cs new file mode 100644 index 000000000000..966199cd833b --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The response of a ElasticSnapshotPolicy list operation. + internal partial class ElasticSnapshotPolicyListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The ElasticSnapshotPolicy items on this page. + /// is null. + internal ElasticSnapshotPolicyListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The ElasticSnapshotPolicy items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ElasticSnapshotPolicyListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ElasticSnapshotPolicyListResult() + { + } + + /// The ElasticSnapshotPolicy items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyMonthlySchedule.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyMonthlySchedule.Serialization.cs new file mode 100644 index 000000000000..4dd43f005eaf --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyMonthlySchedule.Serialization.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticSnapshotPolicyMonthlySchedule : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyMonthlySchedule)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SnapshotsToKeep)) + { + writer.WritePropertyName("snapshotsToKeep"u8); + writer.WriteNumberValue(SnapshotsToKeep.Value); + } + if (Optional.IsCollectionDefined(DaysOfMonth)) + { + writer.WritePropertyName("daysOfMonth"u8); + writer.WriteStartArray(); + foreach (var item in DaysOfMonth) + { + writer.WriteNumberValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Hour)) + { + writer.WritePropertyName("hour"u8); + writer.WriteNumberValue(Hour.Value); + } + if (Optional.IsDefined(Minute)) + { + writer.WritePropertyName("minute"u8); + writer.WriteNumberValue(Minute.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticSnapshotPolicyMonthlySchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyMonthlySchedule)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticSnapshotPolicyMonthlySchedule(document.RootElement, options); + } + + internal static ElasticSnapshotPolicyMonthlySchedule DeserializeElasticSnapshotPolicyMonthlySchedule(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? snapshotsToKeep = default; + IList daysOfMonth = default; + int? hour = default; + int? minute = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("snapshotsToKeep"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + snapshotsToKeep = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("daysOfMonth"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetInt32()); + } + daysOfMonth = array; + continue; + } + if (property.NameEquals("hour"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hour = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("minute"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + minute = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticSnapshotPolicyMonthlySchedule(snapshotsToKeep, daysOfMonth ?? new ChangeTrackingList(), hour, minute, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyMonthlySchedule)} does not support writing '{options.Format}' format."); + } + } + + ElasticSnapshotPolicyMonthlySchedule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticSnapshotPolicyMonthlySchedule(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyMonthlySchedule)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyMonthlySchedule.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyMonthlySchedule.cs new file mode 100644 index 000000000000..aae2cc5f6632 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyMonthlySchedule.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Monthly Schedule properties used to create NetApp snapshot policy. + public partial class ElasticSnapshotPolicyMonthlySchedule + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticSnapshotPolicyMonthlySchedule() + { + DaysOfMonth = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Monthly snapshot count to keep. + /// Indicates which days of the month snapshot (1-31) should be taken, accepts a list of integers. + /// Indicates which hour in UTC timezone a snapshot should be taken. + /// Indicates which minute snapshot should be taken. + /// Keeps track of any properties unknown to the library. + internal ElasticSnapshotPolicyMonthlySchedule(int? snapshotsToKeep, IList daysOfMonth, int? hour, int? minute, IDictionary serializedAdditionalRawData) + { + SnapshotsToKeep = snapshotsToKeep; + DaysOfMonth = daysOfMonth; + Hour = hour; + Minute = minute; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Monthly snapshot count to keep. + public int? SnapshotsToKeep { get; set; } + /// Indicates which days of the month snapshot (1-31) should be taken, accepts a list of integers. + public IList DaysOfMonth { get; } + /// Indicates which hour in UTC timezone a snapshot should be taken. + public int? Hour { get; set; } + /// Indicates which minute snapshot should be taken. + public int? Minute { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyPatch.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyPatch.Serialization.cs new file mode 100644 index 000000000000..4ebbec5168c9 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyPatch.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticSnapshotPolicyPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyPatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticSnapshotPolicyPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticSnapshotPolicyPatch(document.RootElement, options); + } + + internal static ElasticSnapshotPolicyPatch DeserializeElasticSnapshotPolicyPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + ElasticSnapshotPolicyUpdateProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ElasticSnapshotPolicyUpdateProperties.DeserializeElasticSnapshotPolicyUpdateProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticSnapshotPolicyPatch(tags ?? new ChangeTrackingDictionary(), properties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyPatch)} does not support writing '{options.Format}' format."); + } + } + + ElasticSnapshotPolicyPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticSnapshotPolicyPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyPatch.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyPatch.cs new file mode 100644 index 000000000000..684e624e1df8 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyPatch.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The type used for update operations of the ElasticSnapshotPolicy. + public partial class ElasticSnapshotPolicyPatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticSnapshotPolicyPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Resource tags. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal ElasticSnapshotPolicyPatch(IDictionary tags, ElasticSnapshotPolicyUpdateProperties properties, IDictionary serializedAdditionalRawData) + { + Tags = tags; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource tags. + public IDictionary Tags { get; } + /// The resource-specific properties for this resource. + public ElasticSnapshotPolicyUpdateProperties Properties { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyProperties.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyProperties.Serialization.cs new file mode 100644 index 000000000000..501c19399b03 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyProperties.Serialization.cs @@ -0,0 +1,215 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticSnapshotPolicyProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(HourlySchedule)) + { + writer.WritePropertyName("hourlySchedule"u8); + writer.WriteObjectValue(HourlySchedule, options); + } + if (Optional.IsDefined(DailySchedule)) + { + writer.WritePropertyName("dailySchedule"u8); + writer.WriteObjectValue(DailySchedule, options); + } + if (Optional.IsDefined(WeeklySchedule)) + { + writer.WritePropertyName("weeklySchedule"u8); + writer.WriteObjectValue(WeeklySchedule, options); + } + if (Optional.IsDefined(MonthlySchedule)) + { + writer.WritePropertyName("monthlySchedule"u8); + writer.WriteObjectValue(MonthlySchedule, options); + } + if (Optional.IsDefined(PolicyStatus)) + { + writer.WritePropertyName("policyStatus"u8); + writer.WriteStringValue(PolicyStatus.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToSerialString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticSnapshotPolicyProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticSnapshotPolicyProperties(document.RootElement, options); + } + + internal static ElasticSnapshotPolicyProperties DeserializeElasticSnapshotPolicyProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ElasticSnapshotPolicyHourlySchedule hourlySchedule = default; + ElasticSnapshotPolicyDailySchedule dailySchedule = default; + ElasticSnapshotPolicyWeeklySchedule weeklySchedule = default; + ElasticSnapshotPolicyMonthlySchedule monthlySchedule = default; + PolicyStatus? policyStatus = default; + NetAppProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("hourlySchedule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hourlySchedule = ElasticSnapshotPolicyHourlySchedule.DeserializeElasticSnapshotPolicyHourlySchedule(property.Value, options); + continue; + } + if (property.NameEquals("dailySchedule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dailySchedule = ElasticSnapshotPolicyDailySchedule.DeserializeElasticSnapshotPolicyDailySchedule(property.Value, options); + continue; + } + if (property.NameEquals("weeklySchedule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + weeklySchedule = ElasticSnapshotPolicyWeeklySchedule.DeserializeElasticSnapshotPolicyWeeklySchedule(property.Value, options); + continue; + } + if (property.NameEquals("monthlySchedule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + monthlySchedule = ElasticSnapshotPolicyMonthlySchedule.DeserializeElasticSnapshotPolicyMonthlySchedule(property.Value, options); + continue; + } + if (property.NameEquals("policyStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policyStatus = new PolicyStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = property.Value.GetString().ToNetAppProvisioningState(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticSnapshotPolicyProperties( + hourlySchedule, + dailySchedule, + weeklySchedule, + monthlySchedule, + policyStatus, + provisioningState, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyProperties)} does not support writing '{options.Format}' format."); + } + } + + ElasticSnapshotPolicyProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticSnapshotPolicyProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyProperties.cs new file mode 100644 index 000000000000..e7462cd2505c --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyProperties.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Elastic Snapshot policy properties. + public partial class ElasticSnapshotPolicyProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticSnapshotPolicyProperties() + { + } + + /// Initializes a new instance of . + /// Schedule for hourly snapshots. + /// Schedule for daily snapshots. + /// Schedule for weekly snapshots. + /// Schedule for monthly snapshots. + /// Configures if the snapshot policy is enabled on the volumes connected to the policy. + /// Azure lifecycle management. + /// Keeps track of any properties unknown to the library. + internal ElasticSnapshotPolicyProperties(ElasticSnapshotPolicyHourlySchedule hourlySchedule, ElasticSnapshotPolicyDailySchedule dailySchedule, ElasticSnapshotPolicyWeeklySchedule weeklySchedule, ElasticSnapshotPolicyMonthlySchedule monthlySchedule, PolicyStatus? policyStatus, NetAppProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + HourlySchedule = hourlySchedule; + DailySchedule = dailySchedule; + WeeklySchedule = weeklySchedule; + MonthlySchedule = monthlySchedule; + PolicyStatus = policyStatus; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Schedule for hourly snapshots. + public ElasticSnapshotPolicyHourlySchedule HourlySchedule { get; set; } + /// Schedule for daily snapshots. + public ElasticSnapshotPolicyDailySchedule DailySchedule { get; set; } + /// Schedule for weekly snapshots. + public ElasticSnapshotPolicyWeeklySchedule WeeklySchedule { get; set; } + /// Schedule for monthly snapshots. + public ElasticSnapshotPolicyMonthlySchedule MonthlySchedule { get; set; } + /// Configures if the snapshot policy is enabled on the volumes connected to the policy. + public PolicyStatus? PolicyStatus { get; set; } + /// Azure lifecycle management. + public NetAppProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyUpdateProperties.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyUpdateProperties.Serialization.cs new file mode 100644 index 000000000000..58cc1b91e8eb --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyUpdateProperties.Serialization.cs @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticSnapshotPolicyUpdateProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyUpdateProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(HourlySchedule)) + { + writer.WritePropertyName("hourlySchedule"u8); + writer.WriteObjectValue(HourlySchedule, options); + } + if (Optional.IsDefined(DailySchedule)) + { + writer.WritePropertyName("dailySchedule"u8); + writer.WriteObjectValue(DailySchedule, options); + } + if (Optional.IsDefined(WeeklySchedule)) + { + writer.WritePropertyName("weeklySchedule"u8); + writer.WriteObjectValue(WeeklySchedule, options); + } + if (Optional.IsDefined(MonthlySchedule)) + { + writer.WritePropertyName("monthlySchedule"u8); + writer.WriteObjectValue(MonthlySchedule, options); + } + if (Optional.IsDefined(PolicyStatus)) + { + writer.WritePropertyName("policyStatus"u8); + writer.WriteStringValue(PolicyStatus.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticSnapshotPolicyUpdateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticSnapshotPolicyUpdateProperties(document.RootElement, options); + } + + internal static ElasticSnapshotPolicyUpdateProperties DeserializeElasticSnapshotPolicyUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ElasticSnapshotPolicyHourlySchedule hourlySchedule = default; + ElasticSnapshotPolicyDailySchedule dailySchedule = default; + ElasticSnapshotPolicyWeeklySchedule weeklySchedule = default; + ElasticSnapshotPolicyMonthlySchedule monthlySchedule = default; + PolicyStatus? policyStatus = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("hourlySchedule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hourlySchedule = ElasticSnapshotPolicyHourlySchedule.DeserializeElasticSnapshotPolicyHourlySchedule(property.Value, options); + continue; + } + if (property.NameEquals("dailySchedule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dailySchedule = ElasticSnapshotPolicyDailySchedule.DeserializeElasticSnapshotPolicyDailySchedule(property.Value, options); + continue; + } + if (property.NameEquals("weeklySchedule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + weeklySchedule = ElasticSnapshotPolicyWeeklySchedule.DeserializeElasticSnapshotPolicyWeeklySchedule(property.Value, options); + continue; + } + if (property.NameEquals("monthlySchedule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + monthlySchedule = ElasticSnapshotPolicyMonthlySchedule.DeserializeElasticSnapshotPolicyMonthlySchedule(property.Value, options); + continue; + } + if (property.NameEquals("policyStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policyStatus = new PolicyStatus(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticSnapshotPolicyUpdateProperties( + hourlySchedule, + dailySchedule, + weeklySchedule, + monthlySchedule, + policyStatus, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + ElasticSnapshotPolicyUpdateProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticSnapshotPolicyUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyUpdateProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyUpdateProperties.cs new file mode 100644 index 000000000000..c00e871ff2a8 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyUpdateProperties.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The updatable properties of the ElasticSnapshotPolicy. + public partial class ElasticSnapshotPolicyUpdateProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticSnapshotPolicyUpdateProperties() + { + } + + /// Initializes a new instance of . + /// Schedule for hourly snapshots. + /// Schedule for daily snapshots. + /// Schedule for weekly snapshots. + /// Schedule for monthly snapshots. + /// Configures if the snapshot policy is enabled on the volumes connected to the policy. + /// Keeps track of any properties unknown to the library. + internal ElasticSnapshotPolicyUpdateProperties(ElasticSnapshotPolicyHourlySchedule hourlySchedule, ElasticSnapshotPolicyDailySchedule dailySchedule, ElasticSnapshotPolicyWeeklySchedule weeklySchedule, ElasticSnapshotPolicyMonthlySchedule monthlySchedule, PolicyStatus? policyStatus, IDictionary serializedAdditionalRawData) + { + HourlySchedule = hourlySchedule; + DailySchedule = dailySchedule; + WeeklySchedule = weeklySchedule; + MonthlySchedule = monthlySchedule; + PolicyStatus = policyStatus; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Schedule for hourly snapshots. + public ElasticSnapshotPolicyHourlySchedule HourlySchedule { get; set; } + /// Schedule for daily snapshots. + public ElasticSnapshotPolicyDailySchedule DailySchedule { get; set; } + /// Schedule for weekly snapshots. + public ElasticSnapshotPolicyWeeklySchedule WeeklySchedule { get; set; } + /// Schedule for monthly snapshots. + public ElasticSnapshotPolicyMonthlySchedule MonthlySchedule { get; set; } + /// Configures if the snapshot policy is enabled on the volumes connected to the policy. + public PolicyStatus? PolicyStatus { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyVolumeList.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyVolumeList.Serialization.cs new file mode 100644 index 000000000000..b860ee897bb5 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyVolumeList.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + internal partial class ElasticSnapshotPolicyVolumeList : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyVolumeList)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticSnapshotPolicyVolumeList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyVolumeList)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticSnapshotPolicyVolumeList(document.RootElement, options); + } + + internal static ElasticSnapshotPolicyVolumeList DeserializeElasticSnapshotPolicyVolumeList(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ElasticVolumeData.DeserializeElasticVolumeData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticSnapshotPolicyVolumeList(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyVolumeList)} does not support writing '{options.Format}' format."); + } + } + + ElasticSnapshotPolicyVolumeList IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticSnapshotPolicyVolumeList(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyVolumeList)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyVolumeList.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyVolumeList.cs new file mode 100644 index 000000000000..e75e82cc8312 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyVolumeList.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Elastic Volumes associated with Elastic Snapshot Policy. + internal partial class ElasticSnapshotPolicyVolumeList + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The ElasticVolume items on this page. + /// is null. + internal ElasticSnapshotPolicyVolumeList(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The ElasticVolume items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ElasticSnapshotPolicyVolumeList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ElasticSnapshotPolicyVolumeList() + { + } + + /// The ElasticVolume items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyWeeklySchedule.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyWeeklySchedule.Serialization.cs new file mode 100644 index 000000000000..075b4d177b9e --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyWeeklySchedule.Serialization.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticSnapshotPolicyWeeklySchedule : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyWeeklySchedule)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SnapshotsToKeep)) + { + writer.WritePropertyName("snapshotsToKeep"u8); + writer.WriteNumberValue(SnapshotsToKeep.Value); + } + if (Optional.IsCollectionDefined(Days)) + { + writer.WritePropertyName("days"u8); + writer.WriteStartArray(); + foreach (var item in Days) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Hour)) + { + writer.WritePropertyName("hour"u8); + writer.WriteNumberValue(Hour.Value); + } + if (Optional.IsDefined(Minute)) + { + writer.WritePropertyName("minute"u8); + writer.WriteNumberValue(Minute.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticSnapshotPolicyWeeklySchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyWeeklySchedule)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticSnapshotPolicyWeeklySchedule(document.RootElement, options); + } + + internal static ElasticSnapshotPolicyWeeklySchedule DeserializeElasticSnapshotPolicyWeeklySchedule(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? snapshotsToKeep = default; + IList days = default; + int? hour = default; + int? minute = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("snapshotsToKeep"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + snapshotsToKeep = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("days"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new DayOfWeek(item.GetString())); + } + days = array; + continue; + } + if (property.NameEquals("hour"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hour = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("minute"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + minute = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticSnapshotPolicyWeeklySchedule(snapshotsToKeep, days ?? new ChangeTrackingList(), hour, minute, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyWeeklySchedule)} does not support writing '{options.Format}' format."); + } + } + + ElasticSnapshotPolicyWeeklySchedule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticSnapshotPolicyWeeklySchedule(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticSnapshotPolicyWeeklySchedule)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyWeeklySchedule.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyWeeklySchedule.cs new file mode 100644 index 000000000000..fb59f2e5ba03 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotPolicyWeeklySchedule.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Weekly Schedule properties used to create NetApp snapshot policy. + public partial class ElasticSnapshotPolicyWeeklySchedule + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticSnapshotPolicyWeeklySchedule() + { + Days = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Weekly snapshot count to keep. + /// Indicates which weekday(s) snapshot(s) should be taken, accepts a list of week day names in english. + /// Indicates which hour in UTC timezone a snapshot should be taken. + /// Indicates which minute snapshot should be taken. + /// Keeps track of any properties unknown to the library. + internal ElasticSnapshotPolicyWeeklySchedule(int? snapshotsToKeep, IList days, int? hour, int? minute, IDictionary serializedAdditionalRawData) + { + SnapshotsToKeep = snapshotsToKeep; + Days = days; + Hour = hour; + Minute = minute; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Weekly snapshot count to keep. + public int? SnapshotsToKeep { get; set; } + /// Indicates which weekday(s) snapshot(s) should be taken, accepts a list of week day names in english. + public IList Days { get; } + /// Indicates which hour in UTC timezone a snapshot should be taken. + public int? Hour { get; set; } + /// Indicates which minute snapshot should be taken. + public int? Minute { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotProperties.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotProperties.Serialization.cs new file mode 100644 index 000000000000..0d2bf3945b9b --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotProperties.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + internal partial class ElasticSnapshotProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSnapshotProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToSerialString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticSnapshotProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticSnapshotProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticSnapshotProperties(document.RootElement, options); + } + + internal static ElasticSnapshotProperties DeserializeElasticSnapshotProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NetAppProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = property.Value.GetString().ToNetAppProvisioningState(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticSnapshotProperties(provisioningState, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticSnapshotProperties)} does not support writing '{options.Format}' format."); + } + } + + ElasticSnapshotProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticSnapshotProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticSnapshotProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotProperties.cs new file mode 100644 index 000000000000..9006ad4a4200 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticSnapshotProperties.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Elastic Snapshot properties. + internal partial class ElasticSnapshotProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticSnapshotProperties() + { + } + + /// Initializes a new instance of . + /// Azure lifecycle management. + /// Keeps track of any properties unknown to the library. + internal ElasticSnapshotProperties(NetAppProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Azure lifecycle management. + public NetAppProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticUnixAccessRule.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticUnixAccessRule.cs new file mode 100644 index 000000000000..a91ced341f5c --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticUnixAccessRule.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// 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. + public readonly partial struct ElasticUnixAccessRule : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ElasticUnixAccessRule(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ReadOnlyValue = "ReadOnly"; + private const string ReadWriteValue = "ReadWrite"; + private const string NoAccessValue = "NoAccess"; + + /// Clients connecting with this rule will only have read access to the volume. + public static ElasticUnixAccessRule ReadOnly { get; } = new ElasticUnixAccessRule(ReadOnlyValue); + /// Clients connecting with this rule will have full read and write access to the volume. + public static ElasticUnixAccessRule ReadWrite { get; } = new ElasticUnixAccessRule(ReadWriteValue); + /// Clients connecting with this rule will have no access to the volume. + public static ElasticUnixAccessRule NoAccess { get; } = new ElasticUnixAccessRule(NoAccessValue); + /// Determines if two values are the same. + public static bool operator ==(ElasticUnixAccessRule left, ElasticUnixAccessRule right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ElasticUnixAccessRule left, ElasticUnixAccessRule right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ElasticUnixAccessRule(string value) => new ElasticUnixAccessRule(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ElasticUnixAccessRule other && Equals(other); + /// + public bool Equals(ElasticUnixAccessRule other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeBackupProperties.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeBackupProperties.Serialization.cs new file mode 100644 index 000000000000..0041b92977fa --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeBackupProperties.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticVolumeBackupProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticVolumeBackupProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ElasticBackupPolicyResourceId)) + { + writer.WritePropertyName("elasticBackupPolicyResourceId"u8); + writer.WriteStringValue(ElasticBackupPolicyResourceId); + } + if (Optional.IsDefined(PolicyEnforcement)) + { + writer.WritePropertyName("policyEnforcement"u8); + writer.WriteStringValue(PolicyEnforcement.Value.ToString()); + } + if (Optional.IsDefined(ElasticBackupVaultResourceId)) + { + writer.WritePropertyName("elasticBackupVaultResourceId"u8); + writer.WriteStringValue(ElasticBackupVaultResourceId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticVolumeBackupProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticVolumeBackupProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticVolumeBackupProperties(document.RootElement, options); + } + + internal static ElasticVolumeBackupProperties DeserializeElasticVolumeBackupProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier elasticBackupPolicyResourceId = default; + ElasticVolumePolicyEnforcement? policyEnforcement = default; + ResourceIdentifier elasticBackupVaultResourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("elasticBackupPolicyResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + elasticBackupPolicyResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("policyEnforcement"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policyEnforcement = new ElasticVolumePolicyEnforcement(property.Value.GetString()); + continue; + } + if (property.NameEquals("elasticBackupVaultResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + elasticBackupVaultResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticVolumeBackupProperties(elasticBackupPolicyResourceId, policyEnforcement, elasticBackupVaultResourceId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticVolumeBackupProperties)} does not support writing '{options.Format}' format."); + } + } + + ElasticVolumeBackupProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticVolumeBackupProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticVolumeBackupProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeBackupProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeBackupProperties.cs new file mode 100644 index 000000000000..f81a360efb03 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeBackupProperties.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Elastic Volume Backup Properties. + public partial class ElasticVolumeBackupProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticVolumeBackupProperties() + { + } + + /// Initializes a new instance of . + /// ResourceId used to identify Elastic Backup Policy. + /// The property to decide policy is enforced or not on the volume. + /// ResourceId used to identify Elastic Backup Vault. + /// Keeps track of any properties unknown to the library. + internal ElasticVolumeBackupProperties(ResourceIdentifier elasticBackupPolicyResourceId, ElasticVolumePolicyEnforcement? policyEnforcement, ResourceIdentifier elasticBackupVaultResourceId, IDictionary serializedAdditionalRawData) + { + ElasticBackupPolicyResourceId = elasticBackupPolicyResourceId; + PolicyEnforcement = policyEnforcement; + ElasticBackupVaultResourceId = elasticBackupVaultResourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// ResourceId used to identify Elastic Backup Policy. + public ResourceIdentifier ElasticBackupPolicyResourceId { get; set; } + /// The property to decide policy is enforced or not on the volume. + public ElasticVolumePolicyEnforcement? PolicyEnforcement { get; set; } + /// ResourceId used to identify Elastic Backup Vault. + public ResourceIdentifier ElasticBackupVaultResourceId { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeDataProtectionPatchProperties.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeDataProtectionPatchProperties.Serialization.cs new file mode 100644 index 000000000000..1a705d8f05fb --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeDataProtectionPatchProperties.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticVolumeDataProtectionPatchProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticVolumeDataProtectionPatchProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Snapshot)) + { + writer.WritePropertyName("snapshot"u8); + writer.WriteObjectValue(Snapshot, options); + } + if (Optional.IsDefined(Backup)) + { + writer.WritePropertyName("backup"u8); + writer.WriteObjectValue(Backup, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticVolumeDataProtectionPatchProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticVolumeDataProtectionPatchProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticVolumeDataProtectionPatchProperties(document.RootElement, options); + } + + internal static ElasticVolumeDataProtectionPatchProperties DeserializeElasticVolumeDataProtectionPatchProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ElasticVolumeSnapshotProperties snapshot = default; + ElasticVolumeBackupProperties backup = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("snapshot"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + snapshot = ElasticVolumeSnapshotProperties.DeserializeElasticVolumeSnapshotProperties(property.Value, options); + continue; + } + if (property.NameEquals("backup"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + backup = ElasticVolumeBackupProperties.DeserializeElasticVolumeBackupProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticVolumeDataProtectionPatchProperties(snapshot, backup, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticVolumeDataProtectionPatchProperties)} does not support writing '{options.Format}' format."); + } + } + + ElasticVolumeDataProtectionPatchProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticVolumeDataProtectionPatchProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticVolumeDataProtectionPatchProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeDataProtectionPatchProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeDataProtectionPatchProperties.cs new file mode 100644 index 000000000000..34507daace26 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeDataProtectionPatchProperties.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Data protection configuration option for updating the volume, including snapshot policies and backup. + public partial class ElasticVolumeDataProtectionPatchProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticVolumeDataProtectionPatchProperties() + { + } + + /// Initializes a new instance of . + /// Used to apply a snapshot policy to a volume. + /// Used to configure backups on an elastic volume. + /// Keeps track of any properties unknown to the library. + internal ElasticVolumeDataProtectionPatchProperties(ElasticVolumeSnapshotProperties snapshot, ElasticVolumeBackupProperties backup, IDictionary serializedAdditionalRawData) + { + Snapshot = snapshot; + Backup = backup; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Used to apply a snapshot policy to a volume. + internal ElasticVolumeSnapshotProperties Snapshot { get; set; } + /// Snapshot Policy ResourceId. + public ResourceIdentifier SnapshotPolicyResourceId + { + get => Snapshot is null ? default : Snapshot.SnapshotPolicyResourceId; + set + { + if (Snapshot is null) + Snapshot = new ElasticVolumeSnapshotProperties(); + Snapshot.SnapshotPolicyResourceId = value; + } + } + + /// Used to configure backups on an elastic volume. + public ElasticVolumeBackupProperties Backup { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeDataProtectionProperties.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeDataProtectionProperties.Serialization.cs new file mode 100644 index 000000000000..e78347a7121b --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeDataProtectionProperties.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticVolumeDataProtectionProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticVolumeDataProtectionProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Snapshot)) + { + writer.WritePropertyName("snapshot"u8); + writer.WriteObjectValue(Snapshot, options); + } + if (Optional.IsDefined(Backup)) + { + writer.WritePropertyName("backup"u8); + writer.WriteObjectValue(Backup, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticVolumeDataProtectionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticVolumeDataProtectionProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticVolumeDataProtectionProperties(document.RootElement, options); + } + + internal static ElasticVolumeDataProtectionProperties DeserializeElasticVolumeDataProtectionProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ElasticVolumeSnapshotProperties snapshot = default; + ElasticVolumeBackupProperties backup = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("snapshot"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + snapshot = ElasticVolumeSnapshotProperties.DeserializeElasticVolumeSnapshotProperties(property.Value, options); + continue; + } + if (property.NameEquals("backup"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + backup = ElasticVolumeBackupProperties.DeserializeElasticVolumeBackupProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticVolumeDataProtectionProperties(snapshot, backup, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticVolumeDataProtectionProperties)} does not support writing '{options.Format}' format."); + } + } + + ElasticVolumeDataProtectionProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticVolumeDataProtectionProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticVolumeDataProtectionProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeDataProtectionProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeDataProtectionProperties.cs new file mode 100644 index 000000000000..aaaca50d47d0 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeDataProtectionProperties.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Data protection configuration option for the volume, including snapshot policies and backup. + public partial class ElasticVolumeDataProtectionProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticVolumeDataProtectionProperties() + { + } + + /// Initializes a new instance of . + /// Used to apply a snapshot policy to a volume. + /// Used to configure backups on an elastic volume. + /// Keeps track of any properties unknown to the library. + internal ElasticVolumeDataProtectionProperties(ElasticVolumeSnapshotProperties snapshot, ElasticVolumeBackupProperties backup, IDictionary serializedAdditionalRawData) + { + Snapshot = snapshot; + Backup = backup; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Used to apply a snapshot policy to a volume. + internal ElasticVolumeSnapshotProperties Snapshot { get; set; } + /// Snapshot Policy ResourceId. + public ResourceIdentifier SnapshotPolicyResourceId + { + get => Snapshot is null ? default : Snapshot.SnapshotPolicyResourceId; + set + { + if (Snapshot is null) + Snapshot = new ElasticVolumeSnapshotProperties(); + Snapshot.SnapshotPolicyResourceId = value; + } + } + + /// Used to configure backups on an elastic volume. + public ElasticVolumeBackupProperties Backup { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeListResult.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeListResult.Serialization.cs new file mode 100644 index 000000000000..7a5efe749fdd --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + internal partial class ElasticVolumeListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticVolumeListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticVolumeListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticVolumeListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticVolumeListResult(document.RootElement, options); + } + + internal static ElasticVolumeListResult DeserializeElasticVolumeListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ElasticVolumeData.DeserializeElasticVolumeData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticVolumeListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticVolumeListResult)} does not support writing '{options.Format}' format."); + } + } + + ElasticVolumeListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticVolumeListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticVolumeListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeListResult.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeListResult.cs new file mode 100644 index 000000000000..a49a1850f115 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The response of a ElasticVolume list operation. + internal partial class ElasticVolumeListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The ElasticVolume items on this page. + /// is null. + internal ElasticVolumeListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The ElasticVolume items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ElasticVolumeListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ElasticVolumeListResult() + { + } + + /// The ElasticVolume items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumePatch.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumePatch.Serialization.cs new file mode 100644 index 000000000000..9dc9c2f93605 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumePatch.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticVolumePatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticVolumePatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticVolumePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticVolumePatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticVolumePatch(document.RootElement, options); + } + + internal static ElasticVolumePatch DeserializeElasticVolumePatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + ElasticVolumeUpdateProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ElasticVolumeUpdateProperties.DeserializeElasticVolumeUpdateProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticVolumePatch(tags ?? new ChangeTrackingDictionary(), properties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticVolumePatch)} does not support writing '{options.Format}' format."); + } + } + + ElasticVolumePatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticVolumePatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticVolumePatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumePatch.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumePatch.cs new file mode 100644 index 000000000000..834b68635944 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumePatch.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The type used for update operations of the ElasticVolume. + public partial class ElasticVolumePatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticVolumePatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Resource tags. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal ElasticVolumePatch(IDictionary tags, ElasticVolumeUpdateProperties properties, IDictionary serializedAdditionalRawData) + { + Tags = tags; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource tags. + public IDictionary Tags { get; } + /// The resource-specific properties for this resource. + public ElasticVolumeUpdateProperties Properties { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumePolicyEnforcement.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumePolicyEnforcement.cs new file mode 100644 index 000000000000..9ff084bcda51 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumePolicyEnforcement.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Policy enforcement. + public readonly partial struct ElasticVolumePolicyEnforcement : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ElasticVolumePolicyEnforcement(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnforcedValue = "Enforced"; + private const string NotEnforcedValue = "NotEnforced"; + + /// Value indicating the policy is enforced on the volume. + public static ElasticVolumePolicyEnforcement Enforced { get; } = new ElasticVolumePolicyEnforcement(EnforcedValue); + /// Value indicating the policy is not enforced on the volume. + public static ElasticVolumePolicyEnforcement NotEnforced { get; } = new ElasticVolumePolicyEnforcement(NotEnforcedValue); + /// Determines if two values are the same. + public static bool operator ==(ElasticVolumePolicyEnforcement left, ElasticVolumePolicyEnforcement right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ElasticVolumePolicyEnforcement left, ElasticVolumePolicyEnforcement right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ElasticVolumePolicyEnforcement(string value) => new ElasticVolumePolicyEnforcement(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ElasticVolumePolicyEnforcement other && Equals(other); + /// + public bool Equals(ElasticVolumePolicyEnforcement other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeProperties.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeProperties.Serialization.cs new file mode 100644 index 000000000000..c31065a6833b --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeProperties.Serialization.cs @@ -0,0 +1,326 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticVolumeProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticVolumeProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("filePath"u8); + writer.WriteStringValue(FilePath); + writer.WritePropertyName("size"u8); + writer.WriteNumberValue(Size); + if (Optional.IsDefined(ExportPolicy)) + { + writer.WritePropertyName("exportPolicy"u8); + writer.WriteObjectValue(ExportPolicy, options); + } + writer.WritePropertyName("protocolTypes"u8); + writer.WriteStartArray(); + foreach (var item in ProtocolTypes) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToSerialString()); + } + if (options.Format != "W" && Optional.IsDefined(AvailabilityStatus)) + { + writer.WritePropertyName("availabilityStatus"u8); + writer.WriteStringValue(AvailabilityStatus.Value.ToString()); + } + if (Optional.IsDefined(SnapshotResourceId)) + { + writer.WritePropertyName("snapshotResourceId"u8); + writer.WriteStringValue(SnapshotResourceId); + } + if (options.Format != "W" && Optional.IsCollectionDefined(MountTargets)) + { + writer.WritePropertyName("mountTargets"u8); + writer.WriteStartArray(); + foreach (var item in MountTargets) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(DataProtection)) + { + writer.WritePropertyName("dataProtection"u8); + writer.WriteObjectValue(DataProtection, options); + } + if (Optional.IsDefined(SnapshotDirectoryVisibility)) + { + writer.WritePropertyName("snapshotDirectoryVisibility"u8); + writer.WriteStringValue(SnapshotDirectoryVisibility.Value.ToString()); + } + if (Optional.IsDefined(SmbProperties)) + { + writer.WritePropertyName("smbProperties"u8); + writer.WriteObjectValue(SmbProperties, options); + } + if (Optional.IsDefined(BackupResourceId)) + { + writer.WritePropertyName("backupResourceId"u8); + writer.WriteStringValue(BackupResourceId); + } + if (options.Format != "W" && Optional.IsDefined(RestorationState)) + { + writer.WritePropertyName("restorationState"u8); + writer.WriteStringValue(RestorationState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticVolumeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticVolumeProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticVolumeProperties(document.RootElement, options); + } + + internal static ElasticVolumeProperties DeserializeElasticVolumeProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string filePath = default; + long size = default; + ElasticExportPolicy exportPolicy = default; + IList protocolTypes = default; + NetAppProvisioningState? provisioningState = default; + ElasticResourceAvailabilityStatus? availabilityStatus = default; + ResourceIdentifier snapshotResourceId = default; + IReadOnlyList mountTargets = default; + ElasticVolumeDataProtectionProperties dataProtection = default; + SnapshotDirectoryVisibility? snapshotDirectoryVisibility = default; + ElasticSmbProperties smbProperties = default; + ResourceIdentifier backupResourceId = default; + ElasticVolumeRestorationState? restorationState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("filePath"u8)) + { + filePath = property.Value.GetString(); + continue; + } + if (property.NameEquals("size"u8)) + { + size = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("exportPolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + exportPolicy = ElasticExportPolicy.DeserializeElasticExportPolicy(property.Value, options); + continue; + } + if (property.NameEquals("protocolTypes"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new ElasticProtocolType(item.GetString())); + } + protocolTypes = array; + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = property.Value.GetString().ToNetAppProvisioningState(); + continue; + } + if (property.NameEquals("availabilityStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + availabilityStatus = new ElasticResourceAvailabilityStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("snapshotResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + snapshotResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("mountTargets"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ElasticMountTargetProperties.DeserializeElasticMountTargetProperties(item, options)); + } + mountTargets = array; + continue; + } + if (property.NameEquals("dataProtection"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataProtection = ElasticVolumeDataProtectionProperties.DeserializeElasticVolumeDataProtectionProperties(property.Value, options); + continue; + } + if (property.NameEquals("snapshotDirectoryVisibility"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + snapshotDirectoryVisibility = new SnapshotDirectoryVisibility(property.Value.GetString()); + continue; + } + if (property.NameEquals("smbProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + smbProperties = ElasticSmbProperties.DeserializeElasticSmbProperties(property.Value, options); + continue; + } + if (property.NameEquals("backupResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + backupResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("restorationState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + restorationState = new ElasticVolumeRestorationState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticVolumeProperties( + filePath, + size, + exportPolicy, + protocolTypes, + provisioningState, + availabilityStatus, + snapshotResourceId, + mountTargets ?? new ChangeTrackingList(), + dataProtection, + snapshotDirectoryVisibility, + smbProperties, + backupResourceId, + restorationState, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticVolumeProperties)} does not support writing '{options.Format}' format."); + } + } + + ElasticVolumeProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticVolumeProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticVolumeProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeProperties.cs new file mode 100644 index 000000000000..d0cc8a63a918 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeProperties.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Elastic Volume properties. + public partial class ElasticVolumeProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// A unique file path for the volume. Used when creating mount targets. This needs to be unique within the elastic capacity pool. + /// 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. + /// Set of support protocol types for the elastic volume. + /// or is null. + public ElasticVolumeProperties(string filePath, long size, IEnumerable protocolTypes) + { + Argument.AssertNotNull(filePath, nameof(filePath)); + Argument.AssertNotNull(protocolTypes, nameof(protocolTypes)); + + FilePath = filePath; + Size = size; + ProtocolTypes = protocolTypes.ToList(); + MountTargets = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A unique file path for the volume. Used when creating mount targets. This needs to be unique within the elastic capacity pool. + /// 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. + /// Set of export policy rules. + /// Set of support protocol types for the elastic volume. + /// Azure lifecycle management. + /// Current availability status of the resource. + /// Resource identifier used to identify the Elastic Snapshot. + /// List of mount targets that can be used to mount this volume. + /// Data protection configuration option for the volume, including snapshot policies and backup. + /// Controls the visibility of the volume's read-only snapshot directory, which provides access to each of the volume's snapshots. + /// SMB Properties. + /// Resource identifier used to identify the Elastic Backup. + /// The current state of the restoration process. + /// Keeps track of any properties unknown to the library. + internal ElasticVolumeProperties(string filePath, long size, ElasticExportPolicy exportPolicy, IList protocolTypes, NetAppProvisioningState? provisioningState, ElasticResourceAvailabilityStatus? availabilityStatus, ResourceIdentifier snapshotResourceId, IReadOnlyList mountTargets, ElasticVolumeDataProtectionProperties dataProtection, SnapshotDirectoryVisibility? snapshotDirectoryVisibility, ElasticSmbProperties smbProperties, ResourceIdentifier backupResourceId, ElasticVolumeRestorationState? restorationState, IDictionary serializedAdditionalRawData) + { + FilePath = filePath; + Size = size; + ExportPolicy = exportPolicy; + ProtocolTypes = protocolTypes; + ProvisioningState = provisioningState; + AvailabilityStatus = availabilityStatus; + SnapshotResourceId = snapshotResourceId; + MountTargets = mountTargets; + DataProtection = dataProtection; + SnapshotDirectoryVisibility = snapshotDirectoryVisibility; + SmbProperties = smbProperties; + BackupResourceId = backupResourceId; + RestorationState = restorationState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ElasticVolumeProperties() + { + } + + /// A unique file path for the volume. Used when creating mount targets. This needs to be unique within the elastic capacity pool. + public string FilePath { get; set; } + /// 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. + public long Size { get; set; } + /// Set of export policy rules. + internal ElasticExportPolicy ExportPolicy { get; set; } + /// Export policy rule. + public IList ExportRules + { + get + { + if (ExportPolicy is null) + ExportPolicy = new ElasticExportPolicy(); + return ExportPolicy.Rules; + } + } + + /// Set of support protocol types for the elastic volume. + public IList ProtocolTypes { get; } + /// Azure lifecycle management. + public NetAppProvisioningState? ProvisioningState { get; } + /// Current availability status of the resource. + public ElasticResourceAvailabilityStatus? AvailabilityStatus { get; } + /// Resource identifier used to identify the Elastic Snapshot. + public ResourceIdentifier SnapshotResourceId { get; set; } + /// List of mount targets that can be used to mount this volume. + public IReadOnlyList MountTargets { get; } + /// Data protection configuration option for the volume, including snapshot policies and backup. + public ElasticVolumeDataProtectionProperties DataProtection { get; set; } + /// Controls the visibility of the volume's read-only snapshot directory, which provides access to each of the volume's snapshots. + public SnapshotDirectoryVisibility? SnapshotDirectoryVisibility { get; set; } + /// SMB Properties. + internal ElasticSmbProperties SmbProperties { get; set; } + /// 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. + public ElasticSmbEncryption? SmbEncryption + { + get => SmbProperties is null ? default : SmbProperties.SmbEncryption; + set + { + if (SmbProperties is null) + SmbProperties = new ElasticSmbProperties(); + SmbProperties.SmbEncryption = value; + } + } + + /// Resource identifier used to identify the Elastic Backup. + public ResourceIdentifier BackupResourceId { get; set; } + /// The current state of the restoration process. + public ElasticVolumeRestorationState? RestorationState { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeRestorationState.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeRestorationState.cs new file mode 100644 index 000000000000..95434dad5fd5 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeRestorationState.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The current state of the restoration process. + public readonly partial struct ElasticVolumeRestorationState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ElasticVolumeRestorationState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RestoringValue = "Restoring"; + private const string RestoredValue = "Restored"; + private const string FailedValue = "Failed"; + + /// Value indicating that the volume is currently restoring. + public static ElasticVolumeRestorationState Restoring { get; } = new ElasticVolumeRestorationState(RestoringValue); + /// Value indicating that the volume is restored. + public static ElasticVolumeRestorationState Restored { get; } = new ElasticVolumeRestorationState(RestoredValue); + /// Value indicating that the volume restore has failed. + public static ElasticVolumeRestorationState Failed { get; } = new ElasticVolumeRestorationState(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(ElasticVolumeRestorationState left, ElasticVolumeRestorationState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ElasticVolumeRestorationState left, ElasticVolumeRestorationState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ElasticVolumeRestorationState(string value) => new ElasticVolumeRestorationState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ElasticVolumeRestorationState other && Equals(other); + /// + public bool Equals(ElasticVolumeRestorationState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeRevert.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeRevert.Serialization.cs new file mode 100644 index 000000000000..a6097eadff50 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeRevert.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticVolumeRevert : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticVolumeRevert)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SnapshotResourceId)) + { + writer.WritePropertyName("snapshotResourceId"u8); + writer.WriteStringValue(SnapshotResourceId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticVolumeRevert IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticVolumeRevert)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticVolumeRevert(document.RootElement, options); + } + + internal static ElasticVolumeRevert DeserializeElasticVolumeRevert(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier snapshotResourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("snapshotResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + snapshotResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticVolumeRevert(snapshotResourceId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticVolumeRevert)} does not support writing '{options.Format}' format."); + } + } + + ElasticVolumeRevert IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticVolumeRevert(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticVolumeRevert)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeRevert.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeRevert.cs new file mode 100644 index 000000000000..e75e7f0b8aee --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeRevert.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Reverts the elastic volume to the specified snapshot. + public partial class ElasticVolumeRevert + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticVolumeRevert() + { + } + + /// Initializes a new instance of . + /// Resource identifier used to identify the Elastic Snapshot. + /// Keeps track of any properties unknown to the library. + internal ElasticVolumeRevert(ResourceIdentifier snapshotResourceId, IDictionary serializedAdditionalRawData) + { + SnapshotResourceId = snapshotResourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource identifier used to identify the Elastic Snapshot. + public ResourceIdentifier SnapshotResourceId { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeSnapshotProperties.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeSnapshotProperties.Serialization.cs new file mode 100644 index 000000000000..6196c4ba64b2 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeSnapshotProperties.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + internal partial class ElasticVolumeSnapshotProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticVolumeSnapshotProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SnapshotPolicyResourceId)) + { + writer.WritePropertyName("snapshotPolicyResourceId"u8); + writer.WriteStringValue(SnapshotPolicyResourceId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticVolumeSnapshotProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticVolumeSnapshotProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticVolumeSnapshotProperties(document.RootElement, options); + } + + internal static ElasticVolumeSnapshotProperties DeserializeElasticVolumeSnapshotProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier snapshotPolicyResourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("snapshotPolicyResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + snapshotPolicyResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticVolumeSnapshotProperties(snapshotPolicyResourceId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticVolumeSnapshotProperties)} does not support writing '{options.Format}' format."); + } + } + + ElasticVolumeSnapshotProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticVolumeSnapshotProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticVolumeSnapshotProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeSnapshotProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeSnapshotProperties.cs new file mode 100644 index 000000000000..9d93265538d5 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeSnapshotProperties.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Elastic Volume Snapshot Properties. + internal partial class ElasticVolumeSnapshotProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticVolumeSnapshotProperties() + { + } + + /// Initializes a new instance of . + /// Snapshot Policy ResourceId. + /// Keeps track of any properties unknown to the library. + internal ElasticVolumeSnapshotProperties(ResourceIdentifier snapshotPolicyResourceId, IDictionary serializedAdditionalRawData) + { + SnapshotPolicyResourceId = snapshotPolicyResourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Snapshot Policy ResourceId. + public ResourceIdentifier SnapshotPolicyResourceId { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeUpdateProperties.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeUpdateProperties.Serialization.cs new file mode 100644 index 000000000000..d6b39f438cbc --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeUpdateProperties.Serialization.cs @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class ElasticVolumeUpdateProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticVolumeUpdateProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Size)) + { + writer.WritePropertyName("size"u8); + writer.WriteNumberValue(Size.Value); + } + if (Optional.IsDefined(ExportPolicy)) + { + writer.WritePropertyName("exportPolicy"u8); + writer.WriteObjectValue(ExportPolicy, options); + } + if (Optional.IsDefined(DataProtection)) + { + writer.WritePropertyName("dataProtection"u8); + writer.WriteObjectValue(DataProtection, options); + } + if (Optional.IsDefined(SnapshotDirectoryVisibility)) + { + writer.WritePropertyName("snapshotDirectoryVisibility"u8); + writer.WriteStringValue(SnapshotDirectoryVisibility.Value.ToString()); + } + if (Optional.IsDefined(SmbProperties)) + { + writer.WritePropertyName("smbProperties"u8); + writer.WriteObjectValue(SmbProperties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ElasticVolumeUpdateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ElasticVolumeUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeElasticVolumeUpdateProperties(document.RootElement, options); + } + + internal static ElasticVolumeUpdateProperties DeserializeElasticVolumeUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long? size = default; + ElasticExportPolicy exportPolicy = default; + ElasticVolumeDataProtectionPatchProperties dataProtection = default; + SnapshotDirectoryVisibility? snapshotDirectoryVisibility = default; + ElasticSmbPatchProperties smbProperties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("size"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + size = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("exportPolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + exportPolicy = ElasticExportPolicy.DeserializeElasticExportPolicy(property.Value, options); + continue; + } + if (property.NameEquals("dataProtection"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataProtection = ElasticVolumeDataProtectionPatchProperties.DeserializeElasticVolumeDataProtectionPatchProperties(property.Value, options); + continue; + } + if (property.NameEquals("snapshotDirectoryVisibility"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + snapshotDirectoryVisibility = new SnapshotDirectoryVisibility(property.Value.GetString()); + continue; + } + if (property.NameEquals("smbProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + smbProperties = ElasticSmbPatchProperties.DeserializeElasticSmbPatchProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ElasticVolumeUpdateProperties( + size, + exportPolicy, + dataProtection, + snapshotDirectoryVisibility, + smbProperties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(ElasticVolumeUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + ElasticVolumeUpdateProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeElasticVolumeUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ElasticVolumeUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeUpdateProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeUpdateProperties.cs new file mode 100644 index 000000000000..37cd54da8cc1 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ElasticVolumeUpdateProperties.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The updatable properties of the ElasticVolume. + public partial class ElasticVolumeUpdateProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ElasticVolumeUpdateProperties() + { + } + + /// Initializes a new instance of . + /// 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. + /// Set of export policy rules. + /// Data protection configuration option for the volume, including snapshot policies and backup. + /// Controls the visibility of the volume's read-only snapshot directory, which provides access to each of the volume's snapshots. + /// SMB Properties. + /// Keeps track of any properties unknown to the library. + internal ElasticVolumeUpdateProperties(long? size, ElasticExportPolicy exportPolicy, ElasticVolumeDataProtectionPatchProperties dataProtection, SnapshotDirectoryVisibility? snapshotDirectoryVisibility, ElasticSmbPatchProperties smbProperties, IDictionary serializedAdditionalRawData) + { + Size = size; + ExportPolicy = exportPolicy; + DataProtection = dataProtection; + SnapshotDirectoryVisibility = snapshotDirectoryVisibility; + SmbProperties = smbProperties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// 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. + public long? Size { get; set; } + /// Set of export policy rules. + internal ElasticExportPolicy ExportPolicy { get; set; } + /// Export policy rule. + public IList ExportRules + { + get + { + if (ExportPolicy is null) + ExportPolicy = new ElasticExportPolicy(); + return ExportPolicy.Rules; + } + } + + /// Data protection configuration option for the volume, including snapshot policies and backup. + public ElasticVolumeDataProtectionPatchProperties DataProtection { get; set; } + /// Controls the visibility of the volume's read-only snapshot directory, which provides access to each of the volume's snapshots. + public SnapshotDirectoryVisibility? SnapshotDirectoryVisibility { get; set; } + /// SMB Properties. + internal ElasticSmbPatchProperties SmbProperties { get; set; } + /// 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. + public ElasticSmbEncryption? SmbEncryption + { + get => SmbProperties is null ? default : SmbProperties.SmbEncryption; + set + { + if (SmbProperties is null) + SmbProperties = new ElasticSmbPatchProperties(); + SmbProperties.SmbEncryption = value; + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/EnableWriteBackState.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/EnableWriteBackState.cs new file mode 100644 index 000000000000..29b6b4f3eba6 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/EnableWriteBackState.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Flag indicating whether writeback is enabled for the cache. + public readonly partial struct EnableWriteBackState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EnableWriteBackState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DisabledValue = "Disabled"; + private const string EnabledValue = "Enabled"; + + /// Writeback cache is disabled. + public static EnableWriteBackState Disabled { get; } = new EnableWriteBackState(DisabledValue); + /// Writeback cache is enabled. + public static EnableWriteBackState Enabled { get; } = new EnableWriteBackState(EnabledValue); + /// Determines if two values are the same. + public static bool operator ==(EnableWriteBackState left, EnableWriteBackState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EnableWriteBackState left, EnableWriteBackState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator EnableWriteBackState(string value) => new EnableWriteBackState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EnableWriteBackState other && Equals(other); + /// + public bool Equals(EnableWriteBackState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/EncryptionState.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/EncryptionState.cs new file mode 100644 index 000000000000..065d4d68c5a9 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/EncryptionState.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Specifies if the cache is encryption or not. + public readonly partial struct EncryptionState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EncryptionState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DisabledValue = "Disabled"; + private const string EnabledValue = "Enabled"; + + /// Encryption is disabled. + public static EncryptionState Disabled { get; } = new EncryptionState(DisabledValue); + /// Encryption is enabled. + public static EncryptionState Enabled { get; } = new EncryptionState(EnabledValue); + /// Determines if two values are the same. + public static bool operator ==(EncryptionState left, EncryptionState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EncryptionState left, EncryptionState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator EncryptionState(string value) => new EncryptionState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EncryptionState other && Equals(other); + /// + public bool Equals(EncryptionState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ExternalReplicationSetupStatus.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ExternalReplicationSetupStatus.cs new file mode 100644 index 000000000000..7884f10fface --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ExternalReplicationSetupStatus.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Property that only applies to external replications. Provides a machine-readable value for the status of the external replication setup. + public readonly partial struct ExternalReplicationSetupStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ExternalReplicationSetupStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ClusterPeerRequiredValue = "ClusterPeerRequired"; + private const string ClusterPeerPendingValue = "ClusterPeerPending"; + private const string VServerPeerRequiredValue = "VServerPeerRequired"; + private const string ReplicationCreateRequiredValue = "ReplicationCreateRequired"; + private const string NoActionRequiredValue = "NoActionRequired"; + + /// Your cluster needs to be peered by using the 'peerExternalCluster' action. + public static ExternalReplicationSetupStatus ClusterPeerRequired { get; } = new ExternalReplicationSetupStatus(ClusterPeerRequiredValue); + /// The peering needs to be accepted on your cluster before the setup can proceed. + public static ExternalReplicationSetupStatus ClusterPeerPending { get; } = new ExternalReplicationSetupStatus(ClusterPeerPendingValue); + /// Need to call 'authorizeExternalReplication' and accept the returned 'vserver peer accept' command on your cluster to finish setting up the external replication. + public static ExternalReplicationSetupStatus VServerPeerRequired { get; } = new ExternalReplicationSetupStatus(VServerPeerRequiredValue); + /// Need to call 'authorizeExternalReplication' to finish setting up the external replication. + public static ExternalReplicationSetupStatus ReplicationCreateRequired { get; } = new ExternalReplicationSetupStatus(ReplicationCreateRequiredValue); + /// External Replication setup is complete, you can now monitor the 'mirrorState' in the replication status for the health of the replication. + public static ExternalReplicationSetupStatus NoActionRequired { get; } = new ExternalReplicationSetupStatus(NoActionRequiredValue); + /// Determines if two values are the same. + public static bool operator ==(ExternalReplicationSetupStatus left, ExternalReplicationSetupStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ExternalReplicationSetupStatus left, ExternalReplicationSetupStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ExternalReplicationSetupStatus(string value) => new ExternalReplicationSetupStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ExternalReplicationSetupStatus other && Equals(other); + /// + public bool Equals(ExternalReplicationSetupStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/GlobalFileLockingState.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/GlobalFileLockingState.cs new file mode 100644 index 000000000000..0f5e07e0f0d2 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/GlobalFileLockingState.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Flag indicating whether the global file lock is enabled for the cache. + public readonly partial struct GlobalFileLockingState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public GlobalFileLockingState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DisabledValue = "Disabled"; + private const string EnabledValue = "Enabled"; + + /// Global file locking is disabled. + public static GlobalFileLockingState Disabled { get; } = new GlobalFileLockingState(DisabledValue); + /// Global file locking is enabled. + public static GlobalFileLockingState Enabled { get; } = new GlobalFileLockingState(EnabledValue); + /// Determines if two values are the same. + public static bool operator ==(GlobalFileLockingState left, GlobalFileLockingState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(GlobalFileLockingState left, GlobalFileLockingState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator GlobalFileLockingState(string value) => new GlobalFileLockingState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is GlobalFileLockingState other && Equals(other); + /// + public bool Equals(GlobalFileLockingState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/KerberosState.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/KerberosState.cs new file mode 100644 index 000000000000..fb2a814dd86d --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/KerberosState.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Describe if a cache is Kerberos enabled. + public readonly partial struct KerberosState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public KerberosState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DisabledValue = "Disabled"; + private const string EnabledValue = "Enabled"; + + /// Kerberos is disabled. + public static KerberosState Disabled { get; } = new KerberosState(DisabledValue); + /// Kerberos is enabled. + public static KerberosState Enabled { get; } = new KerberosState(EnabledValue); + /// Determines if two values are the same. + public static bool operator ==(KerberosState left, KerberosState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(KerberosState left, KerberosState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator KerberosState(string value) => new KerberosState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is KerberosState other && Equals(other); + /// + public bool Equals(KerberosState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/LargeVolumeType.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/LargeVolumeType.cs new file mode 100644 index 000000000000..b8a5a5ca0967 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/LargeVolumeType.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// + /// 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 readonly partial struct LargeVolumeType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public LargeVolumeType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string LargeVolumeValue = "LargeVolume"; + private const string ExtraLargeVolume7Dot2PiBValue = "PremExtraLargeVolume7Dot2PiB"; + + /// The large volume is created with standard configuration that provides standard performance and throughput. + public static LargeVolumeType LargeVolume { get; } = new LargeVolumeType(LargeVolumeValue); + /// 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 LargeVolumeType ExtraLargeVolume7Dot2PiB { get; } = new LargeVolumeType(ExtraLargeVolume7Dot2PiBValue); + /// Determines if two values are the same. + public static bool operator ==(LargeVolumeType left, LargeVolumeType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(LargeVolumeType left, LargeVolumeType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator LargeVolumeType(string value) => new LargeVolumeType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is LargeVolumeType other && Equals(other); + /// + public bool Equals(LargeVolumeType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/LdapConfiguration.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/LdapConfiguration.Serialization.cs new file mode 100644 index 000000000000..7647db3d69d6 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/LdapConfiguration.Serialization.cs @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class LdapConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LdapConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Domain)) + { + writer.WritePropertyName("domain"u8); + writer.WriteStringValue(Domain); + } + if (Optional.IsCollectionDefined(LdapServers)) + { + writer.WritePropertyName("ldapServers"u8); + writer.WriteStartArray(); + foreach (var item in LdapServers) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(LdapOverTls)) + { + writer.WritePropertyName("ldapOverTLS"u8); + writer.WriteBooleanValue(LdapOverTls.Value); + } + if (Optional.IsDefined(ServerCACertificate)) + { + writer.WritePropertyName("serverCACertificate"u8); + writer.WriteStringValue(ServerCACertificate); + } + if (Optional.IsDefined(CertificateCNHost)) + { + if (CertificateCNHost != null) + { + writer.WritePropertyName("certificateCNHost"u8); + writer.WriteStringValue(CertificateCNHost); + } + else + { + writer.WriteNull("certificateCNHost"); + } + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + LdapConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LdapConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLdapConfiguration(document.RootElement, options); + } + + internal static LdapConfiguration DeserializeLdapConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string domain = default; + IList ldapServers = default; + bool? ldapOverTls = default; + string serverCACertificate = default; + string certificateCNHost = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("domain"u8)) + { + domain = property.Value.GetString(); + continue; + } + if (property.NameEquals("ldapServers"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + ldapServers = array; + continue; + } + if (property.NameEquals("ldapOverTLS"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ldapOverTls = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("serverCACertificate"u8)) + { + serverCACertificate = property.Value.GetString(); + continue; + } + if (property.NameEquals("certificateCNHost"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + certificateCNHost = null; + continue; + } + certificateCNHost = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LdapConfiguration( + domain, + ldapServers ?? new ChangeTrackingList(), + ldapOverTls, + serverCACertificate, + certificateCNHost, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(LdapConfiguration)} does not support writing '{options.Format}' format."); + } + } + + LdapConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeLdapConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LdapConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/LdapConfiguration.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/LdapConfiguration.cs new file mode 100644 index 000000000000..9b4ca6736071 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/LdapConfiguration.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// LDAP configuration. + public partial class LdapConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public LdapConfiguration() + { + LdapServers = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Name of the LDAP configuration domain. + /// List of LDAP server IP addresses (IPv4 only) for the LDAP domain. + /// Specifies whether or not the LDAP traffic needs to be secured via TLS. + /// When LDAP over SSL/TLS is enabled, the LDAP client is required to have base64 encoded ldap servers CA certificate. + /// The CN host name used while generating the certificate, LDAP Over TLS requires the CN host name to create DNS host entry. + /// Keeps track of any properties unknown to the library. + internal LdapConfiguration(string domain, IList ldapServers, bool? ldapOverTls, string serverCACertificate, string certificateCNHost, IDictionary serializedAdditionalRawData) + { + Domain = domain; + LdapServers = ldapServers; + LdapOverTls = ldapOverTls; + ServerCACertificate = serverCACertificate; + CertificateCNHost = certificateCNHost; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Name of the LDAP configuration domain. + public string Domain { get; set; } + /// List of LDAP server IP addresses (IPv4 only) for the LDAP domain. + public IList LdapServers { get; } + /// Specifies whether or not the LDAP traffic needs to be secured via TLS. + public bool? LdapOverTls { get; set; } + /// When LDAP over SSL/TLS is enabled, the LDAP client is required to have base64 encoded ldap servers CA certificate. + public string ServerCACertificate { get; set; } + /// The CN host name used while generating the certificate, LDAP Over TLS requires the CN host name to create DNS host entry. + public string CertificateCNHost { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/LdapServerType.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/LdapServerType.cs new file mode 100644 index 000000000000..c15cae6506e3 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/LdapServerType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The type of the LDAP server. + public readonly partial struct LdapServerType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public LdapServerType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveDirectoryValue = "ActiveDirectory"; + private const string OpenLdapValue = "OpenLDAP"; + + /// The volume should use Active Directory for LDAP connections. + public static LdapServerType ActiveDirectory { get; } = new LdapServerType(ActiveDirectoryValue); + /// The volume should use OpenLDAP for LDAP connections. + public static LdapServerType OpenLdap { get; } = new LdapServerType(OpenLdapValue); + /// Determines if two values are the same. + public static bool operator ==(LdapServerType left, LdapServerType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(LdapServerType left, LdapServerType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator LdapServerType(string value) => new LdapServerType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is LdapServerType other && Equals(other); + /// + public bool Equals(LdapServerType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/LdapState.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/LdapState.cs new file mode 100644 index 000000000000..24de2f239cd6 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/LdapState.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Specifies whether LDAP is enabled or not. + public readonly partial struct LdapState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public LdapState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DisabledValue = "Disabled"; + private const string EnabledValue = "Enabled"; + + /// ldap is disabled. + public static LdapState Disabled { get; } = new LdapState(DisabledValue); + /// ldap is enabled. + public static LdapState Enabled { get; } = new LdapState(EnabledValue); + /// Determines if two values are the same. + public static bool operator ==(LdapState left, LdapState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(LdapState left, LdapState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator LdapState(string value) => new LdapState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is LdapState other && Equals(other); + /// + public bool Equals(LdapState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ManagedServiceIdentityType.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ManagedServiceIdentityType.cs new file mode 100644 index 000000000000..7d88e7a764bc --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ManagedServiceIdentityType.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + public readonly partial struct ManagedServiceIdentityType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ManagedServiceIdentityType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string SystemAssignedValue = "SystemAssigned"; + private const string UserAssignedValue = "UserAssigned"; + private const string SystemAssignedUserAssignedValue = "SystemAssigned,UserAssigned"; + + /// None. + public static ManagedServiceIdentityType None { get; } = new ManagedServiceIdentityType(NoneValue); + /// SystemAssigned. + public static ManagedServiceIdentityType SystemAssigned { get; } = new ManagedServiceIdentityType(SystemAssignedValue); + /// UserAssigned. + public static ManagedServiceIdentityType UserAssigned { get; } = new ManagedServiceIdentityType(UserAssignedValue); + /// SystemAssigned,UserAssigned. + public static ManagedServiceIdentityType SystemAssignedUserAssigned { get; } = new ManagedServiceIdentityType(SystemAssignedUserAssignedValue); + /// Determines if two values are the same. + public static bool operator ==(ManagedServiceIdentityType left, ManagedServiceIdentityType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ManagedServiceIdentityType left, ManagedServiceIdentityType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ManagedServiceIdentityType(string value) => new ManagedServiceIdentityType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ManagedServiceIdentityType other && Equals(other); + /// + public bool Equals(ManagedServiceIdentityType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAccountPatch.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAccountPatch.Serialization.cs index bbd7ae68ff22..31e075b0f791 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAccountPatch.Serialization.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAccountPatch.Serialization.cs @@ -93,6 +93,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("multiAdStatus"u8); writer.WriteStringValue(MultiAdStatus.Value.ToString()); } + if (Optional.IsDefined(LdapConfiguration)) + { + writer.WritePropertyName("ldapConfiguration"u8); + writer.WriteObjectValue(LdapConfiguration, options); + } writer.WriteEndObject(); } @@ -129,6 +134,7 @@ internal static NetAppAccountPatch DeserializeNetAppAccountPatch(JsonElement ele bool? disableShowmount = default; string nfsV4IdDomain = default; MultiAdStatus? multiAdStatus = default; + LdapConfiguration ldapConfiguration = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -251,6 +257,15 @@ internal static NetAppAccountPatch DeserializeNetAppAccountPatch(JsonElement ele multiAdStatus = new MultiAdStatus(property0.Value.GetString()); continue; } + if (property0.NameEquals("ldapConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ldapConfiguration = LdapConfiguration.DeserializeLdapConfiguration(property0.Value, options); + continue; + } } continue; } @@ -274,6 +289,7 @@ internal static NetAppAccountPatch DeserializeNetAppAccountPatch(JsonElement ele disableShowmount, nfsV4IdDomain, multiAdStatus, + ldapConfiguration, serializedAdditionalRawData); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAccountPatch.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAccountPatch.cs index b71a6eff047f..13fc2fa9f160 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAccountPatch.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppAccountPatch.cs @@ -68,8 +68,9 @@ public NetAppAccountPatch(AzureLocation location) : base(location) /// Shows the status of disableShowmount for all volumes under the subscription, null equals false. /// Domain for NFSv4 user ID mapping. This property will be set for all NetApp accounts in the subscription and region and only affect non ldap NFSv4 volumes. /// MultiAD Status for the account. + /// LDAP Configuration for the account. /// Keeps track of any properties unknown to the library. - internal NetAppAccountPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string provisioningState, IList activeDirectories, NetAppAccountEncryption encryption, bool? disableShowmount, string nfsV4IdDomain, MultiAdStatus? multiAdStatus, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal NetAppAccountPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string provisioningState, IList activeDirectories, NetAppAccountEncryption encryption, bool? disableShowmount, string nfsV4IdDomain, MultiAdStatus? multiAdStatus, LdapConfiguration ldapConfiguration, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Identity = identity; ProvisioningState = provisioningState; @@ -78,6 +79,7 @@ internal NetAppAccountPatch(ResourceIdentifier id, string name, ResourceType res DisableShowmount = disableShowmount; NfsV4IdDomain = nfsV4IdDomain; MultiAdStatus = multiAdStatus; + LdapConfiguration = ldapConfiguration; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -100,5 +102,7 @@ internal NetAppAccountPatch() public string NfsV4IdDomain { get; set; } /// MultiAD Status for the account. public MultiAdStatus? MultiAdStatus { get; } + /// LDAP Configuration for the account. + public LdapConfiguration LdapConfiguration { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketCredentialStatus.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketCredentialStatus.cs new file mode 100644 index 000000000000..55915982fda1 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketCredentialStatus.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// + /// 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 readonly partial struct NetAppBucketCredentialStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NetAppBucketCredentialStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoCredentialsSetValue = "NoCredentialsSet"; + private const string CredentialsExpiredValue = "CredentialsExpired"; + private const string ActiveValue = "Active"; + + /// Access and Secret key pair have not been generated. + public static NetAppBucketCredentialStatus NoCredentialsSet { get; } = new NetAppBucketCredentialStatus(NoCredentialsSetValue); + /// Access and Secret key pair have expired. + public static NetAppBucketCredentialStatus CredentialsExpired { get; } = new NetAppBucketCredentialStatus(CredentialsExpiredValue); + /// The certificate has been installed on the bucket server and the bucket credentials are unexpired. + public static NetAppBucketCredentialStatus Active { get; } = new NetAppBucketCredentialStatus(ActiveValue); + /// Determines if two values are the same. + public static bool operator ==(NetAppBucketCredentialStatus left, NetAppBucketCredentialStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NetAppBucketCredentialStatus left, NetAppBucketCredentialStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator NetAppBucketCredentialStatus(string value) => new NetAppBucketCredentialStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NetAppBucketCredentialStatus other && Equals(other); + /// + public bool Equals(NetAppBucketCredentialStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketCredentialsExpiry.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketCredentialsExpiry.Serialization.cs new file mode 100644 index 000000000000..399f220f2ce0 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketCredentialsExpiry.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class NetAppBucketCredentialsExpiry : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetAppBucketCredentialsExpiry)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(KeyPairExpiryDays)) + { + writer.WritePropertyName("keyPairExpiryDays"u8); + writer.WriteNumberValue(KeyPairExpiryDays.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NetAppBucketCredentialsExpiry IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetAppBucketCredentialsExpiry)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetAppBucketCredentialsExpiry(document.RootElement, options); + } + + internal static NetAppBucketCredentialsExpiry DeserializeNetAppBucketCredentialsExpiry(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? keyPairExpiryDays = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keyPairExpiryDays"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyPairExpiryDays = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetAppBucketCredentialsExpiry(keyPairExpiryDays, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(NetAppBucketCredentialsExpiry)} does not support writing '{options.Format}' format."); + } + } + + NetAppBucketCredentialsExpiry IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNetAppBucketCredentialsExpiry(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetAppBucketCredentialsExpiry)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketCredentialsExpiry.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketCredentialsExpiry.cs new file mode 100644 index 000000000000..401d36eb234a --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketCredentialsExpiry.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The bucket's Access and Secret key pair Expiry Time expressed as the number of days from now. + public partial class NetAppBucketCredentialsExpiry + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NetAppBucketCredentialsExpiry() + { + } + + /// Initializes a new instance of . + /// The number of days from now until the newly generated Access and Secret key pair will expire. + /// Keeps track of any properties unknown to the library. + internal NetAppBucketCredentialsExpiry(int? keyPairExpiryDays, IDictionary serializedAdditionalRawData) + { + KeyPairExpiryDays = keyPairExpiryDays; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The number of days from now until the newly generated Access and Secret key pair will expire. + public int? KeyPairExpiryDays { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketFileSystemUser.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketFileSystemUser.Serialization.cs new file mode 100644 index 000000000000..75ce04ee5e66 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketFileSystemUser.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class NetAppBucketFileSystemUser : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetAppBucketFileSystemUser)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(NfsUser)) + { + writer.WritePropertyName("nfsUser"u8); + writer.WriteObjectValue(NfsUser, options); + } + if (Optional.IsDefined(CifsUser)) + { + writer.WritePropertyName("cifsUser"u8); + writer.WriteObjectValue(CifsUser, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NetAppBucketFileSystemUser IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetAppBucketFileSystemUser)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetAppBucketFileSystemUser(document.RootElement, options); + } + + internal static NetAppBucketFileSystemUser DeserializeNetAppBucketFileSystemUser(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NetAppBucketNfsUser nfsUser = default; + CifsUser cifsUser = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nfsUser"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nfsUser = NetAppBucketNfsUser.DeserializeNetAppBucketNfsUser(property.Value, options); + continue; + } + if (property.NameEquals("cifsUser"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cifsUser = CifsUser.DeserializeCifsUser(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetAppBucketFileSystemUser(nfsUser, cifsUser, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(NetAppBucketFileSystemUser)} does not support writing '{options.Format}' format."); + } + } + + NetAppBucketFileSystemUser IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNetAppBucketFileSystemUser(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetAppBucketFileSystemUser)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketFileSystemUser.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketFileSystemUser.cs new file mode 100644 index 000000000000..ba753157c396 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketFileSystemUser.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// 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. + public partial class NetAppBucketFileSystemUser + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NetAppBucketFileSystemUser() + { + } + + /// Initializes a new instance of . + /// The effective NFS User ID and Group ID when accessing the volume data. + /// The effective CIFS username when accessing the volume data. + /// Keeps track of any properties unknown to the library. + internal NetAppBucketFileSystemUser(NetAppBucketNfsUser nfsUser, CifsUser cifsUser, IDictionary serializedAdditionalRawData) + { + NfsUser = nfsUser; + CifsUser = cifsUser; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The effective NFS User ID and Group ID when accessing the volume data. + public NetAppBucketNfsUser NfsUser { get; set; } + /// The effective CIFS username when accessing the volume data. + internal CifsUser CifsUser { get; set; } + /// The CIFS user's username. + public string CifsUserUsername + { + get => CifsUser is null ? default : CifsUser.Username; + set + { + if (CifsUser is null) + CifsUser = new CifsUser(); + CifsUser.Username = value; + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketGenerateCredentials.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketGenerateCredentials.Serialization.cs new file mode 100644 index 000000000000..c643198ae044 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketGenerateCredentials.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class NetAppBucketGenerateCredentials : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetAppBucketGenerateCredentials)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(AccessKey)) + { + writer.WritePropertyName("accessKey"u8); + writer.WriteStringValue(AccessKey); + } + if (options.Format != "W" && Optional.IsDefined(SecretKey)) + { + writer.WritePropertyName("secretKey"u8); + writer.WriteStringValue(SecretKey); + } + if (options.Format != "W" && Optional.IsDefined(KeyPairExpiry)) + { + writer.WritePropertyName("keyPairExpiry"u8); + writer.WriteStringValue(KeyPairExpiry.Value, "O"); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NetAppBucketGenerateCredentials IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetAppBucketGenerateCredentials)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetAppBucketGenerateCredentials(document.RootElement, options); + } + + internal static NetAppBucketGenerateCredentials DeserializeNetAppBucketGenerateCredentials(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string accessKey = default; + string secretKey = default; + DateTimeOffset? keyPairExpiry = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("accessKey"u8)) + { + accessKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("secretKey"u8)) + { + secretKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("keyPairExpiry"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyPairExpiry = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetAppBucketGenerateCredentials(accessKey, secretKey, keyPairExpiry, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(NetAppBucketGenerateCredentials)} does not support writing '{options.Format}' format."); + } + } + + NetAppBucketGenerateCredentials IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNetAppBucketGenerateCredentials(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetAppBucketGenerateCredentials)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketGenerateCredentials.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketGenerateCredentials.cs new file mode 100644 index 000000000000..e37c94e2c3b4 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketGenerateCredentials.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Bucket Access Key, Secret Key, and Expiry date and time of the key pair. + public partial class NetAppBucketGenerateCredentials + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal NetAppBucketGenerateCredentials() + { + } + + /// Initializes a new instance of . + /// The Access Key that is required along with the Secret Key to access the bucket. + /// The Secret Key that is required along with the Access Key to access the bucket. + /// The bucket's Access and Secret key pair expiry date and time (in UTC). + /// Keeps track of any properties unknown to the library. + internal NetAppBucketGenerateCredentials(string accessKey, string secretKey, DateTimeOffset? keyPairExpiry, IDictionary serializedAdditionalRawData) + { + AccessKey = accessKey; + SecretKey = secretKey; + KeyPairExpiry = keyPairExpiry; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The Access Key that is required along with the Secret Key to access the bucket. + public string AccessKey { get; } + /// The Secret Key that is required along with the Access Key to access the bucket. + public string SecretKey { get; } + /// The bucket's Access and Secret key pair expiry date and time (in UTC). + public DateTimeOffset? KeyPairExpiry { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketList.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketList.Serialization.cs new file mode 100644 index 000000000000..1a70b4c63d58 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketList.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + internal partial class NetAppBucketList : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetAppBucketList)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NetAppBucketList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetAppBucketList)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetAppBucketList(document.RootElement, options); + } + + internal static NetAppBucketList DeserializeNetAppBucketList(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NetAppBucketData.DeserializeNetAppBucketData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetAppBucketList(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(NetAppBucketList)} does not support writing '{options.Format}' format."); + } + } + + NetAppBucketList IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNetAppBucketList(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetAppBucketList)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketList.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketList.cs new file mode 100644 index 000000000000..23fe3bbf5e7e --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketList.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// List of volume bucket resources. + internal partial class NetAppBucketList + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Bucket items on this page. + /// is null. + internal NetAppBucketList(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Bucket items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal NetAppBucketList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal NetAppBucketList() + { + } + + /// The Bucket items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketNfsUser.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketNfsUser.Serialization.cs new file mode 100644 index 000000000000..4991ab77a5de --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketNfsUser.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class NetAppBucketNfsUser : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetAppBucketNfsUser)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(UserId)) + { + writer.WritePropertyName("userId"u8); + writer.WriteNumberValue(UserId.Value); + } + if (Optional.IsDefined(GroupId)) + { + writer.WritePropertyName("groupId"u8); + writer.WriteNumberValue(GroupId.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NetAppBucketNfsUser IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetAppBucketNfsUser)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetAppBucketNfsUser(document.RootElement, options); + } + + internal static NetAppBucketNfsUser DeserializeNetAppBucketNfsUser(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long? userId = default; + long? groupId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("userId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userId = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("groupId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + groupId = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetAppBucketNfsUser(userId, groupId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(NetAppBucketNfsUser)} does not support writing '{options.Format}' format."); + } + } + + NetAppBucketNfsUser IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNetAppBucketNfsUser(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetAppBucketNfsUser)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketNfsUser.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketNfsUser.cs new file mode 100644 index 000000000000..898ed0c2514a --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketNfsUser.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The effective NFS User ID and Group ID when accessing the volume data. + public partial class NetAppBucketNfsUser + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NetAppBucketNfsUser() + { + } + + /// Initializes a new instance of . + /// The NFS user's UID. + /// The NFS user's GID. + /// Keeps track of any properties unknown to the library. + internal NetAppBucketNfsUser(long? userId, long? groupId, IDictionary serializedAdditionalRawData) + { + UserId = userId; + GroupId = groupId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The NFS user's UID. + public long? UserId { get; set; } + /// The NFS user's GID. + public long? GroupId { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketPatch.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketPatch.Serialization.cs new file mode 100644 index 000000000000..dc5b26b31111 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketPatch.Serialization.cs @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class NetAppBucketPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetAppBucketPatch)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Path)) + { + writer.WritePropertyName("path"u8); + writer.WriteStringValue(Path); + } + if (Optional.IsDefined(FileSystemUser)) + { + writer.WritePropertyName("fileSystemUser"u8); + writer.WriteObjectValue(FileSystemUser, options); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToSerialString()); + } + if (Optional.IsDefined(Server)) + { + writer.WritePropertyName("server"u8); + writer.WriteObjectValue(Server, options); + } + if (Optional.IsDefined(Permissions)) + { + writer.WritePropertyName("permissions"u8); + writer.WriteStringValue(Permissions.Value.ToString()); + } + writer.WriteEndObject(); + } + + NetAppBucketPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetAppBucketPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetAppBucketPatch(document.RootElement, options); + } + + internal static NetAppBucketPatch DeserializeNetAppBucketPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + string path = default; + NetAppBucketFileSystemUser fileSystemUser = default; + NetAppProvisioningState? provisioningState = default; + NetAppBucketServerPatchProperties server = default; + NetAppBucketPatchPermission? permissions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerNetAppContext.Default); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("path"u8)) + { + path = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("fileSystemUser"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + fileSystemUser = NetAppBucketFileSystemUser.DeserializeNetAppBucketFileSystemUser(property0.Value, options); + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = property0.Value.GetString().ToNetAppProvisioningState(); + continue; + } + if (property0.NameEquals("server"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + server = NetAppBucketServerPatchProperties.DeserializeNetAppBucketServerPatchProperties(property0.Value, options); + continue; + } + if (property0.NameEquals("permissions"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + permissions = new NetAppBucketPatchPermission(property0.Value.GetString()); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetAppBucketPatch( + id, + name, + type, + systemData, + path, + fileSystemUser, + provisioningState, + server, + permissions, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(NetAppBucketPatch)} does not support writing '{options.Format}' format."); + } + } + + NetAppBucketPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNetAppBucketPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetAppBucketPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketPatch.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketPatch.cs new file mode 100644 index 000000000000..32c01890a14a --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketPatch.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Bucket resource. + public partial class NetAppBucketPatch : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NetAppBucketPatch() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The volume path mounted inside the bucket. + /// 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. + /// Provisioning state of the resource. + /// Properties of the server managing the lifecycle of volume buckets. + /// Access permissions for the bucket. Either ReadOnly or ReadWrite. + /// Keeps track of any properties unknown to the library. + internal NetAppBucketPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string path, NetAppBucketFileSystemUser fileSystemUser, NetAppProvisioningState? provisioningState, NetAppBucketServerPatchProperties server, NetAppBucketPatchPermission? permissions, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Path = path; + FileSystemUser = fileSystemUser; + ProvisioningState = provisioningState; + Server = server; + Permissions = permissions; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The volume path mounted inside the bucket. + public string Path { get; set; } + /// 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. + public NetAppBucketFileSystemUser FileSystemUser { get; set; } + /// Provisioning state of the resource. + public NetAppProvisioningState? ProvisioningState { get; } + /// Properties of the server managing the lifecycle of volume buckets. + public NetAppBucketServerPatchProperties Server { get; set; } + /// Access permissions for the bucket. Either ReadOnly or ReadWrite. + public NetAppBucketPatchPermission? Permissions { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketPatchPermission.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketPatchPermission.cs new file mode 100644 index 000000000000..c0230c983b0f --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketPatchPermission.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Access permissions for the bucket. Either ReadOnly or ReadWrite. + public readonly partial struct NetAppBucketPatchPermission : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NetAppBucketPatchPermission(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ReadOnlyValue = "ReadOnly"; + private const string ReadWriteValue = "ReadWrite"; + + /// Read-only access to bucket. + public static NetAppBucketPatchPermission ReadOnly { get; } = new NetAppBucketPatchPermission(ReadOnlyValue); + /// Read-write access to bucket. + public static NetAppBucketPatchPermission ReadWrite { get; } = new NetAppBucketPatchPermission(ReadWriteValue); + /// Determines if two values are the same. + public static bool operator ==(NetAppBucketPatchPermission left, NetAppBucketPatchPermission right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NetAppBucketPatchPermission left, NetAppBucketPatchPermission right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator NetAppBucketPatchPermission(string value) => new NetAppBucketPatchPermission(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NetAppBucketPatchPermission other && Equals(other); + /// + public bool Equals(NetAppBucketPatchPermission other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketPermission.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketPermission.cs new file mode 100644 index 000000000000..4847072ebdad --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketPermission.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Access permissions for the bucket. Either ReadOnly or ReadWrite. The default is ReadOnly if no value is provided during bucket creation. + public readonly partial struct NetAppBucketPermission : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NetAppBucketPermission(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ReadOnlyValue = "ReadOnly"; + private const string ReadWriteValue = "ReadWrite"; + + /// Read-only access to bucket. + public static NetAppBucketPermission ReadOnly { get; } = new NetAppBucketPermission(ReadOnlyValue); + /// Read-write access to bucket. + public static NetAppBucketPermission ReadWrite { get; } = new NetAppBucketPermission(ReadWriteValue); + /// Determines if two values are the same. + public static bool operator ==(NetAppBucketPermission left, NetAppBucketPermission right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NetAppBucketPermission left, NetAppBucketPermission right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator NetAppBucketPermission(string value) => new NetAppBucketPermission(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NetAppBucketPermission other && Equals(other); + /// + public bool Equals(NetAppBucketPermission other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketServerPatchProperties.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketServerPatchProperties.Serialization.cs new file mode 100644 index 000000000000..7f99e790fe38 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketServerPatchProperties.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class NetAppBucketServerPatchProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetAppBucketServerPatchProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Fqdn)) + { + writer.WritePropertyName("fqdn"u8); + writer.WriteStringValue(Fqdn); + } + if (Optional.IsDefined(CertificateObject)) + { + writer.WritePropertyName("certificateObject"u8); + writer.WriteStringValue(CertificateObject); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NetAppBucketServerPatchProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetAppBucketServerPatchProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetAppBucketServerPatchProperties(document.RootElement, options); + } + + internal static NetAppBucketServerPatchProperties DeserializeNetAppBucketServerPatchProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string fqdn = default; + string certificateObject = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("fqdn"u8)) + { + fqdn = property.Value.GetString(); + continue; + } + if (property.NameEquals("certificateObject"u8)) + { + certificateObject = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetAppBucketServerPatchProperties(fqdn, certificateObject, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(NetAppBucketServerPatchProperties)} does not support writing '{options.Format}' format."); + } + } + + NetAppBucketServerPatchProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNetAppBucketServerPatchProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetAppBucketServerPatchProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketServerPatchProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketServerPatchProperties.cs new file mode 100644 index 000000000000..889123334809 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketServerPatchProperties.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Properties of the server managing the lifecycle of volume buckets. + public partial class NetAppBucketServerPatchProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NetAppBucketServerPatchProperties() + { + } + + /// Initializes a new instance of . + /// The host part of the bucket URL, resolving to the bucket IP address and allowed by the server certificate. + /// 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. + /// Keeps track of any properties unknown to the library. + internal NetAppBucketServerPatchProperties(string fqdn, string certificateObject, IDictionary serializedAdditionalRawData) + { + Fqdn = fqdn; + CertificateObject = certificateObject; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The host part of the bucket URL, resolving to the bucket IP address and allowed by the server certificate. + public string Fqdn { get; set; } + /// 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. + public string CertificateObject { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketServerProperties.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketServerProperties.Serialization.cs new file mode 100644 index 000000000000..97e793b890e2 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketServerProperties.Serialization.cs @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class NetAppBucketServerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetAppBucketServerProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Fqdn)) + { + writer.WritePropertyName("fqdn"u8); + writer.WriteStringValue(Fqdn); + } + if (options.Format != "W" && Optional.IsDefined(CertificateCommonName)) + { + writer.WritePropertyName("certificateCommonName"u8); + writer.WriteStringValue(CertificateCommonName); + } + if (options.Format != "W" && Optional.IsDefined(CertificateExpiryOn)) + { + writer.WritePropertyName("certificateExpiryDate"u8); + writer.WriteStringValue(CertificateExpiryOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(IPAddress)) + { + writer.WritePropertyName("ipAddress"u8); + writer.WriteStringValue(IPAddress); + } + if (Optional.IsDefined(CertificateObject)) + { + writer.WritePropertyName("certificateObject"u8); + writer.WriteStringValue(CertificateObject); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NetAppBucketServerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetAppBucketServerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetAppBucketServerProperties(document.RootElement, options); + } + + internal static NetAppBucketServerProperties DeserializeNetAppBucketServerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string fqdn = default; + string certificateCommonName = default; + DateTimeOffset? certificateExpiryDate = default; + string ipAddress = default; + string certificateObject = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("fqdn"u8)) + { + fqdn = property.Value.GetString(); + continue; + } + if (property.NameEquals("certificateCommonName"u8)) + { + certificateCommonName = property.Value.GetString(); + continue; + } + if (property.NameEquals("certificateExpiryDate"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + certificateExpiryDate = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("ipAddress"u8)) + { + ipAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("certificateObject"u8)) + { + certificateObject = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetAppBucketServerProperties( + fqdn, + certificateCommonName, + certificateExpiryDate, + ipAddress, + certificateObject, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(NetAppBucketServerProperties)} does not support writing '{options.Format}' format."); + } + } + + NetAppBucketServerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNetAppBucketServerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetAppBucketServerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketServerProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketServerProperties.cs new file mode 100644 index 000000000000..44290ed3d86a --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppBucketServerProperties.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Properties of the server managing the lifecycle of volume buckets. + public partial class NetAppBucketServerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NetAppBucketServerProperties() + { + } + + /// Initializes a new instance of . + /// The host part of the bucket URL, resolving to the bucket IP address and allowed by the server certificate. + /// Certificate Common Name taken from the certificate installed on the bucket server. + /// The bucket server's certificate expiry date. + /// The bucket server's IPv4 address. + /// 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. + /// Keeps track of any properties unknown to the library. + internal NetAppBucketServerProperties(string fqdn, string certificateCommonName, DateTimeOffset? certificateExpiryOn, string ipAddress, string certificateObject, IDictionary serializedAdditionalRawData) + { + Fqdn = fqdn; + CertificateCommonName = certificateCommonName; + CertificateExpiryOn = certificateExpiryOn; + IPAddress = ipAddress; + CertificateObject = certificateObject; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The host part of the bucket URL, resolving to the bucket IP address and allowed by the server certificate. + public string Fqdn { get; set; } + /// Certificate Common Name taken from the certificate installed on the bucket server. + public string CertificateCommonName { get; } + /// The bucket server's certificate expiry date. + public DateTimeOffset? CertificateExpiryOn { get; } + /// The bucket server's IPv4 address. + public string IPAddress { get; } + /// 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. + public string CertificateObject { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppReplicationObject.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppReplicationObject.Serialization.cs index ce753c428e69..23769df181c5 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppReplicationObject.Serialization.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppReplicationObject.Serialization.cs @@ -74,6 +74,26 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } + if (options.Format != "W" && Optional.IsDefined(ExternalReplicationSetupStatus)) + { + writer.WritePropertyName("externalReplicationSetupStatus"u8); + writer.WriteStringValue(ExternalReplicationSetupStatus.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ExternalReplicationSetupInfo)) + { + writer.WritePropertyName("externalReplicationSetupInfo"u8); + writer.WriteStringValue(ExternalReplicationSetupInfo); + } + if (options.Format != "W" && Optional.IsDefined(MirrorState)) + { + writer.WritePropertyName("mirrorState"u8); + writer.WriteStringValue(MirrorState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(RelationshipStatus)) + { + writer.WritePropertyName("relationshipStatus"u8); + writer.WriteStringValue(RelationshipStatus.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -118,6 +138,10 @@ internal static NetAppReplicationObject DeserializeNetAppReplicationObject(JsonE RemotePath remotePath = default; string remoteVolumeRegion = default; IReadOnlyList destinationReplications = default; + ExternalReplicationSetupStatus? externalReplicationSetupStatus = default; + string externalReplicationSetupInfo = default; + NetAppMirrorState? mirrorState = default; + VolumeReplicationRelationshipStatus? relationshipStatus = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -182,6 +206,38 @@ internal static NetAppReplicationObject DeserializeNetAppReplicationObject(JsonE destinationReplications = array; continue; } + if (property.NameEquals("externalReplicationSetupStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + externalReplicationSetupStatus = new ExternalReplicationSetupStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("externalReplicationSetupInfo"u8)) + { + externalReplicationSetupInfo = property.Value.GetString(); + continue; + } + if (property.NameEquals("mirrorState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mirrorState = new NetAppMirrorState(property.Value.GetString()); + continue; + } + if (property.NameEquals("relationshipStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + relationshipStatus = new VolumeReplicationRelationshipStatus(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -196,6 +252,10 @@ internal static NetAppReplicationObject DeserializeNetAppReplicationObject(JsonE remotePath, remoteVolumeRegion, destinationReplications ?? new ChangeTrackingList(), + externalReplicationSetupStatus, + externalReplicationSetupInfo, + mirrorState, + relationshipStatus, serializedAdditionalRawData); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppReplicationObject.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppReplicationObject.cs index 82c434d9ee9d..094818d29c32 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppReplicationObject.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppReplicationObject.cs @@ -60,8 +60,12 @@ public NetAppReplicationObject() /// The full path to a volume that is to be migrated into ANF. Required for Migration volumes. /// The remote region for the other end of the Volume Replication. /// A list of destination replications. + /// Property that only applies to external replications. Provides a machine-readable value for the status of the external replication setup. + /// Contains human-readable instructions on what the next step is to finish the external replication setup. + /// 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. + /// The status of the Volume Replication. /// Keeps track of any properties unknown to the library. - internal NetAppReplicationObject(string replicationId, NetAppEndpointType? endpointType, NetAppReplicationSchedule? replicationSchedule, ResourceIdentifier remoteVolumeResourceId, RemotePath remotePath, string remoteVolumeRegion, IReadOnlyList destinationReplications, IDictionary serializedAdditionalRawData) + internal NetAppReplicationObject(string replicationId, NetAppEndpointType? endpointType, NetAppReplicationSchedule? replicationSchedule, ResourceIdentifier remoteVolumeResourceId, RemotePath remotePath, string remoteVolumeRegion, IReadOnlyList destinationReplications, ExternalReplicationSetupStatus? externalReplicationSetupStatus, string externalReplicationSetupInfo, NetAppMirrorState? mirrorState, VolumeReplicationRelationshipStatus? relationshipStatus, IDictionary serializedAdditionalRawData) { ReplicationId = replicationId; EndpointType = endpointType; @@ -70,6 +74,10 @@ internal NetAppReplicationObject(string replicationId, NetAppEndpointType? endpo RemotePath = remotePath; RemoteVolumeRegion = remoteVolumeRegion; DestinationReplications = destinationReplications; + ExternalReplicationSetupStatus = externalReplicationSetupStatus; + ExternalReplicationSetupInfo = externalReplicationSetupInfo; + MirrorState = mirrorState; + RelationshipStatus = relationshipStatus; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Schedule. @@ -82,5 +90,13 @@ internal NetAppReplicationObject(string replicationId, NetAppEndpointType? endpo public string RemoteVolumeRegion { get; set; } /// A list of destination replications. public IReadOnlyList DestinationReplications { get; } + /// Property that only applies to external replications. Provides a machine-readable value for the status of the external replication setup. + public ExternalReplicationSetupStatus? ExternalReplicationSetupStatus { get; } + /// Contains human-readable instructions on what the next step is to finish the external replication setup. + public string ExternalReplicationSetupInfo { get; } + /// 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. + public NetAppMirrorState? MirrorState { get; } + /// The status of the Volume Replication. + public VolumeReplicationRelationshipStatus? RelationshipStatus { get; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeDataProtection.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeDataProtection.Serialization.cs index 01bd2d7f9b18..527f6b7de5dc 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeDataProtection.Serialization.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeDataProtection.Serialization.cs @@ -54,6 +54,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("volumeRelocation"u8); writer.WriteObjectValue(VolumeRelocation, options); } + if (Optional.IsDefined(RansomwareProtection)) + { + writer.WritePropertyName("ransomwareProtection"u8); + writer.WriteObjectValue(RansomwareProtection, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -95,6 +100,7 @@ internal static NetAppVolumeDataProtection DeserializeNetAppVolumeDataProtection NetAppReplicationObject replication = default; VolumeSnapshotProperties snapshot = default; NetAppVolumeRelocationProperties volumeRelocation = default; + RansomwareProtectionSettings ransomwareProtection = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -135,13 +141,28 @@ internal static NetAppVolumeDataProtection DeserializeNetAppVolumeDataProtection volumeRelocation = NetAppVolumeRelocationProperties.DeserializeNetAppVolumeRelocationProperties(property.Value, options); continue; } + if (property.NameEquals("ransomwareProtection"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ransomwareProtection = RansomwareProtectionSettings.DeserializeRansomwareProtectionSettings(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new NetAppVolumeDataProtection(backup, replication, snapshot, volumeRelocation, serializedAdditionalRawData); + return new NetAppVolumeDataProtection( + backup, + replication, + snapshot, + volumeRelocation, + ransomwareProtection, + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeDataProtection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeDataProtection.cs index a61e8bcc90d6..756057461b00 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeDataProtection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeDataProtection.cs @@ -56,13 +56,15 @@ public NetAppVolumeDataProtection() /// Replication properties. /// Snapshot properties. /// VolumeRelocation properties. + /// Advanced Ransomware Protection settings. /// Keeps track of any properties unknown to the library. - internal NetAppVolumeDataProtection(NetAppVolumeBackupConfiguration backup, NetAppReplicationObject replication, VolumeSnapshotProperties snapshot, NetAppVolumeRelocationProperties volumeRelocation, IDictionary serializedAdditionalRawData) + internal NetAppVolumeDataProtection(NetAppVolumeBackupConfiguration backup, NetAppReplicationObject replication, VolumeSnapshotProperties snapshot, NetAppVolumeRelocationProperties volumeRelocation, RansomwareProtectionSettings ransomwareProtection, IDictionary serializedAdditionalRawData) { Backup = backup; Replication = replication; Snapshot = snapshot; VolumeRelocation = volumeRelocation; + RansomwareProtection = ransomwareProtection; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -86,5 +88,7 @@ public ResourceIdentifier SnapshotPolicyId /// VolumeRelocation properties. public NetAppVolumeRelocationProperties VolumeRelocation { get; set; } + /// Advanced Ransomware Protection settings. + public RansomwareProtectionSettings RansomwareProtection { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeGroupVolume.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeGroupVolume.Serialization.cs index 41621134bb57..71e9c8b18ee8 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeGroupVolume.Serialization.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeGroupVolume.Serialization.cs @@ -266,6 +266,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("ldapEnabled"u8); writer.WriteBooleanValue(IsLdapEnabled.Value); } + if (Optional.IsDefined(LdapServerType)) + { + writer.WritePropertyName("ldapServerType"u8); + writer.WriteStringValue(LdapServerType.Value.ToString()); + } if (Optional.IsDefined(IsCoolAccessEnabled)) { writer.WritePropertyName("coolAccess"u8); @@ -417,6 +422,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("isLargeVolume"u8); writer.WriteBooleanValue(IsLargeVolume.Value); } + if (Optional.IsDefined(LargeVolumeType)) + { + writer.WritePropertyName("largeVolumeType"u8); + writer.WriteStringValue(LargeVolumeType.Value.ToString()); + } if (options.Format != "W" && Optional.IsDefined(OriginatingResourceId)) { if (OriginatingResourceId != null) @@ -441,6 +451,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("inheritedSizeInBytes"); } } + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language.Value.ToString()); + } + if (Optional.IsDefined(BreakthroughMode)) + { + writer.WritePropertyName("breakthroughMode"u8); + writer.WriteStringValue(BreakthroughMode.Value.ToString()); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -517,6 +537,7 @@ internal static NetAppVolumeGroupVolume DeserializeNetAppVolumeGroupVolume(JsonE NetAppEncryptionKeySource? encryptionKeySource = default; ResourceIdentifier keyVaultPrivateEndpointResourceId = default; bool? ldapEnabled = default; + LdapServerType? ldapServerType = default; bool? coolAccess = default; int? coolnessPeriod = default; CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy = default; @@ -540,8 +561,11 @@ internal static NetAppVolumeGroupVolume DeserializeNetAppVolumeGroupVolume(JsonE EnableNetAppSubvolume? enableSubvolumes = default; string provisionedAvailabilityZone = default; bool? isLargeVolume = default; + LargeVolumeType? largeVolumeType = default; ResourceIdentifier originatingResourceId = default; long? inheritedSizeInBytes = default; + NetAppVolumeLanguage? language = default; + BreakthroughMode? breakthroughMode = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -893,6 +917,15 @@ internal static NetAppVolumeGroupVolume DeserializeNetAppVolumeGroupVolume(JsonE ldapEnabled = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("ldapServerType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ldapServerType = new LdapServerType(property0.Value.GetString()); + continue; + } if (property0.NameEquals("coolAccess"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -1108,6 +1141,15 @@ internal static NetAppVolumeGroupVolume DeserializeNetAppVolumeGroupVolume(JsonE isLargeVolume = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("largeVolumeType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + largeVolumeType = new LargeVolumeType(property0.Value.GetString()); + continue; + } if (property0.NameEquals("originatingResourceId"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -1128,6 +1170,24 @@ internal static NetAppVolumeGroupVolume DeserializeNetAppVolumeGroupVolume(JsonE inheritedSizeInBytes = property0.Value.GetInt64(); continue; } + if (property0.NameEquals("language"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + language = new NetAppVolumeLanguage(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("breakthroughMode"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + breakthroughMode = new BreakthroughMode(property0.Value.GetString()); + continue; + } } continue; } @@ -1176,6 +1236,7 @@ internal static NetAppVolumeGroupVolume DeserializeNetAppVolumeGroupVolume(JsonE encryptionKeySource, keyVaultPrivateEndpointResourceId, ldapEnabled, + ldapServerType, coolAccess, coolnessPeriod, coolAccessRetrievalPolicy, @@ -1199,8 +1260,11 @@ internal static NetAppVolumeGroupVolume DeserializeNetAppVolumeGroupVolume(JsonE enableSubvolumes, provisionedAvailabilityZone, isLargeVolume, + largeVolumeType, originatingResourceId, inheritedSizeInBytes, + language, + breakthroughMode, serializedAdditionalRawData); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeGroupVolume.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeGroupVolume.cs index 24eb72480f64..8d1701800902 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeGroupVolume.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeGroupVolume.cs @@ -48,7 +48,11 @@ public partial class NetAppVolumeGroupVolume /// Initializes a new instance of . /// A unique file path for the volume. Used when creating mount targets. - /// 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. + /// + /// 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. + /// For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples of 1 GiB. + /// /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. /// or is null. public NetAppVolumeGroupVolume(string creationToken, long usageThreshold, ResourceIdentifier subnetId) @@ -76,7 +80,11 @@ public NetAppVolumeGroupVolume(string creationToken, long usageThreshold, Resour /// Unique FileSystem Identifier. /// A unique file path for the volume. Used when creating mount targets. /// The service level of the file system. - /// 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. + /// + /// 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. + /// For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples of 1 GiB. + /// /// Set of export policy rules. /// Set of protocol types, default NFSv3, CIFS for SMB protocol. /// Azure lifecycle management. @@ -106,6 +114,7 @@ public NetAppVolumeGroupVolume(string creationToken, long usageThreshold, Resour /// Source of key used to encrypt data in volume. Applicable if NetApp account has encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault'. /// The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. /// Specifies whether LDAP is enabled or not for a given NFS volume. + /// Specifies the type of LDAP server for a given NFS volume. /// Specifies whether Cool Access(tiering) is enabled for the volume. /// Specifies the number of days after which data that is not accessed by clients will be tiered. /// @@ -134,10 +143,17 @@ public NetAppVolumeGroupVolume(string creationToken, long usageThreshold, Resour /// Flag indicating whether subvolume operations are enabled on the volume. /// The availability zone where the volume is provisioned. This refers to the logical availability zone where the volume resides. /// Specifies whether volume is a Large Volume or Regular Volume. + /// + /// 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. + /// /// Id of the snapshot or backup that the volume is restored from. /// Space shared by short term clone volume with parent volume in bytes. + /// Language supported for volume. + /// Specifies whether the volume operates in Breakthrough Mode. /// Keeps track of any properties unknown to the library. - internal NetAppVolumeGroupVolume(ResourceIdentifier id, string name, ResourceType? resourceType, IDictionary tags, IList zones, Guid? fileSystemId, string creationToken, NetAppFileServiceLevel? serviceLevel, long usageThreshold, VolumePropertiesExportPolicy exportPolicy, IList protocolTypes, string provisioningState, string snapshotId, bool? deleteBaseSnapshot, string backupId, string baremetalTenantId, ResourceIdentifier subnetId, NetAppNetworkFeature? networkFeatures, NetAppNetworkFeature? effectiveNetworkFeatures, Guid? networkSiblingSetId, NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity, IReadOnlyList mountTargets, string volumeType, NetAppVolumeDataProtection dataProtection, AcceptGrowCapacityPoolForShortTermCloneSplit? acceptGrowCapacityPoolForShortTermCloneSplit, bool? isRestoring, bool? isSnapshotDirectoryVisible, bool? isKerberosEnabled, NetAppVolumeSecurityStyle? securityStyle, bool? isSmbEncryptionEnabled, SmbAccessBasedEnumeration? smbAccessBasedEnumeration, SmbNonBrowsable? smbNonBrowsable, bool? isSmbContinuouslyAvailable, float? throughputMibps, float? actualThroughputMibps, NetAppEncryptionKeySource? encryptionKeySource, ResourceIdentifier keyVaultPrivateEndpointResourceId, bool? isLdapEnabled, bool? isCoolAccessEnabled, int? coolnessPeriod, CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy, CoolAccessTieringPolicy? coolAccessTieringPolicy, string unixPermissions, int? cloneProgress, NetAppFileAccessLog? fileAccessLogs, NetAppAvsDataStore? avsDataStore, IReadOnlyList dataStoreResourceId, bool? isDefaultQuotaEnabled, long? defaultUserQuotaInKiBs, long? defaultGroupQuotaInKiBs, long? maximumNumberOfFiles, string volumeGroupName, ResourceIdentifier capacityPoolResourceId, ResourceIdentifier proximityPlacementGroupId, string t2Network, string volumeSpecName, bool? isEncrypted, IList placementRules, EnableNetAppSubvolume? enableSubvolumes, string provisionedAvailabilityZone, bool? isLargeVolume, ResourceIdentifier originatingResourceId, long? inheritedSizeInBytes, IDictionary serializedAdditionalRawData) + internal NetAppVolumeGroupVolume(ResourceIdentifier id, string name, ResourceType? resourceType, IDictionary tags, IList zones, Guid? fileSystemId, string creationToken, NetAppFileServiceLevel? serviceLevel, long usageThreshold, VolumePropertiesExportPolicy exportPolicy, IList protocolTypes, string provisioningState, string snapshotId, bool? deleteBaseSnapshot, string backupId, string baremetalTenantId, ResourceIdentifier subnetId, NetAppNetworkFeature? networkFeatures, NetAppNetworkFeature? effectiveNetworkFeatures, Guid? networkSiblingSetId, NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity, IReadOnlyList mountTargets, string volumeType, NetAppVolumeDataProtection dataProtection, AcceptGrowCapacityPoolForShortTermCloneSplit? acceptGrowCapacityPoolForShortTermCloneSplit, bool? isRestoring, bool? isSnapshotDirectoryVisible, bool? isKerberosEnabled, NetAppVolumeSecurityStyle? securityStyle, bool? isSmbEncryptionEnabled, SmbAccessBasedEnumeration? smbAccessBasedEnumeration, SmbNonBrowsable? smbNonBrowsable, bool? isSmbContinuouslyAvailable, float? throughputMibps, float? actualThroughputMibps, NetAppEncryptionKeySource? encryptionKeySource, ResourceIdentifier keyVaultPrivateEndpointResourceId, bool? isLdapEnabled, LdapServerType? ldapServerType, bool? isCoolAccessEnabled, int? coolnessPeriod, CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy, CoolAccessTieringPolicy? coolAccessTieringPolicy, string unixPermissions, int? cloneProgress, NetAppFileAccessLog? fileAccessLogs, NetAppAvsDataStore? avsDataStore, IReadOnlyList dataStoreResourceId, bool? isDefaultQuotaEnabled, long? defaultUserQuotaInKiBs, long? defaultGroupQuotaInKiBs, long? maximumNumberOfFiles, string volumeGroupName, ResourceIdentifier capacityPoolResourceId, ResourceIdentifier proximityPlacementGroupId, string t2Network, string volumeSpecName, bool? isEncrypted, IList placementRules, EnableNetAppSubvolume? enableSubvolumes, string provisionedAvailabilityZone, bool? isLargeVolume, LargeVolumeType? largeVolumeType, ResourceIdentifier originatingResourceId, long? inheritedSizeInBytes, NetAppVolumeLanguage? language, BreakthroughMode? breakthroughMode, IDictionary serializedAdditionalRawData) { Id = id; Name = name; @@ -177,6 +193,7 @@ internal NetAppVolumeGroupVolume(ResourceIdentifier id, string name, ResourceTyp EncryptionKeySource = encryptionKeySource; KeyVaultPrivateEndpointResourceId = keyVaultPrivateEndpointResourceId; IsLdapEnabled = isLdapEnabled; + LdapServerType = ldapServerType; IsCoolAccessEnabled = isCoolAccessEnabled; CoolnessPeriod = coolnessPeriod; CoolAccessRetrievalPolicy = coolAccessRetrievalPolicy; @@ -200,8 +217,11 @@ internal NetAppVolumeGroupVolume(ResourceIdentifier id, string name, ResourceTyp EnableSubvolumes = enableSubvolumes; ProvisionedAvailabilityZone = provisionedAvailabilityZone; IsLargeVolume = isLargeVolume; + LargeVolumeType = largeVolumeType; OriginatingResourceId = originatingResourceId; InheritedSizeInBytes = inheritedSizeInBytes; + Language = language; + BreakthroughMode = breakthroughMode; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -226,7 +246,11 @@ internal NetAppVolumeGroupVolume() public string CreationToken { get; set; } /// The service level of the file system. public NetAppFileServiceLevel? ServiceLevel { get; set; } - /// 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. + /// + /// 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. + /// For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples of 1 GiB. + /// public long UsageThreshold { get; set; } /// Set of export policy rules. internal VolumePropertiesExportPolicy ExportPolicy { get; set; } @@ -295,6 +319,8 @@ public IList ExportRules public ResourceIdentifier KeyVaultPrivateEndpointResourceId { get; set; } /// Specifies whether LDAP is enabled or not for a given NFS volume. public bool? IsLdapEnabled { get; set; } + /// Specifies the type of LDAP server for a given NFS volume. + public LdapServerType? LdapServerType { get; set; } /// Specifies whether Cool Access(tiering) is enabled for the volume. public bool? IsCoolAccessEnabled { get; set; } /// Specifies the number of days after which data that is not accessed by clients will be tiered. @@ -346,9 +372,19 @@ public IList ExportRules public string ProvisionedAvailabilityZone { get; } /// Specifies whether volume is a Large Volume or Regular Volume. public bool? IsLargeVolume { get; set; } + /// + /// 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 LargeVolumeType? LargeVolumeType { get; set; } /// Id of the snapshot or backup that the volume is restored from. public ResourceIdentifier OriginatingResourceId { get; } /// Space shared by short term clone volume with parent volume in bytes. public long? InheritedSizeInBytes { get; } + /// Language supported for volume. + public NetAppVolumeLanguage? Language { get; set; } + /// Specifies whether the volume operates in Breakthrough Mode. + public BreakthroughMode? BreakthroughMode { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeLanguage.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeLanguage.cs new file mode 100644 index 000000000000..ef814a5f25eb --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeLanguage.cs @@ -0,0 +1,252 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Language supported for volume. + public readonly partial struct NetAppVolumeLanguage : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NetAppVolumeLanguage(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CUtf8Value = "c.utf-8"; + private const string Utf8Mb4Value = "utf8mb4"; + private const string ArValue = "ar"; + private const string ArUtf8Value = "ar.utf-8"; + private const string HrValue = "hr"; + private const string HrUtf8Value = "hr.utf-8"; + private const string CsValue = "cs"; + private const string CsUtf8Value = "cs.utf-8"; + private const string DaValue = "da"; + private const string DaUtf8Value = "da.utf-8"; + private const string NlValue = "nl"; + private const string NlUtf8Value = "nl.utf-8"; + private const string EnValue = "en"; + private const string EnUtf8Value = "en.utf-8"; + private const string FiValue = "fi"; + private const string FiUtf8Value = "fi.utf-8"; + private const string FrValue = "fr"; + private const string FrUtf8Value = "fr.utf-8"; + private const string DeValue = "de"; + private const string DeUtf8Value = "de.utf-8"; + private const string HeValue = "he"; + private const string HeUtf8Value = "he.utf-8"; + private const string HuValue = "hu"; + private const string HuUtf8Value = "hu.utf-8"; + private const string ItValue = "it"; + private const string ItUtf8Value = "it.utf-8"; + private const string JaValue = "ja"; + private const string JaUtf8Value = "ja.utf-8"; + private const string JaV1Value = "ja-v1"; + private const string JaV1Utf8Value = "ja-v1.utf-8"; + private const string JaJpPckValue = "ja-jp.pck"; + private const string JaJpPckUtf8Value = "ja-jp.pck.utf-8"; + private const string JaJp932Value = "ja-jp.932"; + private const string JaJp932Utf8Value = "ja-jp.932.utf-8"; + private const string JaJpPckV2Value = "ja-jp.pck-v2"; + private const string JaJpPckV2Utf8Value = "ja-jp.pck-v2.utf-8"; + private const string KoValue = "ko"; + private const string KoUtf8Value = "ko.utf-8"; + private const string NoValue = "no"; + private const string NoUtf8Value = "no.utf-8"; + private const string PlValue = "pl"; + private const string PlUtf8Value = "pl.utf-8"; + private const string PtValue = "pt"; + private const string PtUtf8Value = "pt.utf-8"; + private const string CValue = "c"; + private const string RoValue = "ro"; + private const string RoUtf8Value = "ro.utf-8"; + private const string RuValue = "ru"; + private const string RuUtf8Value = "ru.utf-8"; + private const string ZhValue = "zh"; + private const string ZhUtf8Value = "zh.utf-8"; + private const string ZhGbkValue = "zh.gbk"; + private const string ZhGbkUtf8Value = "zh.gbk.utf-8"; + private const string ZhTwBig5Value = "zh-tw.big5"; + private const string ZhTwBig5Utf8Value = "zh-tw.big5.utf-8"; + private const string ZhTwValue = "zh-tw"; + private const string ZhTwUtf8Value = "zh-tw.utf-8"; + private const string SkValue = "sk"; + private const string SkUtf8Value = "sk.utf-8"; + private const string SlValue = "sl"; + private const string SlUtf8Value = "sl.utf-8"; + private const string EsValue = "es"; + private const string EsUtf8Value = "es.utf-8"; + private const string SvValue = "sv"; + private const string SvUtf8Value = "sv.utf-8"; + private const string TrValue = "tr"; + private const string TrUtf8Value = "tr.utf-8"; + private const string EnUsValue = "en-us"; + private const string EnUsUtf8Value = "en-us.utf-8"; + + /// Posix with UTF-8. + public static NetAppVolumeLanguage CUtf8 { get; } = new NetAppVolumeLanguage(CUtf8Value); + /// UTF-8 with 4 byte character support. + public static NetAppVolumeLanguage Utf8Mb4 { get; } = new NetAppVolumeLanguage(Utf8Mb4Value); + /// Arabic - Deprecated. + public static NetAppVolumeLanguage Ar { get; } = new NetAppVolumeLanguage(ArValue); + /// Arabic with UTF-8. + public static NetAppVolumeLanguage ArUtf8 { get; } = new NetAppVolumeLanguage(ArUtf8Value); + /// Croatian - Deprecated. + public static NetAppVolumeLanguage Hr { get; } = new NetAppVolumeLanguage(HrValue); + /// Croatian with UTF-8. + public static NetAppVolumeLanguage HrUtf8 { get; } = new NetAppVolumeLanguage(HrUtf8Value); + /// Czech - Deprecated. + public static NetAppVolumeLanguage Cs { get; } = new NetAppVolumeLanguage(CsValue); + /// Czech with UTF-8. + public static NetAppVolumeLanguage CsUtf8 { get; } = new NetAppVolumeLanguage(CsUtf8Value); + /// Danish - Deprecated. + public static NetAppVolumeLanguage Da { get; } = new NetAppVolumeLanguage(DaValue); + /// Danish with UTF-8. + public static NetAppVolumeLanguage DaUtf8 { get; } = new NetAppVolumeLanguage(DaUtf8Value); + /// Dutch - Deprecated. + public static NetAppVolumeLanguage Nl { get; } = new NetAppVolumeLanguage(NlValue); + /// Dutch with UTF-8. + public static NetAppVolumeLanguage NlUtf8 { get; } = new NetAppVolumeLanguage(NlUtf8Value); + /// English - Deprecated. + public static NetAppVolumeLanguage En { get; } = new NetAppVolumeLanguage(EnValue); + /// English with UTF-8. + public static NetAppVolumeLanguage EnUtf8 { get; } = new NetAppVolumeLanguage(EnUtf8Value); + /// Finnish - Deprecated. + public static NetAppVolumeLanguage Fi { get; } = new NetAppVolumeLanguage(FiValue); + /// Finnish with UTF-8. + public static NetAppVolumeLanguage FiUtf8 { get; } = new NetAppVolumeLanguage(FiUtf8Value); + /// French - Deprecated. + public static NetAppVolumeLanguage Fr { get; } = new NetAppVolumeLanguage(FrValue); + /// French with UTF-8. + public static NetAppVolumeLanguage FrUtf8 { get; } = new NetAppVolumeLanguage(FrUtf8Value); + /// German - Deprecated. + public static NetAppVolumeLanguage De { get; } = new NetAppVolumeLanguage(DeValue); + /// German with UTF-8. + public static NetAppVolumeLanguage DeUtf8 { get; } = new NetAppVolumeLanguage(DeUtf8Value); + /// Hebrew - Deprecated. + public static NetAppVolumeLanguage He { get; } = new NetAppVolumeLanguage(HeValue); + /// Hebrew with UTF-8. + public static NetAppVolumeLanguage HeUtf8 { get; } = new NetAppVolumeLanguage(HeUtf8Value); + /// Hungarian - Deprecated. + public static NetAppVolumeLanguage Hu { get; } = new NetAppVolumeLanguage(HuValue); + /// Hungarian with UTF-8. + public static NetAppVolumeLanguage HuUtf8 { get; } = new NetAppVolumeLanguage(HuUtf8Value); + /// Italian - Deprecated. + public static NetAppVolumeLanguage It { get; } = new NetAppVolumeLanguage(ItValue); + /// Italian with UTF-8. + public static NetAppVolumeLanguage ItUtf8 { get; } = new NetAppVolumeLanguage(ItUtf8Value); + /// Japanese euc-j - Deprecated. + public static NetAppVolumeLanguage Ja { get; } = new NetAppVolumeLanguage(JaValue); + /// Japanese euc-j with UTF-8. + public static NetAppVolumeLanguage JaUtf8 { get; } = new NetAppVolumeLanguage(JaUtf8Value); + /// Japanese euc-j - Deprecated. + public static NetAppVolumeLanguage JaV1 { get; } = new NetAppVolumeLanguage(JaV1Value); + /// Japanese euc-j with UTF-8. + public static NetAppVolumeLanguage JaV1Utf8 { get; } = new NetAppVolumeLanguage(JaV1Utf8Value); + /// Japanese pck. + public static NetAppVolumeLanguage JaJpPck { get; } = new NetAppVolumeLanguage(JaJpPckValue); + /// Japanese pck with UTF-8 - Deprecated. + public static NetAppVolumeLanguage JaJpPckUtf8 { get; } = new NetAppVolumeLanguage(JaJpPckUtf8Value); + /// Japanese cp932. + public static NetAppVolumeLanguage JaJp932 { get; } = new NetAppVolumeLanguage(JaJp932Value); + /// Japanese cp932 with UTF-8 - Deprecated. + public static NetAppVolumeLanguage JaJp932Utf8 { get; } = new NetAppVolumeLanguage(JaJp932Utf8Value); + /// Japanese pck - sjis. + public static NetAppVolumeLanguage JaJpPckV2 { get; } = new NetAppVolumeLanguage(JaJpPckV2Value); + /// Japanese pck - sjis with UTF-8 - Deprecated. + public static NetAppVolumeLanguage JaJpPckV2Utf8 { get; } = new NetAppVolumeLanguage(JaJpPckV2Utf8Value); + /// Korean - Deprecated. + public static NetAppVolumeLanguage Ko { get; } = new NetAppVolumeLanguage(KoValue); + /// Korean with UTF-8. + public static NetAppVolumeLanguage KoUtf8 { get; } = new NetAppVolumeLanguage(KoUtf8Value); + /// Norwegian - Deprecated. + public static NetAppVolumeLanguage No { get; } = new NetAppVolumeLanguage(NoValue); + /// Norwegian with UTF-8. + public static NetAppVolumeLanguage NoUtf8 { get; } = new NetAppVolumeLanguage(NoUtf8Value); + /// Polish - Deprecated. + public static NetAppVolumeLanguage Pl { get; } = new NetAppVolumeLanguage(PlValue); + /// Polish with UTF-8. + public static NetAppVolumeLanguage PlUtf8 { get; } = new NetAppVolumeLanguage(PlUtf8Value); + /// Portuguese - Deprecated. + public static NetAppVolumeLanguage Pt { get; } = new NetAppVolumeLanguage(PtValue); + /// Portuguese with UTF-8. + public static NetAppVolumeLanguage PtUtf8 { get; } = new NetAppVolumeLanguage(PtUtf8Value); + /// Posix - Deprecated. + public static NetAppVolumeLanguage C { get; } = new NetAppVolumeLanguage(CValue); + /// Romanian - Deprecated. + public static NetAppVolumeLanguage Ro { get; } = new NetAppVolumeLanguage(RoValue); + /// Romanian with UTF-8. + public static NetAppVolumeLanguage RoUtf8 { get; } = new NetAppVolumeLanguage(RoUtf8Value); + /// Russian - Deprecated. + public static NetAppVolumeLanguage Ru { get; } = new NetAppVolumeLanguage(RuValue); + /// Russian with UTF-8. + public static NetAppVolumeLanguage RuUtf8 { get; } = new NetAppVolumeLanguage(RuUtf8Value); + /// Simplified Chinese - Deprecated. + public static NetAppVolumeLanguage Zh { get; } = new NetAppVolumeLanguage(ZhValue); + /// Simplified Chinese with UTF-8. + public static NetAppVolumeLanguage ZhUtf8 { get; } = new NetAppVolumeLanguage(ZhUtf8Value); + /// Simplified gbk Chinese. + public static NetAppVolumeLanguage ZhGbk { get; } = new NetAppVolumeLanguage(ZhGbkValue); + /// Simplified gbk Chinese with UTF-8 - Deprecated. + public static NetAppVolumeLanguage ZhGbkUtf8 { get; } = new NetAppVolumeLanguage(ZhGbkUtf8Value); + /// Traditional Chinese BIG 5. + public static NetAppVolumeLanguage ZhTwBig5 { get; } = new NetAppVolumeLanguage(ZhTwBig5Value); + /// Traditional Chinese BIG 5 with UTF-8 - Deprecated. + public static NetAppVolumeLanguage ZhTwBig5Utf8 { get; } = new NetAppVolumeLanguage(ZhTwBig5Utf8Value); + /// Traditional Chinese EUC-TW. + public static NetAppVolumeLanguage ZhTw { get; } = new NetAppVolumeLanguage(ZhTwValue); + /// Traditional Chinese EUC-TW with UTF-8 - Deprecated. + public static NetAppVolumeLanguage ZhTwUtf8 { get; } = new NetAppVolumeLanguage(ZhTwUtf8Value); + /// Slovak - Deprecated. + public static NetAppVolumeLanguage Sk { get; } = new NetAppVolumeLanguage(SkValue); + /// Slovak with UTF-8. + public static NetAppVolumeLanguage SkUtf8 { get; } = new NetAppVolumeLanguage(SkUtf8Value); + /// Slovenian - Deprecated. + public static NetAppVolumeLanguage Sl { get; } = new NetAppVolumeLanguage(SlValue); + /// Slovenian with UTF-8. + public static NetAppVolumeLanguage SlUtf8 { get; } = new NetAppVolumeLanguage(SlUtf8Value); + /// Spanish - Deprecated. + public static NetAppVolumeLanguage Es { get; } = new NetAppVolumeLanguage(EsValue); + /// Spanish with UTF-8. + public static NetAppVolumeLanguage EsUtf8 { get; } = new NetAppVolumeLanguage(EsUtf8Value); + /// Swedish - Deprecated. + public static NetAppVolumeLanguage Sv { get; } = new NetAppVolumeLanguage(SvValue); + /// Swedish with UTF-8. + public static NetAppVolumeLanguage SvUtf8 { get; } = new NetAppVolumeLanguage(SvUtf8Value); + /// Turkish - Deprecated. + public static NetAppVolumeLanguage Tr { get; } = new NetAppVolumeLanguage(TrValue); + /// Turkish with UTF-8. + public static NetAppVolumeLanguage TrUtf8 { get; } = new NetAppVolumeLanguage(TrUtf8Value); + /// US English - Deprecated. + public static NetAppVolumeLanguage EnUs { get; } = new NetAppVolumeLanguage(EnUsValue); + /// US English with UTF-8. + public static NetAppVolumeLanguage EnUsUtf8 { get; } = new NetAppVolumeLanguage(EnUsUtf8Value); + /// Determines if two values are the same. + public static bool operator ==(NetAppVolumeLanguage left, NetAppVolumeLanguage right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NetAppVolumeLanguage left, NetAppVolumeLanguage right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator NetAppVolumeLanguage(string value) => new NetAppVolumeLanguage(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NetAppVolumeLanguage other && Equals(other); + /// + public bool Equals(NetAppVolumeLanguage other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumePatch.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumePatch.cs index d810c70b3642..fc3643680619 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumePatch.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumePatch.cs @@ -62,7 +62,11 @@ public NetAppVolumePatch(AzureLocation location) : base(location) /// The tags. /// The location. /// The service level of the file system. - /// 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. + /// + /// 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. + /// For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples of 1 GiB. + /// /// Set of export policy rules. /// Set of protocol types, default NFSv3, CIFS for SMB protocol. /// Maximum throughput in MiB/s that can be achieved by this volume and this will be accepted as input only for manual qosType volume. @@ -113,7 +117,11 @@ internal NetAppVolumePatch() /// The service level of the file system. public NetAppFileServiceLevel? ServiceLevel { get; set; } - /// 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. + /// + /// 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. + /// For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples of 1 GiB. + /// public long? UsageThreshold { get; set; } /// Set of export policy rules. internal VolumePatchPropertiesExportPolicy ExportPolicy { get; set; } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumePatchDataProtection.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumePatchDataProtection.Serialization.cs index 0312918dae21..3f18315e17dc 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumePatchDataProtection.Serialization.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumePatchDataProtection.Serialization.cs @@ -44,6 +44,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("snapshot"u8); writer.WriteObjectValue(Snapshot, options); } + if (Optional.IsDefined(RansomwareProtection)) + { + writer.WritePropertyName("ransomwareProtection"u8); + writer.WriteObjectValue(RansomwareProtection, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -83,6 +88,7 @@ internal static NetAppVolumePatchDataProtection DeserializeNetAppVolumePatchData } NetAppVolumeBackupConfiguration backup = default; VolumeSnapshotProperties snapshot = default; + RansomwareProtectionPatchSettings ransomwareProtection = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -105,13 +111,22 @@ internal static NetAppVolumePatchDataProtection DeserializeNetAppVolumePatchData snapshot = VolumeSnapshotProperties.DeserializeVolumeSnapshotProperties(property.Value, options); continue; } + if (property.NameEquals("ransomwareProtection"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ransomwareProtection = RansomwareProtectionPatchSettings.DeserializeRansomwareProtectionPatchSettings(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new NetAppVolumePatchDataProtection(backup, snapshot, serializedAdditionalRawData); + return new NetAppVolumePatchDataProtection(backup, snapshot, ransomwareProtection, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumePatchDataProtection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumePatchDataProtection.cs index 7e16cbc108a4..6662ec04785f 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumePatchDataProtection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumePatchDataProtection.cs @@ -54,11 +54,13 @@ public NetAppVolumePatchDataProtection() /// Initializes a new instance of . /// Backup Properties. /// Snapshot properties. + /// Advanced Ransomware Protection updatable settings. /// Keeps track of any properties unknown to the library. - internal NetAppVolumePatchDataProtection(NetAppVolumeBackupConfiguration backup, VolumeSnapshotProperties snapshot, IDictionary serializedAdditionalRawData) + internal NetAppVolumePatchDataProtection(NetAppVolumeBackupConfiguration backup, VolumeSnapshotProperties snapshot, RansomwareProtectionPatchSettings ransomwareProtection, IDictionary serializedAdditionalRawData) { Backup = backup; Snapshot = snapshot; + RansomwareProtection = ransomwareProtection; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -77,5 +79,19 @@ public ResourceIdentifier SnapshotPolicyId Snapshot.SnapshotPolicyId = value; } } + + /// Advanced Ransomware Protection updatable settings. + internal RansomwareProtectionPatchSettings RansomwareProtection { get; set; } + /// The desired value of the ARP feature state available to the volume. + public DesiredRansomwareProtectionState? DesiredRansomwareProtectionState + { + get => RansomwareProtection is null ? default : RansomwareProtection.DesiredRansomwareProtectionState; + set + { + if (RansomwareProtection is null) + RansomwareProtection = new RansomwareProtectionPatchSettings(); + RansomwareProtection.DesiredRansomwareProtectionState = value; + } + } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeQuotaReport.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeQuotaReport.Serialization.cs new file mode 100644 index 000000000000..85434db3d87c --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeQuotaReport.Serialization.cs @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class NetAppVolumeQuotaReport : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetAppVolumeQuotaReport)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(QuotaType)) + { + writer.WritePropertyName("quotaType"u8); + writer.WriteStringValue(QuotaType.Value.ToString()); + } + if (Optional.IsDefined(QuotaTarget)) + { + writer.WritePropertyName("quotaTarget"u8); + writer.WriteStringValue(QuotaTarget); + } + if (Optional.IsDefined(QuotaLimitUsedInKiBs)) + { + writer.WritePropertyName("quotaLimitUsedInKiBs"u8); + writer.WriteNumberValue(QuotaLimitUsedInKiBs.Value); + } + if (Optional.IsDefined(QuotaLimitTotalInKiBs)) + { + writer.WritePropertyName("quotaLimitTotalInKiBs"u8); + writer.WriteNumberValue(QuotaLimitTotalInKiBs.Value); + } + if (Optional.IsDefined(PercentageUsed)) + { + writer.WritePropertyName("percentageUsed"u8); + writer.WriteNumberValue(PercentageUsed.Value); + } + if (Optional.IsDefined(IsDerivedQuota)) + { + writer.WritePropertyName("isDerivedQuota"u8); + writer.WriteBooleanValue(IsDerivedQuota.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NetAppVolumeQuotaReport IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetAppVolumeQuotaReport)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetAppVolumeQuotaReport(document.RootElement, options); + } + + internal static NetAppVolumeQuotaReport DeserializeNetAppVolumeQuotaReport(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NetAppVolumeQuotaType? quotaType = default; + string quotaTarget = default; + long? quotaLimitUsedInKiBs = default; + long? quotaLimitTotalInKiBs = default; + float? percentageUsed = default; + bool? isDerivedQuota = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("quotaType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + quotaType = new NetAppVolumeQuotaType(property.Value.GetString()); + continue; + } + if (property.NameEquals("quotaTarget"u8)) + { + quotaTarget = property.Value.GetString(); + continue; + } + if (property.NameEquals("quotaLimitUsedInKiBs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + quotaLimitUsedInKiBs = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("quotaLimitTotalInKiBs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + quotaLimitTotalInKiBs = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("percentageUsed"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + percentageUsed = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("isDerivedQuota"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isDerivedQuota = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetAppVolumeQuotaReport( + quotaType, + quotaTarget, + quotaLimitUsedInKiBs, + quotaLimitTotalInKiBs, + percentageUsed, + isDerivedQuota, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(NetAppVolumeQuotaReport)} does not support writing '{options.Format}' format."); + } + } + + NetAppVolumeQuotaReport IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNetAppVolumeQuotaReport(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetAppVolumeQuotaReport)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeQuotaReport.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeQuotaReport.cs new file mode 100644 index 000000000000..ce36162cbb06 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeQuotaReport.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Quota report record properties. + public partial class NetAppVolumeQuotaReport + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal NetAppVolumeQuotaReport() + { + } + + /// Initializes a new instance of . + /// Type of quota. + /// 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>. + /// Specifies the current usage in kibibytes for the user/group quota. + /// Specifies the total size limit in kibibytes for the user/group quota. + /// Percentage of used size compared to total size. + /// Flag to indicate whether the quota is derived from default quota. + /// Keeps track of any properties unknown to the library. + internal NetAppVolumeQuotaReport(NetAppVolumeQuotaType? quotaType, string quotaTarget, long? quotaLimitUsedInKiBs, long? quotaLimitTotalInKiBs, float? percentageUsed, bool? isDerivedQuota, IDictionary serializedAdditionalRawData) + { + QuotaType = quotaType; + QuotaTarget = quotaTarget; + QuotaLimitUsedInKiBs = quotaLimitUsedInKiBs; + QuotaLimitTotalInKiBs = quotaLimitTotalInKiBs; + PercentageUsed = percentageUsed; + IsDerivedQuota = isDerivedQuota; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Type of quota. + public NetAppVolumeQuotaType? QuotaType { get; } + /// 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>. + public string QuotaTarget { get; } + /// Specifies the current usage in kibibytes for the user/group quota. + public long? QuotaLimitUsedInKiBs { get; } + /// Specifies the total size limit in kibibytes for the user/group quota. + public long? QuotaLimitTotalInKiBs { get; } + /// Percentage of used size compared to total size. + public float? PercentageUsed { get; } + /// Flag to indicate whether the quota is derived from default quota. + public bool? IsDerivedQuota { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeQuotaReportListResult.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeQuotaReportListResult.Serialization.cs new file mode 100644 index 000000000000..a4d5ac234858 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeQuotaReportListResult.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class NetAppVolumeQuotaReportListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetAppVolumeQuotaReportListResult)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NetAppVolumeQuotaReportListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetAppVolumeQuotaReportListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetAppVolumeQuotaReportListResult(document.RootElement, options); + } + + internal static NetAppVolumeQuotaReportListResult DeserializeNetAppVolumeQuotaReportListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NetAppVolumeQuotaReport.DeserializeNetAppVolumeQuotaReport(item, options)); + } + value = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetAppVolumeQuotaReportListResult(value ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(NetAppVolumeQuotaReportListResult)} does not support writing '{options.Format}' format."); + } + } + + NetAppVolumeQuotaReportListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNetAppVolumeQuotaReportListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetAppVolumeQuotaReportListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeQuotaReportListResult.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeQuotaReportListResult.cs new file mode 100644 index 000000000000..a844600581ac --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NetAppVolumeQuotaReportListResult.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Quota Report for volume. + public partial class NetAppVolumeQuotaReportListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal NetAppVolumeQuotaReportListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// List of quota reports. + /// Keeps track of any properties unknown to the library. + internal NetAppVolumeQuotaReportListResult(IReadOnlyList value, IDictionary serializedAdditionalRawData) + { + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// List of quota reports. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NicInfo.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NicInfo.cs index f134a4c5b41c..7de550af10b5 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NicInfo.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/NicInfo.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.NetApp.Models { - /// NIC information and list of volumes for which the NIC has the primary mount ip address. + /// NIC information and list of volumes for which the NIC has the primary mount IP Address. public partial class NicInfo { /// @@ -53,7 +53,7 @@ internal NicInfo() } /// Initializes a new instance of . - /// ipAddress. + /// IP Address. /// Volume resource Ids. /// Keeps track of any properties unknown to the library. internal NicInfo(string ipAddress, IReadOnlyList volumeResourceIds, IDictionary serializedAdditionalRawData) @@ -63,7 +63,7 @@ internal NicInfo(string ipAddress, IReadOnlyList volumeResou _serializedAdditionalRawData = serializedAdditionalRawData; } - /// ipAddress. + /// IP Address. public string IPAddress { get; } /// Volume resource Ids. public IReadOnlyList VolumeResourceIds { get; } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/OriginClusterInformation.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/OriginClusterInformation.Serialization.cs new file mode 100644 index 000000000000..f76a7739dcf6 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/OriginClusterInformation.Serialization.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class OriginClusterInformation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OriginClusterInformation)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("peerClusterName"u8); + writer.WriteStringValue(PeerClusterName); + writer.WritePropertyName("peerAddresses"u8); + writer.WriteStartArray(); + foreach (var item in PeerAddresses) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("peerVserverName"u8); + writer.WriteStringValue(PeerVserverName); + writer.WritePropertyName("peerVolumeName"u8); + writer.WriteStringValue(PeerVolumeName); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OriginClusterInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OriginClusterInformation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOriginClusterInformation(document.RootElement, options); + } + + internal static OriginClusterInformation DeserializeOriginClusterInformation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string peerClusterName = default; + IList peerAddresses = default; + string peerVserverName = default; + string peerVolumeName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("peerClusterName"u8)) + { + peerClusterName = property.Value.GetString(); + continue; + } + if (property.NameEquals("peerAddresses"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + peerAddresses = array; + continue; + } + if (property.NameEquals("peerVserverName"u8)) + { + peerVserverName = property.Value.GetString(); + continue; + } + if (property.NameEquals("peerVolumeName"u8)) + { + peerVolumeName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OriginClusterInformation(peerClusterName, peerAddresses, peerVserverName, peerVolumeName, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(OriginClusterInformation)} does not support writing '{options.Format}' format."); + } + } + + OriginClusterInformation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeOriginClusterInformation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OriginClusterInformation)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/OriginClusterInformation.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/OriginClusterInformation.cs new file mode 100644 index 000000000000..dc3f47b542d4 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/OriginClusterInformation.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Stores the origin cluster information associated to a cache. + public partial class OriginClusterInformation + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// ONTAP cluster name of external cluster hosting the origin volume. + /// ONTAP Intercluster LIF IP addresses. One IP address per cluster node is required. + /// External Vserver (SVM) name name of the SVM hosting the origin volume. + /// External origin volume name associated to this cache. + /// , , or is null. + public OriginClusterInformation(string peerClusterName, IEnumerable peerAddresses, string peerVserverName, string peerVolumeName) + { + Argument.AssertNotNull(peerClusterName, nameof(peerClusterName)); + Argument.AssertNotNull(peerAddresses, nameof(peerAddresses)); + Argument.AssertNotNull(peerVserverName, nameof(peerVserverName)); + Argument.AssertNotNull(peerVolumeName, nameof(peerVolumeName)); + + PeerClusterName = peerClusterName; + PeerAddresses = peerAddresses.ToList(); + PeerVserverName = peerVserverName; + PeerVolumeName = peerVolumeName; + } + + /// Initializes a new instance of . + /// ONTAP cluster name of external cluster hosting the origin volume. + /// ONTAP Intercluster LIF IP addresses. One IP address per cluster node is required. + /// External Vserver (SVM) name name of the SVM hosting the origin volume. + /// External origin volume name associated to this cache. + /// Keeps track of any properties unknown to the library. + internal OriginClusterInformation(string peerClusterName, IList peerAddresses, string peerVserverName, string peerVolumeName, IDictionary serializedAdditionalRawData) + { + PeerClusterName = peerClusterName; + PeerAddresses = peerAddresses; + PeerVserverName = peerVserverName; + PeerVolumeName = peerVolumeName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal OriginClusterInformation() + { + } + + /// ONTAP cluster name of external cluster hosting the origin volume. + public string PeerClusterName { get; set; } + /// ONTAP Intercluster LIF IP addresses. One IP address per cluster node is required. + public IList PeerAddresses { get; } + /// External Vserver (SVM) name name of the SVM hosting the origin volume. + public string PeerVserverName { get; set; } + /// External origin volume name associated to this cache. + public string PeerVolumeName { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/PeeringPassphrases.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/PeeringPassphrases.Serialization.cs new file mode 100644 index 000000000000..f5170f40f76d --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/PeeringPassphrases.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class PeeringPassphrases : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PeeringPassphrases)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("clusterPeeringCommand"u8); + writer.WriteStringValue(ClusterPeeringCommand); + writer.WritePropertyName("clusterPeeringPassphrase"u8); + writer.WriteStringValue(ClusterPeeringPassphrase); + writer.WritePropertyName("vserverPeeringCommand"u8); + writer.WriteStringValue(VserverPeeringCommand); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PeeringPassphrases IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PeeringPassphrases)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePeeringPassphrases(document.RootElement, options); + } + + internal static PeeringPassphrases DeserializePeeringPassphrases(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string clusterPeeringCommand = default; + string clusterPeeringPassphrase = default; + string vserverPeeringCommand = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("clusterPeeringCommand"u8)) + { + clusterPeeringCommand = property.Value.GetString(); + continue; + } + if (property.NameEquals("clusterPeeringPassphrase"u8)) + { + clusterPeeringPassphrase = property.Value.GetString(); + continue; + } + if (property.NameEquals("vserverPeeringCommand"u8)) + { + vserverPeeringCommand = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PeeringPassphrases(clusterPeeringCommand, clusterPeeringPassphrase, vserverPeeringCommand, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(PeeringPassphrases)} does not support writing '{options.Format}' format."); + } + } + + PeeringPassphrases IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePeeringPassphrases(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PeeringPassphrases)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/PeeringPassphrases.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/PeeringPassphrases.cs new file mode 100644 index 000000000000..79a67a952c1f --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/PeeringPassphrases.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// The response containing peering passphrases and commands for cluster and vserver peering. + public partial class PeeringPassphrases + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The cluster peering command. + /// The cluster peering passphrase. + /// The vserver peering command. + /// , or is null. + internal PeeringPassphrases(string clusterPeeringCommand, string clusterPeeringPassphrase, string vserverPeeringCommand) + { + Argument.AssertNotNull(clusterPeeringCommand, nameof(clusterPeeringCommand)); + Argument.AssertNotNull(clusterPeeringPassphrase, nameof(clusterPeeringPassphrase)); + Argument.AssertNotNull(vserverPeeringCommand, nameof(vserverPeeringCommand)); + + ClusterPeeringCommand = clusterPeeringCommand; + ClusterPeeringPassphrase = clusterPeeringPassphrase; + VserverPeeringCommand = vserverPeeringCommand; + } + + /// Initializes a new instance of . + /// The cluster peering command. + /// The cluster peering passphrase. + /// The vserver peering command. + /// Keeps track of any properties unknown to the library. + internal PeeringPassphrases(string clusterPeeringCommand, string clusterPeeringPassphrase, string vserverPeeringCommand, IDictionary serializedAdditionalRawData) + { + ClusterPeeringCommand = clusterPeeringCommand; + ClusterPeeringPassphrase = clusterPeeringPassphrase; + VserverPeeringCommand = vserverPeeringCommand; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PeeringPassphrases() + { + } + + /// The cluster peering command. + public string ClusterPeeringCommand { get; } + /// The cluster peering passphrase. + public string ClusterPeeringPassphrase { get; } + /// The vserver peering command. + public string VserverPeeringCommand { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/PolicyStatus.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/PolicyStatus.cs new file mode 100644 index 000000000000..820582492475 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/PolicyStatus.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Policy status. + public readonly partial struct PolicyStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PolicyStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Value indicating the policy is enabled. + public static PolicyStatus Enabled { get; } = new PolicyStatus(EnabledValue); + /// Value indicating the policy is disabled. + public static PolicyStatus Disabled { get; } = new PolicyStatus(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(PolicyStatus left, PolicyStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PolicyStatus left, PolicyStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PolicyStatus(string value) => new PolicyStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PolicyStatus other && Equals(other); + /// + public bool Equals(PolicyStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ProtocolType.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ProtocolType.cs new file mode 100644 index 000000000000..70817cb5f40d --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/ProtocolType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Export policy rule. + public readonly partial struct ProtocolType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProtocolType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NFSv3Value = "NFSv3"; + private const string NFSv4Value = "NFSv4"; + private const string SMBValue = "SMB"; + + /// NFSv3 protocol type. + public static ProtocolType NFSv3 { get; } = new ProtocolType(NFSv3Value); + /// NFSv4 protocol type. + public static ProtocolType NFSv4 { get; } = new ProtocolType(NFSv4Value); + /// SMB protocol type. + public static ProtocolType SMB { get; } = new ProtocolType(SMBValue); + /// Determines if two values are the same. + public static bool operator ==(ProtocolType left, ProtocolType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProtocolType left, ProtocolType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ProtocolType(string value) => new ProtocolType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProtocolType other && Equals(other); + /// + public bool Equals(ProtocolType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareProtectionPatchSettings.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareProtectionPatchSettings.Serialization.cs new file mode 100644 index 000000000000..9fee295d58d6 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareProtectionPatchSettings.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + internal partial class RansomwareProtectionPatchSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RansomwareProtectionPatchSettings)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(DesiredRansomwareProtectionState)) + { + writer.WritePropertyName("desiredRansomwareProtectionState"u8); + writer.WriteStringValue(DesiredRansomwareProtectionState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RansomwareProtectionPatchSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RansomwareProtectionPatchSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRansomwareProtectionPatchSettings(document.RootElement, options); + } + + internal static RansomwareProtectionPatchSettings DeserializeRansomwareProtectionPatchSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DesiredRansomwareProtectionState? desiredRansomwareProtectionState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("desiredRansomwareProtectionState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + desiredRansomwareProtectionState = new DesiredRansomwareProtectionState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RansomwareProtectionPatchSettings(desiredRansomwareProtectionState, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(RansomwareProtectionPatchSettings)} does not support writing '{options.Format}' format."); + } + } + + RansomwareProtectionPatchSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRansomwareProtectionPatchSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RansomwareProtectionPatchSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareProtectionPatchSettings.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareProtectionPatchSettings.cs new file mode 100644 index 000000000000..6620829d0f86 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareProtectionPatchSettings.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Advanced Ransomware Protection reports (ARP) updatable settings. + internal partial class RansomwareProtectionPatchSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public RansomwareProtectionPatchSettings() + { + } + + /// Initializes a new instance of . + /// The desired value of the ARP feature state available to the volume. + /// Keeps track of any properties unknown to the library. + internal RansomwareProtectionPatchSettings(DesiredRansomwareProtectionState? desiredRansomwareProtectionState, IDictionary serializedAdditionalRawData) + { + DesiredRansomwareProtectionState = desiredRansomwareProtectionState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The desired value of the ARP feature state available to the volume. + public DesiredRansomwareProtectionState? DesiredRansomwareProtectionState { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareProtectionSettings.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareProtectionSettings.Serialization.cs new file mode 100644 index 000000000000..0d3d6f6533a4 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareProtectionSettings.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class RansomwareProtectionSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RansomwareProtectionSettings)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(DesiredRansomwareProtectionState)) + { + writer.WritePropertyName("desiredRansomwareProtectionState"u8); + writer.WriteStringValue(DesiredRansomwareProtectionState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ActualRansomwareProtectionState)) + { + writer.WritePropertyName("actualRansomwareProtectionState"u8); + writer.WriteStringValue(ActualRansomwareProtectionState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RansomwareProtectionSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RansomwareProtectionSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRansomwareProtectionSettings(document.RootElement, options); + } + + internal static RansomwareProtectionSettings DeserializeRansomwareProtectionSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DesiredRansomwareProtectionState? desiredRansomwareProtectionState = default; + ActualRansomwareProtectionState? actualRansomwareProtectionState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("desiredRansomwareProtectionState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + desiredRansomwareProtectionState = new DesiredRansomwareProtectionState(property.Value.GetString()); + continue; + } + if (property.NameEquals("actualRansomwareProtectionState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + actualRansomwareProtectionState = new ActualRansomwareProtectionState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RansomwareProtectionSettings(desiredRansomwareProtectionState, actualRansomwareProtectionState, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(RansomwareProtectionSettings)} does not support writing '{options.Format}' format."); + } + } + + RansomwareProtectionSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRansomwareProtectionSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RansomwareProtectionSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareProtectionSettings.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareProtectionSettings.cs new file mode 100644 index 000000000000..3dcd980db25e --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareProtectionSettings.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Advanced Ransomware Protection reports (ARP) settings. + public partial class RansomwareProtectionSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public RansomwareProtectionSettings() + { + } + + /// Initializes a new instance of . + /// The desired value of the Advanced Ransomware Protection feature state available to the volume. + /// The actual state of the Advanced Ransomware Protection feature currently active on the volume. + /// Keeps track of any properties unknown to the library. + internal RansomwareProtectionSettings(DesiredRansomwareProtectionState? desiredRansomwareProtectionState, ActualRansomwareProtectionState? actualRansomwareProtectionState, IDictionary serializedAdditionalRawData) + { + DesiredRansomwareProtectionState = desiredRansomwareProtectionState; + ActualRansomwareProtectionState = actualRansomwareProtectionState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The desired value of the Advanced Ransomware Protection feature state available to the volume. + public DesiredRansomwareProtectionState? DesiredRansomwareProtectionState { get; set; } + /// The actual state of the Advanced Ransomware Protection feature currently active on the volume. + public ActualRansomwareProtectionState? ActualRansomwareProtectionState { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareReportProperties.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareReportProperties.Serialization.cs new file mode 100644 index 000000000000..813e2dfe0491 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareReportProperties.Serialization.cs @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class RansomwareReportProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RansomwareReportProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(EventOn)) + { + writer.WritePropertyName("eventTime"u8); + writer.WriteStringValue(EventOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Severity)) + { + writer.WritePropertyName("severity"u8); + writer.WriteStringValue(Severity.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ClearedCount)) + { + writer.WritePropertyName("clearedCount"u8); + writer.WriteNumberValue(ClearedCount.Value); + } + if (options.Format != "W" && Optional.IsDefined(ReportedCount)) + { + writer.WritePropertyName("reportedCount"u8); + writer.WriteNumberValue(ReportedCount.Value); + } + if (options.Format != "W" && Optional.IsCollectionDefined(Suspects)) + { + writer.WritePropertyName("suspects"u8); + writer.WriteStartArray(); + foreach (var item in Suspects) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RansomwareReportProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RansomwareReportProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRansomwareReportProperties(document.RootElement, options); + } + + internal static RansomwareReportProperties DeserializeRansomwareReportProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? eventTime = default; + RansomwareReportState? state = default; + RansomwareReportSeverity? severity = default; + int? clearedCount = default; + int? reportedCount = default; + IReadOnlyList suspects = default; + string provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("eventTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + eventTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new RansomwareReportState(property.Value.GetString()); + continue; + } + if (property.NameEquals("severity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + severity = new RansomwareReportSeverity(property.Value.GetString()); + continue; + } + if (property.NameEquals("clearedCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clearedCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("reportedCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + reportedCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("suspects"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(RansomwareSuspects.DeserializeRansomwareSuspects(item, options)); + } + suspects = array; + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + provisioningState = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RansomwareReportProperties( + eventTime, + state, + severity, + clearedCount, + reportedCount, + suspects ?? new ChangeTrackingList(), + provisioningState, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(RansomwareReportProperties)} does not support writing '{options.Format}' format."); + } + } + + RansomwareReportProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRansomwareReportProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RansomwareReportProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareReportProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareReportProperties.cs new file mode 100644 index 000000000000..6294a5e415c0 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareReportProperties.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// + /// 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. + /// + public partial class RansomwareReportProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public RansomwareReportProperties() + { + Suspects = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The creation date and time of the report. + /// State of the Advanced Ransomware Protection (ARP) report. + /// Severity of the Advanced Ransomware Protection (ARP) report. + /// The number of cleared suspects identified by the ARP report. + /// The number of suspects identified by the ARP report. + /// Suspects identified in an ARP report. + /// Azure lifecycle management. + /// Keeps track of any properties unknown to the library. + internal RansomwareReportProperties(DateTimeOffset? eventOn, RansomwareReportState? state, RansomwareReportSeverity? severity, int? clearedCount, int? reportedCount, IReadOnlyList suspects, string provisioningState, IDictionary serializedAdditionalRawData) + { + EventOn = eventOn; + State = state; + Severity = severity; + ClearedCount = clearedCount; + ReportedCount = reportedCount; + Suspects = suspects; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The creation date and time of the report. + public DateTimeOffset? EventOn { get; } + /// State of the Advanced Ransomware Protection (ARP) report. + public RansomwareReportState? State { get; } + /// Severity of the Advanced Ransomware Protection (ARP) report. + public RansomwareReportSeverity? Severity { get; } + /// The number of cleared suspects identified by the ARP report. + public int? ClearedCount { get; } + /// The number of suspects identified by the ARP report. + public int? ReportedCount { get; } + /// Suspects identified in an ARP report. + public IReadOnlyList Suspects { get; } + /// Azure lifecycle management. + public string ProvisioningState { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareReportSeverity.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareReportSeverity.cs new file mode 100644 index 000000000000..b7eb00bc62ba --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareReportSeverity.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Severity of the Advanced Ransomware Protection (ARP) report. + public readonly partial struct RansomwareReportSeverity : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RansomwareReportSeverity(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string LowValue = "Low"; + private const string ModerateValue = "Moderate"; + private const string HighValue = "High"; + + /// No data is suspected for ransomware activity. + public static RansomwareReportSeverity None { get; } = new RansomwareReportSeverity(NoneValue); + /// Low attack probability. + public static RansomwareReportSeverity Low { get; } = new RansomwareReportSeverity(LowValue); + /// Moderate attack probability. + public static RansomwareReportSeverity Moderate { get; } = new RansomwareReportSeverity(ModerateValue); + /// High amount of data is suspected for ransomware activity. + public static RansomwareReportSeverity High { get; } = new RansomwareReportSeverity(HighValue); + /// Determines if two values are the same. + public static bool operator ==(RansomwareReportSeverity left, RansomwareReportSeverity right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RansomwareReportSeverity left, RansomwareReportSeverity right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator RansomwareReportSeverity(string value) => new RansomwareReportSeverity(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RansomwareReportSeverity other && Equals(other); + /// + public bool Equals(RansomwareReportSeverity other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareReportState.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareReportState.cs new file mode 100644 index 000000000000..f999ba84ed2a --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareReportState.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// State of the Advanced Ransomware Protection (ARP) report. + public readonly partial struct RansomwareReportState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RansomwareReportState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveValue = "Active"; + private const string ResolvedValue = "Resolved"; + + /// The ARP report has been created. Take action by running clearsuspects marking suspects as FalsePositive or PotentialThreats. + public static RansomwareReportState Active { get; } = new RansomwareReportState(ActiveValue); + /// The ARP Report has been resolved. + public static RansomwareReportState Resolved { get; } = new RansomwareReportState(ResolvedValue); + /// Determines if two values are the same. + public static bool operator ==(RansomwareReportState left, RansomwareReportState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RansomwareReportState left, RansomwareReportState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator RansomwareReportState(string value) => new RansomwareReportState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RansomwareReportState other && Equals(other); + /// + public bool Equals(RansomwareReportState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareReportsList.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareReportsList.Serialization.cs new file mode 100644 index 000000000000..0837c7af81fa --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareReportsList.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + internal partial class RansomwareReportsList : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RansomwareReportsList)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RansomwareReportsList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RansomwareReportsList)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRansomwareReportsList(document.RootElement, options); + } + + internal static RansomwareReportsList DeserializeRansomwareReportsList(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(RansomwareReportData.DeserializeRansomwareReportData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RansomwareReportsList(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(RansomwareReportsList)} does not support writing '{options.Format}' format."); + } + } + + RansomwareReportsList IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRansomwareReportsList(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RansomwareReportsList)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareReportsList.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareReportsList.cs new file mode 100644 index 000000000000..86d2ac3b561a --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareReportsList.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// List of Advanced Ransomware Protection (ARP) reports. + internal partial class RansomwareReportsList + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The RansomwareReport items on this page. + /// is null. + internal RansomwareReportsList(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The RansomwareReport items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal RansomwareReportsList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal RansomwareReportsList() + { + } + + /// The RansomwareReport items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareSuspectResolution.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareSuspectResolution.cs new file mode 100644 index 000000000000..cd66e765c484 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareSuspectResolution.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// ARP report suspect resolution. + public readonly partial struct RansomwareSuspectResolution : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RansomwareSuspectResolution(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PotentialThreatValue = "PotentialThreat"; + private const string FalsePositiveValue = "FalsePositive"; + + /// The identified file type is unexpected in your workload and should be treated as a potential attack. + public static RansomwareSuspectResolution PotentialThreat { get; } = new RansomwareSuspectResolution(PotentialThreatValue); + /// The identified file type is expected in your workload and can be ignored. + public static RansomwareSuspectResolution FalsePositive { get; } = new RansomwareSuspectResolution(FalsePositiveValue); + /// Determines if two values are the same. + public static bool operator ==(RansomwareSuspectResolution left, RansomwareSuspectResolution right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RansomwareSuspectResolution left, RansomwareSuspectResolution right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator RansomwareSuspectResolution(string value) => new RansomwareSuspectResolution(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RansomwareSuspectResolution other && Equals(other); + /// + public bool Equals(RansomwareSuspectResolution other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareSuspects.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareSuspects.Serialization.cs new file mode 100644 index 000000000000..77d8dcacc5fc --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareSuspects.Serialization.cs @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class RansomwareSuspects : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RansomwareSuspects)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Extension)) + { + writer.WritePropertyName("extension"u8); + writer.WriteStringValue(Extension); + } + if (options.Format != "W" && Optional.IsDefined(Resolution)) + { + writer.WritePropertyName("resolution"u8); + writer.WriteStringValue(Resolution.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(FileCount)) + { + writer.WritePropertyName("fileCount"u8); + writer.WriteNumberValue(FileCount.Value); + } + if (options.Format != "W" && Optional.IsCollectionDefined(SuspectFiles)) + { + writer.WritePropertyName("suspectFiles"u8); + writer.WriteStartArray(); + foreach (var item in SuspectFiles) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RansomwareSuspects IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RansomwareSuspects)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRansomwareSuspects(document.RootElement, options); + } + + internal static RansomwareSuspects DeserializeRansomwareSuspects(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string extension = default; + RansomwareSuspectResolution? resolution = default; + int? fileCount = default; + IReadOnlyList suspectFiles = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("extension"u8)) + { + extension = property.Value.GetString(); + continue; + } + if (property.NameEquals("resolution"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resolution = new RansomwareSuspectResolution(property.Value.GetString()); + continue; + } + if (property.NameEquals("fileCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + fileCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("suspectFiles"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SuspectFile.DeserializeSuspectFile(item, options)); + } + suspectFiles = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RansomwareSuspects(extension, resolution, fileCount, suspectFiles ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(RansomwareSuspects)} does not support writing '{options.Format}' format."); + } + } + + RansomwareSuspects IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRansomwareSuspects(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RansomwareSuspects)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareSuspects.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareSuspects.cs new file mode 100644 index 000000000000..1b870b9f474f --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareSuspects.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// List of suspects identified in an Advanced Ransomware Protection (ARP) report. + public partial class RansomwareSuspects + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal RansomwareSuspects() + { + SuspectFiles = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Suspect File extension. + /// ARP report suspect resolution. + /// The number of suspect files at the time of ARP report, this number can change as files get created and report status progresses. + /// Suspect files. + /// Keeps track of any properties unknown to the library. + internal RansomwareSuspects(string extension, RansomwareSuspectResolution? resolution, int? fileCount, IReadOnlyList suspectFiles, IDictionary serializedAdditionalRawData) + { + Extension = extension; + Resolution = resolution; + FileCount = fileCount; + SuspectFiles = suspectFiles; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Suspect File extension. + public string Extension { get; } + /// ARP report suspect resolution. + public RansomwareSuspectResolution? Resolution { get; } + /// The number of suspect files at the time of ARP report, this number can change as files get created and report status progresses. + public int? FileCount { get; } + /// Suspect files. + public IReadOnlyList SuspectFiles { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareSuspectsClearContent.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareSuspectsClearContent.Serialization.cs new file mode 100644 index 000000000000..9a9d393dfea6 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareSuspectsClearContent.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class RansomwareSuspectsClearContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RansomwareSuspectsClearContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("resolution"u8); + writer.WriteStringValue(Resolution.ToString()); + writer.WritePropertyName("extensions"u8); + writer.WriteStartArray(); + foreach (var item in Extensions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RansomwareSuspectsClearContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RansomwareSuspectsClearContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRansomwareSuspectsClearContent(document.RootElement, options); + } + + internal static RansomwareSuspectsClearContent DeserializeRansomwareSuspectsClearContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RansomwareSuspectResolution resolution = default; + IList extensions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resolution"u8)) + { + resolution = new RansomwareSuspectResolution(property.Value.GetString()); + continue; + } + if (property.NameEquals("extensions"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + extensions = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RansomwareSuspectsClearContent(resolution, extensions, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(RansomwareSuspectsClearContent)} does not support writing '{options.Format}' format."); + } + } + + RansomwareSuspectsClearContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRansomwareSuspectsClearContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RansomwareSuspectsClearContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareSuspectsClearContent.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareSuspectsClearContent.cs new file mode 100644 index 000000000000..226ef42c1526 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/RansomwareSuspectsClearContent.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Clear suspects for Advanced Ransomware Protection (ARP) report. + public partial class RansomwareSuspectsClearContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// ARP report suspect resolution. + /// List of file extensions resolved (PotentialThreat or FalsePositive). + /// is null. + public RansomwareSuspectsClearContent(RansomwareSuspectResolution resolution, IEnumerable extensions) + { + Argument.AssertNotNull(extensions, nameof(extensions)); + + Resolution = resolution; + Extensions = extensions.ToList(); + } + + /// Initializes a new instance of . + /// ARP report suspect resolution. + /// List of file extensions resolved (PotentialThreat or FalsePositive). + /// Keeps track of any properties unknown to the library. + internal RansomwareSuspectsClearContent(RansomwareSuspectResolution resolution, IList extensions, IDictionary serializedAdditionalRawData) + { + Resolution = resolution; + Extensions = extensions; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal RansomwareSuspectsClearContent() + { + } + + /// ARP report suspect resolution. + public RansomwareSuspectResolution Resolution { get; } + /// List of file extensions resolved (PotentialThreat or FalsePositive). + public IList Extensions { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SecretPassword.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SecretPassword.Serialization.cs new file mode 100644 index 000000000000..7bb1a3575ce3 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SecretPassword.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class SecretPassword : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SecretPassword)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(KeyVaultProperties)) + { + writer.WritePropertyName("keyVaultProperties"u8); + writer.WriteObjectValue(KeyVaultProperties, options); + } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + writer.WriteObjectValue(Identity, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SecretPassword IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SecretPassword)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSecretPassword(document.RootElement, options); + } + + internal static SecretPassword DeserializeSecretPassword(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SecretPasswordKeyVaultProperties keyVaultProperties = default; + SecretPasswordIdentity identity = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keyVaultProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyVaultProperties = SecretPasswordKeyVaultProperties.DeserializeSecretPasswordKeyVaultProperties(property.Value, options); + continue; + } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = SecretPasswordIdentity.DeserializeSecretPasswordIdentity(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SecretPassword(keyVaultProperties, identity, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(SecretPassword)} does not support writing '{options.Format}' format."); + } + } + + SecretPassword IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSecretPassword(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SecretPassword)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SecretPassword.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SecretPassword.cs new file mode 100644 index 000000000000..2af327e947ab --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SecretPassword.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Access password from Azure KeyVault Secrets to connect Active Directory. + public partial class SecretPassword + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SecretPassword() + { + } + + /// Initializes a new instance of . + /// Properties provided by KeyVault. + /// Identity used to authenticate to KeyVault. Applicable if keySource is 'Microsoft.KeyVault'. + /// Keeps track of any properties unknown to the library. + internal SecretPassword(SecretPasswordKeyVaultProperties keyVaultProperties, SecretPasswordIdentity identity, IDictionary serializedAdditionalRawData) + { + KeyVaultProperties = keyVaultProperties; + Identity = identity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Properties provided by KeyVault. + public SecretPasswordKeyVaultProperties KeyVaultProperties { get; set; } + /// Identity used to authenticate to KeyVault. Applicable if keySource is 'Microsoft.KeyVault'. + public SecretPasswordIdentity Identity { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SecretPasswordIdentity.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SecretPasswordIdentity.Serialization.cs new file mode 100644 index 000000000000..4b66ce121118 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SecretPasswordIdentity.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class SecretPasswordIdentity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SecretPasswordIdentity)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(PrincipalId)) + { + writer.WritePropertyName("principalId"u8); + writer.WriteStringValue(PrincipalId); + } + if (Optional.IsDefined(UserAssignedIdentity)) + { + writer.WritePropertyName("userAssignedIdentity"u8); + writer.WriteStringValue(UserAssignedIdentity); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SecretPasswordIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SecretPasswordIdentity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSecretPasswordIdentity(document.RootElement, options); + } + + internal static SecretPasswordIdentity DeserializeSecretPasswordIdentity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string principalId = default; + string userAssignedIdentity = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("principalId"u8)) + { + principalId = property.Value.GetString(); + continue; + } + if (property.NameEquals("userAssignedIdentity"u8)) + { + userAssignedIdentity = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SecretPasswordIdentity(principalId, userAssignedIdentity, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(SecretPasswordIdentity)} does not support writing '{options.Format}' format."); + } + } + + SecretPasswordIdentity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSecretPasswordIdentity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SecretPasswordIdentity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SecretPasswordIdentity.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SecretPasswordIdentity.cs new file mode 100644 index 000000000000..f78630948082 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SecretPasswordIdentity.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Identity used to authenticate with key vault. + public partial class SecretPasswordIdentity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SecretPasswordIdentity() + { + } + + /// Initializes a new instance of . + /// The principal ID (object ID) of the identity used to authenticate with key vault. Read-only. + /// 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. + /// Keeps track of any properties unknown to the library. + internal SecretPasswordIdentity(string principalId, string userAssignedIdentity, IDictionary serializedAdditionalRawData) + { + PrincipalId = principalId; + UserAssignedIdentity = userAssignedIdentity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The principal ID (object ID) of the identity used to authenticate with key vault. Read-only. + public string PrincipalId { get; } + /// 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. + public string UserAssignedIdentity { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SecretPasswordKeyVaultProperties.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SecretPasswordKeyVaultProperties.Serialization.cs new file mode 100644 index 000000000000..9884118da977 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SecretPasswordKeyVaultProperties.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class SecretPasswordKeyVaultProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SecretPasswordKeyVaultProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("keyVaultUri"u8); + writer.WriteStringValue(KeyVaultUri.AbsoluteUri); + writer.WritePropertyName("secretName"u8); + writer.WriteStringValue(SecretName); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SecretPasswordKeyVaultProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SecretPasswordKeyVaultProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSecretPasswordKeyVaultProperties(document.RootElement, options); + } + + internal static SecretPasswordKeyVaultProperties DeserializeSecretPasswordKeyVaultProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Uri keyVaultUri = default; + string secretName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keyVaultUri"u8)) + { + keyVaultUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("secretName"u8)) + { + secretName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SecretPasswordKeyVaultProperties(keyVaultUri, secretName, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(SecretPasswordKeyVaultProperties)} does not support writing '{options.Format}' format."); + } + } + + SecretPasswordKeyVaultProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSecretPasswordKeyVaultProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SecretPasswordKeyVaultProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SecretPasswordKeyVaultProperties.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SecretPasswordKeyVaultProperties.cs new file mode 100644 index 000000000000..5aafbfc1dac2 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SecretPasswordKeyVaultProperties.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Properties of key vault to get the secrets for password. + public partial class SecretPasswordKeyVaultProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Uri of KeyVault. + /// The name of KeyVault password secret. + /// or is null. + public SecretPasswordKeyVaultProperties(Uri keyVaultUri, string secretName) + { + Argument.AssertNotNull(keyVaultUri, nameof(keyVaultUri)); + Argument.AssertNotNull(secretName, nameof(secretName)); + + KeyVaultUri = keyVaultUri; + SecretName = secretName; + } + + /// Initializes a new instance of . + /// The Uri of KeyVault. + /// The name of KeyVault password secret. + /// Keeps track of any properties unknown to the library. + internal SecretPasswordKeyVaultProperties(Uri keyVaultUri, string secretName, IDictionary serializedAdditionalRawData) + { + KeyVaultUri = keyVaultUri; + SecretName = secretName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SecretPasswordKeyVaultProperties() + { + } + + /// The Uri of KeyVault. + public Uri KeyVaultUri { get; set; } + /// The name of KeyVault password secret. + public string SecretName { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SecretPasswordKeyVaultPropertiesUpdate.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SecretPasswordKeyVaultPropertiesUpdate.Serialization.cs new file mode 100644 index 000000000000..75358ee37912 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SecretPasswordKeyVaultPropertiesUpdate.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class SecretPasswordKeyVaultPropertiesUpdate : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SecretPasswordKeyVaultPropertiesUpdate)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(KeyVaultUri)) + { + writer.WritePropertyName("keyVaultUri"u8); + writer.WriteStringValue(KeyVaultUri.AbsoluteUri); + } + if (Optional.IsDefined(SecretName)) + { + writer.WritePropertyName("secretName"u8); + writer.WriteStringValue(SecretName); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SecretPasswordKeyVaultPropertiesUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SecretPasswordKeyVaultPropertiesUpdate)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSecretPasswordKeyVaultPropertiesUpdate(document.RootElement, options); + } + + internal static SecretPasswordKeyVaultPropertiesUpdate DeserializeSecretPasswordKeyVaultPropertiesUpdate(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Uri keyVaultUri = default; + string secretName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keyVaultUri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyVaultUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("secretName"u8)) + { + secretName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SecretPasswordKeyVaultPropertiesUpdate(keyVaultUri, secretName, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(SecretPasswordKeyVaultPropertiesUpdate)} does not support writing '{options.Format}' format."); + } + } + + SecretPasswordKeyVaultPropertiesUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSecretPasswordKeyVaultPropertiesUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SecretPasswordKeyVaultPropertiesUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SecretPasswordKeyVaultPropertiesUpdate.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SecretPasswordKeyVaultPropertiesUpdate.cs new file mode 100644 index 000000000000..2f1a0b2372d2 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SecretPasswordKeyVaultPropertiesUpdate.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Properties of key vault to get the secrets for password. + public partial class SecretPasswordKeyVaultPropertiesUpdate + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SecretPasswordKeyVaultPropertiesUpdate() + { + } + + /// Initializes a new instance of . + /// The Uri of KeyVault. + /// The name of KeyVault password secret. + /// Keeps track of any properties unknown to the library. + internal SecretPasswordKeyVaultPropertiesUpdate(Uri keyVaultUri, string secretName, IDictionary serializedAdditionalRawData) + { + KeyVaultUri = keyVaultUri; + SecretName = secretName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The Uri of KeyVault. + public Uri KeyVaultUri { get; set; } + /// The name of KeyVault password secret. + public string SecretName { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SecretPasswordUpdate.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SecretPasswordUpdate.Serialization.cs new file mode 100644 index 000000000000..9f9273000bbd --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SecretPasswordUpdate.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class SecretPasswordUpdate : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SecretPasswordUpdate)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(KeyVaultProperties)) + { + writer.WritePropertyName("keyVaultProperties"u8); + writer.WriteObjectValue(KeyVaultProperties, options); + } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + writer.WriteObjectValue(Identity, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SecretPasswordUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SecretPasswordUpdate)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSecretPasswordUpdate(document.RootElement, options); + } + + internal static SecretPasswordUpdate DeserializeSecretPasswordUpdate(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SecretPasswordKeyVaultPropertiesUpdate keyVaultProperties = default; + SecretPasswordIdentity identity = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keyVaultProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyVaultProperties = SecretPasswordKeyVaultPropertiesUpdate.DeserializeSecretPasswordKeyVaultPropertiesUpdate(property.Value, options); + continue; + } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = SecretPasswordIdentity.DeserializeSecretPasswordIdentity(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SecretPasswordUpdate(keyVaultProperties, identity, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(SecretPasswordUpdate)} does not support writing '{options.Format}' format."); + } + } + + SecretPasswordUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSecretPasswordUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SecretPasswordUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SecretPasswordUpdate.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SecretPasswordUpdate.cs new file mode 100644 index 000000000000..3b617f755961 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SecretPasswordUpdate.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Access password from Azure KeyVault Secrets to connect Active Directory. + public partial class SecretPasswordUpdate + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SecretPasswordUpdate() + { + } + + /// Initializes a new instance of . + /// Properties provided by KeyVault. + /// Identity used to authenticate to KeyVault. Applicable if keySource is 'Microsoft.KeyVault'. + /// Keeps track of any properties unknown to the library. + internal SecretPasswordUpdate(SecretPasswordKeyVaultPropertiesUpdate keyVaultProperties, SecretPasswordIdentity identity, IDictionary serializedAdditionalRawData) + { + KeyVaultProperties = keyVaultProperties; + Identity = identity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Properties provided by KeyVault. + public SecretPasswordKeyVaultPropertiesUpdate KeyVaultProperties { get; set; } + /// Identity used to authenticate to KeyVault. Applicable if keySource is 'Microsoft.KeyVault'. + public SecretPasswordIdentity Identity { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SmbEncryptionState.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SmbEncryptionState.cs new file mode 100644 index 000000000000..d371f406f4cf --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SmbEncryptionState.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol cache. + public readonly partial struct SmbEncryptionState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SmbEncryptionState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DisabledValue = "Disabled"; + private const string EnabledValue = "Enabled"; + + /// SMB encryption is disabled. + public static SmbEncryptionState Disabled { get; } = new SmbEncryptionState(DisabledValue); + /// SMB encryption is enabled. + public static SmbEncryptionState Enabled { get; } = new SmbEncryptionState(EnabledValue); + /// Determines if two values are the same. + public static bool operator ==(SmbEncryptionState left, SmbEncryptionState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SmbEncryptionState left, SmbEncryptionState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SmbEncryptionState(string value) => new SmbEncryptionState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SmbEncryptionState other && Equals(other); + /// + public bool Equals(SmbEncryptionState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SmbSettings.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SmbSettings.Serialization.cs new file mode 100644 index 000000000000..fcdfdc4125d6 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SmbSettings.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class SmbSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SmbSettings)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SmbEncryption)) + { + writer.WritePropertyName("smbEncryption"u8); + writer.WriteStringValue(SmbEncryption.Value.ToString()); + } + if (Optional.IsDefined(SmbAccessBasedEnumerations)) + { + writer.WritePropertyName("smbAccessBasedEnumerations"u8); + writer.WriteStringValue(SmbAccessBasedEnumerations.Value.ToString()); + } + if (Optional.IsDefined(SmbNonBrowsable)) + { + writer.WritePropertyName("smbNonBrowsable"u8); + writer.WriteStringValue(SmbNonBrowsable.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SmbSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SmbSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSmbSettings(document.RootElement, options); + } + + internal static SmbSettings DeserializeSmbSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SmbEncryptionState? smbEncryption = default; + SmbAccessBasedEnumeration? smbAccessBasedEnumerations = default; + SmbNonBrowsable? smbNonBrowsable = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("smbEncryption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + smbEncryption = new SmbEncryptionState(property.Value.GetString()); + continue; + } + if (property.NameEquals("smbAccessBasedEnumerations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + smbAccessBasedEnumerations = new SmbAccessBasedEnumeration(property.Value.GetString()); + continue; + } + if (property.NameEquals("smbNonBrowsable"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + smbNonBrowsable = new SmbNonBrowsable(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SmbSettings(smbEncryption, smbAccessBasedEnumerations, smbNonBrowsable, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(SmbSettings)} does not support writing '{options.Format}' format."); + } + } + + SmbSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSmbSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SmbSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SmbSettings.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SmbSettings.cs new file mode 100644 index 000000000000..0207e9845ed2 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SmbSettings.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// SMB settings for the cache. + public partial class SmbSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SmbSettings() + { + } + + /// Initializes a new instance of . + /// Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol cache. + /// Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume. + /// Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. + /// Keeps track of any properties unknown to the library. + internal SmbSettings(SmbEncryptionState? smbEncryption, SmbAccessBasedEnumeration? smbAccessBasedEnumerations, SmbNonBrowsable? smbNonBrowsable, IDictionary serializedAdditionalRawData) + { + SmbEncryption = smbEncryption; + SmbAccessBasedEnumerations = smbAccessBasedEnumerations; + SmbNonBrowsable = smbNonBrowsable; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Enables encryption for in-flight smb3 data. Only applicable for SMB/DualProtocol cache. + public SmbEncryptionState? SmbEncryption { get; set; } + /// Enables access-based enumeration share property for SMB Shares. Only applicable for SMB/DualProtocol volume. + public SmbAccessBasedEnumeration? SmbAccessBasedEnumerations { get; set; } + /// Enables non-browsable property for SMB Shares. Only applicable for SMB/DualProtocol volume. + public SmbNonBrowsable? SmbNonBrowsable { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotDirectoryVisibility.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotDirectoryVisibility.cs new file mode 100644 index 000000000000..b6b47f6b82a8 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotDirectoryVisibility.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Controls the visibility of the Elastic Volume's read-only snapshot directory, which provides access to each of the volume's snapshots. + public readonly partial struct SnapshotDirectoryVisibility : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SnapshotDirectoryVisibility(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string HiddenValue = "Hidden"; + private const string VisibleValue = "Visible"; + + /// Value indicating the read-only snapshot directory is not visible. + public static SnapshotDirectoryVisibility Hidden { get; } = new SnapshotDirectoryVisibility(HiddenValue); + /// Value indicating the read-only snapshot directory is visible. + public static SnapshotDirectoryVisibility Visible { get; } = new SnapshotDirectoryVisibility(VisibleValue); + /// Determines if two values are the same. + public static bool operator ==(SnapshotDirectoryVisibility left, SnapshotDirectoryVisibility right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SnapshotDirectoryVisibility left, SnapshotDirectoryVisibility right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SnapshotDirectoryVisibility(string value) => new SnapshotDirectoryVisibility(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SnapshotDirectoryVisibility other && Equals(other); + /// + public bool Equals(SnapshotDirectoryVisibility other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotUsage.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotUsage.cs new file mode 100644 index 000000000000..d232b73d15f6 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SnapshotUsage.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Manual backup using an already existing snapshot. This will always be CreateNewSnapshot for scheduled backups and UseExistingSnapshot/CreateNewSnapshot for manual backups. + public readonly partial struct SnapshotUsage : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SnapshotUsage(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UseExistingSnapshotValue = "UseExistingSnapshot"; + private const string CreateNewSnapshotValue = "CreateNewSnapshot"; + + /// Value indicating an existing snapshot is used. + public static SnapshotUsage UseExistingSnapshot { get; } = new SnapshotUsage(UseExistingSnapshotValue); + /// Value indicating a new snapshot is created. + public static SnapshotUsage CreateNewSnapshot { get; } = new SnapshotUsage(CreateNewSnapshotValue); + /// Determines if two values are the same. + public static bool operator ==(SnapshotUsage left, SnapshotUsage right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SnapshotUsage left, SnapshotUsage right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SnapshotUsage(string value) => new SnapshotUsage(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SnapshotUsage other && Equals(other); + /// + public bool Equals(SnapshotUsage other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SuspectFile.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SuspectFile.Serialization.cs new file mode 100644 index 000000000000..310e197f508d --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SuspectFile.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NetApp.Models +{ + public partial class SuspectFile : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SuspectFile)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(SuspectFileName)) + { + writer.WritePropertyName("suspectFileName"u8); + writer.WriteStringValue(SuspectFileName); + } + if (options.Format != "W" && Optional.IsDefined(FileTimestamp)) + { + writer.WritePropertyName("fileTimestamp"u8); + writer.WriteStringValue(FileTimestamp.Value, "O"); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SuspectFile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SuspectFile)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSuspectFile(document.RootElement, options); + } + + internal static SuspectFile DeserializeSuspectFile(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string suspectFileName = default; + DateTimeOffset? fileTimestamp = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("suspectFileName"u8)) + { + suspectFileName = property.Value.GetString(); + continue; + } + if (property.NameEquals("fileTimestamp"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + fileTimestamp = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SuspectFile(suspectFileName, fileTimestamp, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(SuspectFile)} does not support writing '{options.Format}' format."); + } + } + + SuspectFile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSuspectFile(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SuspectFile)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SuspectFile.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SuspectFile.cs new file mode 100644 index 000000000000..9325db5037fb --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/SuspectFile.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Suspect file information. + public partial class SuspectFile + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SuspectFile() + { + } + + /// Initializes a new instance of . + /// Suspect filename. + /// The creation date and time of the file. + /// Keeps track of any properties unknown to the library. + internal SuspectFile(string suspectFileName, DateTimeOffset? fileTimestamp, IDictionary serializedAdditionalRawData) + { + SuspectFileName = suspectFileName; + FileTimestamp = fileTimestamp; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Suspect filename. + public string SuspectFileName { get; } + /// The creation date and time of the file. + public DateTimeOffset? FileTimestamp { get; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/VolumeSize.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/VolumeSize.cs new file mode 100644 index 000000000000..47968c82c7bd --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/Models/VolumeSize.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NetApp.Models +{ + /// Volume size for backup. + public readonly partial struct VolumeSize : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public VolumeSize(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string LargeValue = "Large"; + private const string RegularValue = "Regular"; + + /// Value indicating backup is for a large volume. + public static VolumeSize Large { get; } = new VolumeSize(LargeValue); + /// Value indicating backup is not for a large volume. + public static VolumeSize Regular { get; } = new VolumeSize(RegularValue); + /// Determines if two values are the same. + public static bool operator ==(VolumeSize left, VolumeSize right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(VolumeSize left, VolumeSize right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator VolumeSize(string value) => new VolumeSize(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is VolumeSize other && Equals(other); + /// + public bool Equals(VolumeSize other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountCollection.cs index ca223ea59ebe..74fe738fccef 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string accou /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string accountName, Cancellat /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string accountName, Cancel /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string accountName, CancellationToken cance /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountData.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountData.Serialization.cs index da703dc083c0..bfccdcb33ad8 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountData.Serialization.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountData.Serialization.cs @@ -99,6 +99,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("multiAdStatus"u8); writer.WriteStringValue(MultiAdStatus.Value.ToString()); } + if (Optional.IsDefined(LdapConfiguration)) + { + writer.WritePropertyName("ldapConfiguration"u8); + writer.WriteObjectValue(LdapConfiguration, options); + } writer.WriteEndObject(); } @@ -136,6 +141,7 @@ internal static NetAppAccountData DeserializeNetAppAccountData(JsonElement eleme bool? disableShowmount = default; string nfsV4IdDomain = default; MultiAdStatus? multiAdStatus = default; + LdapConfiguration ldapConfiguration = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -267,6 +273,15 @@ internal static NetAppAccountData DeserializeNetAppAccountData(JsonElement eleme multiAdStatus = new MultiAdStatus(property0.Value.GetString()); continue; } + if (property0.NameEquals("ldapConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ldapConfiguration = LdapConfiguration.DeserializeLdapConfiguration(property0.Value, options); + continue; + } } continue; } @@ -291,6 +306,7 @@ internal static NetAppAccountData DeserializeNetAppAccountData(JsonElement eleme disableShowmount, nfsV4IdDomain, multiAdStatus, + ldapConfiguration, serializedAdditionalRawData); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountData.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountData.cs index 2c70c3321728..0145fa552eec 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountData.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountData.cs @@ -73,8 +73,9 @@ public NetAppAccountData(AzureLocation location) : base(location) /// Shows the status of disableShowmount for all volumes under the subscription, null equals false. /// Domain for NFSv4 user ID mapping. This property will be set for all NetApp accounts in the subscription and region and only affect non ldap NFSv4 volumes. /// MultiAD Status for the account. + /// LDAP Configuration for the account. /// Keeps track of any properties unknown to the library. - internal NetAppAccountData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, ManagedServiceIdentity identity, string provisioningState, IList activeDirectories, NetAppAccountEncryption encryption, bool? disableShowmount, string nfsV4IdDomain, MultiAdStatus? multiAdStatus, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal NetAppAccountData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, ManagedServiceIdentity identity, string provisioningState, IList activeDirectories, NetAppAccountEncryption encryption, bool? disableShowmount, string nfsV4IdDomain, MultiAdStatus? multiAdStatus, LdapConfiguration ldapConfiguration, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { ETag = etag; Identity = identity; @@ -84,6 +85,7 @@ internal NetAppAccountData(ResourceIdentifier id, string name, ResourceType reso DisableShowmount = disableShowmount; NfsV4IdDomain = nfsV4IdDomain; MultiAdStatus = multiAdStatus; + LdapConfiguration = ldapConfiguration; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -108,5 +110,7 @@ internal NetAppAccountData() public string NfsV4IdDomain { get; set; } /// MultiAD Status for the account. public MultiAdStatus? MultiAdStatus { get; } + /// LDAP Configuration for the account. + public LdapConfiguration LdapConfiguration { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountResource.cs index a022eec1b10a..658d8bdfcb45 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountResource.cs @@ -124,7 +124,7 @@ public virtual NetAppBackupPolicyCollection GetNetAppBackupPolicies() /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -155,7 +155,7 @@ public virtual async Task> GetNetAppBackupP /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -193,7 +193,7 @@ public virtual NetAppBackupVaultCollection GetNetAppBackupVaults() /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task> GetNetAppBackupVa /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -262,7 +262,7 @@ public virtual CapacityPoolCollection GetCapacityPools() /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -293,7 +293,7 @@ public virtual async Task> GetCapacityPoolAsync(s /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -331,7 +331,7 @@ public virtual SnapshotPolicyCollection GetSnapshotPolicies() /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -362,7 +362,7 @@ public virtual async Task> GetSnapshotPolicyAsy /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -400,7 +400,7 @@ public virtual NetAppVolumeGroupCollection GetNetAppVolumeGroups() /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -431,7 +431,7 @@ public virtual async Task> GetNetAppVolumeGr /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -462,7 +462,7 @@ public virtual Response GetNetAppVolumeGroup(string v /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -502,7 +502,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -542,7 +542,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -584,7 +584,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -626,7 +626,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -672,7 +672,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -718,7 +718,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, N /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -761,7 +761,7 @@ public virtual async Task ChangeKeyVaultAsync(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -804,7 +804,7 @@ public virtual ArmOperation ChangeKeyVault(WaitUntil waitUntil, NetAppChangeKeyV /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -846,7 +846,7 @@ public virtual async Task> GetChangeKey /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -888,7 +888,7 @@ public virtual ArmOperation GetChangeKeyVaultInforma /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -930,7 +930,7 @@ public virtual async Task RenewCredentialsAsync(WaitUntil waitUnti /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -972,7 +972,7 @@ public virtual ArmOperation RenewCredentials(WaitUntil waitUntil, CancellationTo /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1015,7 +1015,7 @@ public virtual async Task TransitionToCmkAsync(WaitUntil waitUntil /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1058,7 +1058,7 @@ public virtual ArmOperation TransitionToCmk(WaitUntil waitUntil, NetAppEncryptio /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -1100,7 +1100,7 @@ public virtual async Task MigrateBackupsBackupsUnderAccountAsync(W /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -1142,7 +1142,7 @@ public virtual ArmOperation MigrateBackupsBackupsUnderAccount(WaitUntil waitUnti /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -1168,7 +1168,7 @@ public virtual AsyncPageable GetNetAppResourceQuota /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -1194,7 +1194,7 @@ public virtual Pageable GetNetAppResourceQuotaLimit /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -1233,7 +1233,7 @@ public virtual async Task> GetNetAppResour /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -1272,7 +1272,7 @@ public virtual Response GetNetAppResourceQuotaLimit /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1302,7 +1302,7 @@ public virtual AsyncPageable GetVolumeGroupsAsync(Cance /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1332,7 +1332,7 @@ public virtual Pageable GetVolumeGroups(CancellationTok /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1394,7 +1394,7 @@ public virtual async Task> AddTagAsync(string ke /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1456,7 +1456,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1513,7 +1513,7 @@ public virtual async Task> SetTagsAsync(IDiction /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1570,7 +1570,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1630,7 +1630,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupPolicyCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupPolicyCollection.cs index 81a33c6477c2..f7a62fe4c8cc 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupPolicyCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupPolicyCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string backupPolicyName, /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string backupPolicyName, C /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string backupPolicyName, CancellationToken /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupPolicyResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupPolicyResource.cs index 3562b694886f..f835ff4f3bb1 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupPolicyResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupPolicyResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation Update(WaitUntil waitUnt /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -421,7 +421,7 @@ public virtual async Task> AddTagAsync(stri /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -483,7 +483,7 @@ public virtual Response AddTag(string key, string va /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -540,7 +540,7 @@ public virtual async Task> SetTagsAsync(IDi /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -597,7 +597,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -657,7 +657,7 @@ public virtual async Task> RemoveTagAsync(s /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultBackupCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultBackupCollection.cs index 0da281018ffa..b02240254348 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultBackupCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultBackupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string backupName, /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(string /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(string filter = /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string backupName, Cancell /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string backupName, CancellationToken cancel /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultBackupResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultBackupResource.cs index 3eb97960e070..e751eb1b0c00 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultBackupResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultBackupResource.cs @@ -107,7 +107,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -147,7 +147,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -187,7 +187,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -363,7 +363,7 @@ public virtual ArmOperation Update(WaitUntil wa /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -405,7 +405,7 @@ public virtual async Task RestoreFilesBackupsUnderBackupVaultAsync /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultCollection.cs index 722e9a330993..cc6d1b0e8cb2 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string b /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string backupVaultName, C /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string backupVaultName, Ca /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string backupVaultName, CancellationToken c /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultResource.cs index 317733ed63ec..f226e137afdf 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultResource.cs @@ -110,7 +110,7 @@ public virtual NetAppBackupVaultBackupCollection GetNetAppBackupVaultBackups() /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetNetAppBa /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetNetAppBackupVaultBac /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -336,7 +336,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -382,7 +382,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -428,7 +428,7 @@ public virtual ArmOperation Update(WaitUntil waitUnti /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -490,7 +490,7 @@ public virtual async Task> AddTagAsync(strin /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -552,7 +552,7 @@ public virtual Response AddTag(string key, string val /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -609,7 +609,7 @@ public virtual async Task> SetTagsAsync(IDic /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -666,7 +666,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -726,7 +726,7 @@ public virtual async Task> RemoveTagAsync(st /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBucketCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBucketCollection.cs new file mode 100644 index 000000000000..527cc423eeb0 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBucketCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetNetAppBuckets method from an instance of . + /// + public partial class NetAppBucketCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _netAppBucketBucketsClientDiagnostics; + private readonly BucketsRestOperations _netAppBucketBucketsRestClient; + + /// Initializes a new instance of the class for mocking. + protected NetAppBucketCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal NetAppBucketCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _netAppBucketBucketsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NetApp", NetAppBucketResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(NetAppBucketResource.ResourceType, out string netAppBucketBucketsApiVersion); + _netAppBucketBucketsRestClient = new BucketsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, netAppBucketBucketsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != NetAppVolumeResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, NetAppVolumeResource.ResourceType), nameof(id)); + } + + /// + /// 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. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName} + /// + /// + /// Operation Id + /// Buckets_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the bucket. + /// The bucket details including user details, and the volume path that should be mounted inside the bucket. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string bucketName, NetAppBucketData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(bucketName, nameof(bucketName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _netAppBucketBucketsClientDiagnostics.CreateScope("NetAppBucketCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _netAppBucketBucketsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, bucketName, data, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(new NetAppBucketOperationSource(Client), _netAppBucketBucketsClientDiagnostics, Pipeline, _netAppBucketBucketsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, bucketName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// 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. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName} + /// + /// + /// Operation Id + /// Buckets_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the bucket. + /// The bucket details including user details, and the volume path that should be mounted inside the bucket. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string bucketName, NetAppBucketData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(bucketName, nameof(bucketName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _netAppBucketBucketsClientDiagnostics.CreateScope("NetAppBucketCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _netAppBucketBucketsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, bucketName, data, cancellationToken); + var operation = new NetAppArmOperation(new NetAppBucketOperationSource(Client), _netAppBucketBucketsClientDiagnostics, Pipeline, _netAppBucketBucketsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, bucketName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// 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. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName} + /// + /// + /// Operation Id + /// Buckets_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the bucket. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string bucketName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(bucketName, nameof(bucketName)); + + using var scope = _netAppBucketBucketsClientDiagnostics.CreateScope("NetAppBucketCollection.Get"); + scope.Start(); + try + { + var response = await _netAppBucketBucketsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, bucketName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetAppBucketResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// 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. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName} + /// + /// + /// Operation Id + /// Buckets_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the bucket. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string bucketName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(bucketName, nameof(bucketName)); + + using var scope = _netAppBucketBucketsClientDiagnostics.CreateScope("NetAppBucketCollection.Get"); + scope.Start(); + try + { + var response = _netAppBucketBucketsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, bucketName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetAppBucketResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Describes all buckets belonging to a volume. Buckets allow additional services, such as AI services, connect to the volume data contained in those buckets. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets + /// + /// + /// Operation Id + /// Buckets_List + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _netAppBucketBucketsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _netAppBucketBucketsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetAppBucketResource(Client, NetAppBucketData.DeserializeNetAppBucketData(e)), _netAppBucketBucketsClientDiagnostics, Pipeline, "NetAppBucketCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Describes all buckets belonging to a volume. Buckets allow additional services, such as AI services, connect to the volume data contained in those buckets. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets + /// + /// + /// Operation Id + /// Buckets_List + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _netAppBucketBucketsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _netAppBucketBucketsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetAppBucketResource(Client, NetAppBucketData.DeserializeNetAppBucketData(e)), _netAppBucketBucketsClientDiagnostics, Pipeline, "NetAppBucketCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName} + /// + /// + /// Operation Id + /// Buckets_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the bucket. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string bucketName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(bucketName, nameof(bucketName)); + + using var scope = _netAppBucketBucketsClientDiagnostics.CreateScope("NetAppBucketCollection.Exists"); + scope.Start(); + try + { + var response = await _netAppBucketBucketsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, bucketName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName} + /// + /// + /// Operation Id + /// Buckets_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the bucket. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string bucketName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(bucketName, nameof(bucketName)); + + using var scope = _netAppBucketBucketsClientDiagnostics.CreateScope("NetAppBucketCollection.Exists"); + scope.Start(); + try + { + var response = _netAppBucketBucketsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, bucketName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName} + /// + /// + /// Operation Id + /// Buckets_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the bucket. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string bucketName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(bucketName, nameof(bucketName)); + + using var scope = _netAppBucketBucketsClientDiagnostics.CreateScope("NetAppBucketCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _netAppBucketBucketsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, bucketName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new NetAppBucketResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName} + /// + /// + /// Operation Id + /// Buckets_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the bucket. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string bucketName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(bucketName, nameof(bucketName)); + + using var scope = _netAppBucketBucketsClientDiagnostics.CreateScope("NetAppBucketCollection.GetIfExists"); + scope.Start(); + try + { + var response = _netAppBucketBucketsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, bucketName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new NetAppBucketResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBucketData.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBucketData.Serialization.cs new file mode 100644 index 000000000000..879242d47e86 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBucketData.Serialization.cs @@ -0,0 +1,247 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + public partial class NetAppBucketData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetAppBucketData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Path)) + { + writer.WritePropertyName("path"u8); + writer.WriteStringValue(Path); + } + if (Optional.IsDefined(FileSystemUser)) + { + writer.WritePropertyName("fileSystemUser"u8); + writer.WriteObjectValue(FileSystemUser, options); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToSerialString()); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(Server)) + { + writer.WritePropertyName("server"u8); + writer.WriteObjectValue(Server, options); + } + if (Optional.IsDefined(Permissions)) + { + writer.WritePropertyName("permissions"u8); + writer.WriteStringValue(Permissions.Value.ToString()); + } + writer.WriteEndObject(); + } + + NetAppBucketData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetAppBucketData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetAppBucketData(document.RootElement, options); + } + + internal static NetAppBucketData DeserializeNetAppBucketData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + string path = default; + NetAppBucketFileSystemUser fileSystemUser = default; + NetAppProvisioningState? provisioningState = default; + NetAppBucketCredentialStatus? status = default; + NetAppBucketServerProperties server = default; + NetAppBucketPermission? permissions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerNetAppContext.Default); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("path"u8)) + { + path = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("fileSystemUser"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + fileSystemUser = NetAppBucketFileSystemUser.DeserializeNetAppBucketFileSystemUser(property0.Value, options); + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = property0.Value.GetString().ToNetAppProvisioningState(); + continue; + } + if (property0.NameEquals("status"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new NetAppBucketCredentialStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("server"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + server = NetAppBucketServerProperties.DeserializeNetAppBucketServerProperties(property0.Value, options); + continue; + } + if (property0.NameEquals("permissions"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + permissions = new NetAppBucketPermission(property0.Value.GetString()); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetAppBucketData( + id, + name, + type, + systemData, + path, + fileSystemUser, + provisioningState, + status, + server, + permissions, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(NetAppBucketData)} does not support writing '{options.Format}' format."); + } + } + + NetAppBucketData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNetAppBucketData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetAppBucketData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBucketData.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBucketData.cs new file mode 100644 index 000000000000..faaedb9e37b2 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBucketData.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A class representing the NetAppBucket data model. + /// Bucket resource + /// + public partial class NetAppBucketData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NetAppBucketData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The volume path mounted inside the bucket. The default is the root path '/' if no value is provided when the bucket is created. + /// 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. + /// Provisioning state of the resource. + /// + /// 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. + /// + /// Properties of the server managing the lifecycle of volume buckets. + /// Access permissions for the bucket. Either ReadOnly or ReadWrite. The default is ReadOnly if no value is provided during bucket creation. + /// Keeps track of any properties unknown to the library. + internal NetAppBucketData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string path, NetAppBucketFileSystemUser fileSystemUser, NetAppProvisioningState? provisioningState, NetAppBucketCredentialStatus? status, NetAppBucketServerProperties server, NetAppBucketPermission? permissions, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Path = path; + FileSystemUser = fileSystemUser; + ProvisioningState = provisioningState; + Status = status; + Server = server; + Permissions = permissions; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The volume path mounted inside the bucket. The default is the root path '/' if no value is provided when the bucket is created. + public string Path { get; set; } + /// 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. + public NetAppBucketFileSystemUser FileSystemUser { get; set; } + /// Provisioning state of the resource. + public NetAppProvisioningState? ProvisioningState { get; } + /// + /// 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 NetAppBucketCredentialStatus? Status { get; } + /// Properties of the server managing the lifecycle of volume buckets. + public NetAppBucketServerProperties Server { get; set; } + /// Access permissions for the bucket. Either ReadOnly or ReadWrite. The default is ReadOnly if no value is provided during bucket creation. + public NetAppBucketPermission? Permissions { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBucketResource.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBucketResource.Serialization.cs new file mode 100644 index 000000000000..64c05279856c --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBucketResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.NetApp +{ + public partial class NetAppBucketResource : IJsonModel + { + private static NetAppBucketData s_dataDeserializationInstance; + private static NetAppBucketData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + NetAppBucketData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetAppContext.Default); + + NetAppBucketData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetAppContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBucketResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBucketResource.cs new file mode 100644 index 000000000000..262306385d8a --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBucketResource.cs @@ -0,0 +1,434 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A Class representing a NetAppBucket along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetNetAppBucketResource method. + /// Otherwise you can get one from its parent resource using the GetNetAppBucket method. + /// + public partial class NetAppBucketResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The accountName. + /// The poolName. + /// The volumeName. + /// The bucketName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string bucketName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _netAppBucketBucketsClientDiagnostics; + private readonly BucketsRestOperations _netAppBucketBucketsRestClient; + private readonly NetAppBucketData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/buckets"; + + /// Initializes a new instance of the class for mocking. + protected NetAppBucketResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal NetAppBucketResource(ArmClient client, NetAppBucketData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal NetAppBucketResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _netAppBucketBucketsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NetApp", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string netAppBucketBucketsApiVersion); + _netAppBucketBucketsRestClient = new BucketsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, netAppBucketBucketsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual NetAppBucketData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(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. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName} + /// + /// + /// Operation Id + /// Buckets_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _netAppBucketBucketsClientDiagnostics.CreateScope("NetAppBucketResource.Get"); + scope.Start(); + try + { + var response = await _netAppBucketBucketsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetAppBucketResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// 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. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName} + /// + /// + /// Operation Id + /// Buckets_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _netAppBucketBucketsClientDiagnostics.CreateScope("NetAppBucketResource.Get"); + scope.Start(); + try + { + var response = _netAppBucketBucketsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetAppBucketResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a volume's bucket. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName} + /// + /// + /// Operation Id + /// Buckets_Delete + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _netAppBucketBucketsClientDiagnostics.CreateScope("NetAppBucketResource.Delete"); + scope.Start(); + try + { + var response = await _netAppBucketBucketsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(_netAppBucketBucketsClientDiagnostics, Pipeline, _netAppBucketBucketsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a volume's bucket. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName} + /// + /// + /// Operation Id + /// Buckets_Delete + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _netAppBucketBucketsClientDiagnostics.CreateScope("NetAppBucketResource.Delete"); + scope.Start(); + try + { + var response = _netAppBucketBucketsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new NetAppArmOperation(_netAppBucketBucketsClientDiagnostics, Pipeline, _netAppBucketBucketsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the details of a volume bucket. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName} + /// + /// + /// Operation Id + /// Buckets_Update + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The bucket details including user details, and the volume path that should be mounted inside the bucket. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, NetAppBucketPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _netAppBucketBucketsClientDiagnostics.CreateScope("NetAppBucketResource.Update"); + scope.Start(); + try + { + var response = await _netAppBucketBucketsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(new NetAppBucketOperationSource(Client), _netAppBucketBucketsClientDiagnostics, Pipeline, _netAppBucketBucketsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the details of a volume bucket. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName} + /// + /// + /// Operation Id + /// Buckets_Update + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The bucket details including user details, and the volume path that should be mounted inside the bucket. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, NetAppBucketPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _netAppBucketBucketsClientDiagnostics.CreateScope("NetAppBucketResource.Update"); + scope.Start(); + try + { + var response = _netAppBucketBucketsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new NetAppArmOperation(new NetAppBucketOperationSource(Client), _netAppBucketBucketsClientDiagnostics, Pipeline, _netAppBucketBucketsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// 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). + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}/generateCredentials + /// + /// + /// Operation Id + /// Buckets_GenerateCredentials + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The bucket's Access and Secret key pair expiry time expressed as the number of days from now. + /// The cancellation token to use. + /// is null. + public virtual async Task> GenerateCredentialsAsync(NetAppBucketCredentialsExpiry body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _netAppBucketBucketsClientDiagnostics.CreateScope("NetAppBucketResource.GenerateCredentials"); + scope.Start(); + try + { + var response = await _netAppBucketBucketsRestClient.GenerateCredentialsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// 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). + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName}/generateCredentials + /// + /// + /// Operation Id + /// Buckets_GenerateCredentials + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The bucket's Access and Secret key pair expiry time expressed as the number of days from now. + /// The cancellation token to use. + /// is null. + public virtual Response GenerateCredentials(NetAppBucketCredentialsExpiry body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _netAppBucketBucketsClientDiagnostics.CreateScope("NetAppBucketResource.GenerateCredentials"); + scope.Start(); + try + { + var response = _netAppBucketBucketsRestClient.GenerateCredentials(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, body, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppSubvolumeInfoCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppSubvolumeInfoCollection.cs index c0ebaa2a3c02..d49a228cee7f 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppSubvolumeInfoCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppSubvolumeInfoCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string subvolumeName, C /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string subvolumeName, Canc /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string subvolumeName, CancellationToken can /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppSubvolumeInfoResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppSubvolumeInfoResource.cs index 0dc8b09e2627..780f0233f7ec 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppSubvolumeInfoResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppSubvolumeInfoResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -268,7 +268,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -360,7 +360,7 @@ public virtual ArmOperation Update(WaitUntil waitUn /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual async Task> GetMetadataAsyn /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeCollection.cs index a37d44d0e8db..27eba1477597 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string volume /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string volumeName, Cancellatio /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string volumeName, Cancell /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string volumeName, CancellationToken cancel /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeData.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeData.Serialization.cs index 36554803a3cb..3507742c7dae 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeData.Serialization.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeData.Serialization.cs @@ -249,6 +249,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("ldapEnabled"u8); writer.WriteBooleanValue(IsLdapEnabled.Value); } + if (Optional.IsDefined(LdapServerType)) + { + writer.WritePropertyName("ldapServerType"u8); + writer.WriteStringValue(LdapServerType.Value.ToString()); + } if (Optional.IsDefined(IsCoolAccessEnabled)) { writer.WritePropertyName("coolAccess"u8); @@ -400,6 +405,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("isLargeVolume"u8); writer.WriteBooleanValue(IsLargeVolume.Value); } + if (Optional.IsDefined(LargeVolumeType)) + { + writer.WritePropertyName("largeVolumeType"u8); + writer.WriteStringValue(LargeVolumeType.Value.ToString()); + } if (options.Format != "W" && Optional.IsDefined(OriginatingResourceId)) { if (OriginatingResourceId != null) @@ -424,6 +434,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteNull("inheritedSizeInBytes"); } } + if (Optional.IsDefined(Language)) + { + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language.Value.ToString()); + } + if (Optional.IsDefined(BreakthroughMode)) + { + writer.WritePropertyName("breakthroughMode"u8); + writer.WriteStringValue(BreakthroughMode.Value.ToString()); + } writer.WriteEndObject(); } @@ -488,6 +508,7 @@ internal static NetAppVolumeData DeserializeNetAppVolumeData(JsonElement element NetAppEncryptionKeySource? encryptionKeySource = default; ResourceIdentifier keyVaultPrivateEndpointResourceId = default; bool? ldapEnabled = default; + LdapServerType? ldapServerType = default; bool? coolAccess = default; int? coolnessPeriod = default; CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy = default; @@ -511,8 +532,11 @@ internal static NetAppVolumeData DeserializeNetAppVolumeData(JsonElement element EnableNetAppSubvolume? enableSubvolumes = default; string provisionedAvailabilityZone = default; bool? isLargeVolume = default; + LargeVolumeType? largeVolumeType = default; ResourceIdentifier originatingResourceId = default; long? inheritedSizeInBytes = default; + NetAppVolumeLanguage? language = default; + BreakthroughMode? breakthroughMode = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -879,6 +903,15 @@ internal static NetAppVolumeData DeserializeNetAppVolumeData(JsonElement element ldapEnabled = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("ldapServerType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ldapServerType = new LdapServerType(property0.Value.GetString()); + continue; + } if (property0.NameEquals("coolAccess"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -1094,6 +1127,15 @@ internal static NetAppVolumeData DeserializeNetAppVolumeData(JsonElement element isLargeVolume = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("largeVolumeType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + largeVolumeType = new LargeVolumeType(property0.Value.GetString()); + continue; + } if (property0.NameEquals("originatingResourceId"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -1114,6 +1156,24 @@ internal static NetAppVolumeData DeserializeNetAppVolumeData(JsonElement element inheritedSizeInBytes = property0.Value.GetInt64(); continue; } + if (property0.NameEquals("language"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + language = new NetAppVolumeLanguage(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("breakthroughMode"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + breakthroughMode = new BreakthroughMode(property0.Value.GetString()); + continue; + } } continue; } @@ -1165,6 +1225,7 @@ internal static NetAppVolumeData DeserializeNetAppVolumeData(JsonElement element encryptionKeySource, keyVaultPrivateEndpointResourceId, ldapEnabled, + ldapServerType, coolAccess, coolnessPeriod, coolAccessRetrievalPolicy, @@ -1188,8 +1249,11 @@ internal static NetAppVolumeData DeserializeNetAppVolumeData(JsonElement element enableSubvolumes, provisionedAvailabilityZone, isLargeVolume, + largeVolumeType, originatingResourceId, inheritedSizeInBytes, + language, + breakthroughMode, serializedAdditionalRawData); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeData.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeData.cs index bce6d08288d9..285b3e1e8b38 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeData.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeData.cs @@ -54,7 +54,11 @@ public partial class NetAppVolumeData : TrackedResourceData /// Initializes a new instance of . /// The location. /// A unique file path for the volume. Used when creating mount targets. - /// 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. + /// + /// 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. + /// For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples of 1 GiB. + /// /// The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. /// or is null. public NetAppVolumeData(AzureLocation location, string creationToken, long usageThreshold, ResourceIdentifier subnetId) : base(location) @@ -84,7 +88,11 @@ public NetAppVolumeData(AzureLocation location, string creationToken, long usage /// Unique FileSystem Identifier. /// A unique file path for the volume. Used when creating mount targets. /// The service level of the file system. - /// 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. + /// + /// 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. + /// For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples of 1 GiB. + /// /// Set of export policy rules. /// Set of protocol types, default NFSv3, CIFS for SMB protocol. /// Azure lifecycle management. @@ -114,6 +122,7 @@ public NetAppVolumeData(AzureLocation location, string creationToken, long usage /// Source of key used to encrypt data in volume. Applicable if NetApp account has encryption.keySource = 'Microsoft.KeyVault'. Possible values (case-insensitive) are: 'Microsoft.NetApp, Microsoft.KeyVault'. /// The resource ID of private endpoint for KeyVault. It must reside in the same VNET as the volume. Only applicable if encryptionKeySource = 'Microsoft.KeyVault'. /// Specifies whether LDAP is enabled or not for a given NFS volume. + /// Specifies the type of LDAP server for a given NFS volume. /// Specifies whether Cool Access(tiering) is enabled for the volume. /// Specifies the number of days after which data that is not accessed by clients will be tiered. /// @@ -142,10 +151,17 @@ public NetAppVolumeData(AzureLocation location, string creationToken, long usage /// Flag indicating whether subvolume operations are enabled on the volume. /// The availability zone where the volume is provisioned. This refers to the logical availability zone where the volume resides. /// Specifies whether volume is a Large Volume or Regular Volume. + /// + /// 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. + /// /// Id of the snapshot or backup that the volume is restored from. /// Space shared by short term clone volume with parent volume in bytes. + /// Language supported for volume. + /// Specifies whether the volume operates in Breakthrough Mode. /// Keeps track of any properties unknown to the library. - internal NetAppVolumeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, IList zones, Guid? fileSystemId, string creationToken, NetAppFileServiceLevel? serviceLevel, long usageThreshold, VolumePropertiesExportPolicy exportPolicy, IList protocolTypes, string provisioningState, string snapshotId, bool? deleteBaseSnapshot, string backupId, string baremetalTenantId, ResourceIdentifier subnetId, NetAppNetworkFeature? networkFeatures, NetAppNetworkFeature? effectiveNetworkFeatures, Guid? networkSiblingSetId, NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity, IReadOnlyList mountTargets, string volumeType, NetAppVolumeDataProtection dataProtection, AcceptGrowCapacityPoolForShortTermCloneSplit? acceptGrowCapacityPoolForShortTermCloneSplit, bool? isRestoring, bool? isSnapshotDirectoryVisible, bool? isKerberosEnabled, NetAppVolumeSecurityStyle? securityStyle, bool? isSmbEncryptionEnabled, SmbAccessBasedEnumeration? smbAccessBasedEnumeration, SmbNonBrowsable? smbNonBrowsable, bool? isSmbContinuouslyAvailable, float? throughputMibps, float? actualThroughputMibps, NetAppEncryptionKeySource? encryptionKeySource, ResourceIdentifier keyVaultPrivateEndpointResourceId, bool? isLdapEnabled, bool? isCoolAccessEnabled, int? coolnessPeriod, CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy, CoolAccessTieringPolicy? coolAccessTieringPolicy, string unixPermissions, int? cloneProgress, NetAppFileAccessLog? fileAccessLogs, NetAppAvsDataStore? avsDataStore, IReadOnlyList dataStoreResourceId, bool? isDefaultQuotaEnabled, long? defaultUserQuotaInKiBs, long? defaultGroupQuotaInKiBs, long? maximumNumberOfFiles, string volumeGroupName, ResourceIdentifier capacityPoolResourceId, ResourceIdentifier proximityPlacementGroupId, string t2Network, string volumeSpecName, bool? isEncrypted, IList placementRules, EnableNetAppSubvolume? enableSubvolumes, string provisionedAvailabilityZone, bool? isLargeVolume, ResourceIdentifier originatingResourceId, long? inheritedSizeInBytes, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal NetAppVolumeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, IList zones, Guid? fileSystemId, string creationToken, NetAppFileServiceLevel? serviceLevel, long usageThreshold, VolumePropertiesExportPolicy exportPolicy, IList protocolTypes, string provisioningState, string snapshotId, bool? deleteBaseSnapshot, string backupId, string baremetalTenantId, ResourceIdentifier subnetId, NetAppNetworkFeature? networkFeatures, NetAppNetworkFeature? effectiveNetworkFeatures, Guid? networkSiblingSetId, NetAppVolumeStorageToNetworkProximity? storageToNetworkProximity, IReadOnlyList mountTargets, string volumeType, NetAppVolumeDataProtection dataProtection, AcceptGrowCapacityPoolForShortTermCloneSplit? acceptGrowCapacityPoolForShortTermCloneSplit, bool? isRestoring, bool? isSnapshotDirectoryVisible, bool? isKerberosEnabled, NetAppVolumeSecurityStyle? securityStyle, bool? isSmbEncryptionEnabled, SmbAccessBasedEnumeration? smbAccessBasedEnumeration, SmbNonBrowsable? smbNonBrowsable, bool? isSmbContinuouslyAvailable, float? throughputMibps, float? actualThroughputMibps, NetAppEncryptionKeySource? encryptionKeySource, ResourceIdentifier keyVaultPrivateEndpointResourceId, bool? isLdapEnabled, LdapServerType? ldapServerType, bool? isCoolAccessEnabled, int? coolnessPeriod, CoolAccessRetrievalPolicy? coolAccessRetrievalPolicy, CoolAccessTieringPolicy? coolAccessTieringPolicy, string unixPermissions, int? cloneProgress, NetAppFileAccessLog? fileAccessLogs, NetAppAvsDataStore? avsDataStore, IReadOnlyList dataStoreResourceId, bool? isDefaultQuotaEnabled, long? defaultUserQuotaInKiBs, long? defaultGroupQuotaInKiBs, long? maximumNumberOfFiles, string volumeGroupName, ResourceIdentifier capacityPoolResourceId, ResourceIdentifier proximityPlacementGroupId, string t2Network, string volumeSpecName, bool? isEncrypted, IList placementRules, EnableNetAppSubvolume? enableSubvolumes, string provisionedAvailabilityZone, bool? isLargeVolume, LargeVolumeType? largeVolumeType, ResourceIdentifier originatingResourceId, long? inheritedSizeInBytes, NetAppVolumeLanguage? language, BreakthroughMode? breakthroughMode, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { ETag = etag; Zones = zones; @@ -182,6 +198,7 @@ internal NetAppVolumeData(ResourceIdentifier id, string name, ResourceType resou EncryptionKeySource = encryptionKeySource; KeyVaultPrivateEndpointResourceId = keyVaultPrivateEndpointResourceId; IsLdapEnabled = isLdapEnabled; + LdapServerType = ldapServerType; IsCoolAccessEnabled = isCoolAccessEnabled; CoolnessPeriod = coolnessPeriod; CoolAccessRetrievalPolicy = coolAccessRetrievalPolicy; @@ -205,8 +222,11 @@ internal NetAppVolumeData(ResourceIdentifier id, string name, ResourceType resou EnableSubvolumes = enableSubvolumes; ProvisionedAvailabilityZone = provisionedAvailabilityZone; IsLargeVolume = isLargeVolume; + LargeVolumeType = largeVolumeType; OriginatingResourceId = originatingResourceId; InheritedSizeInBytes = inheritedSizeInBytes; + Language = language; + BreakthroughMode = breakthroughMode; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -225,7 +245,11 @@ internal NetAppVolumeData() public string CreationToken { get; set; } /// The service level of the file system. public NetAppFileServiceLevel? ServiceLevel { get; set; } - /// 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. + /// + /// 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. + /// For extra large volumes, valid values are in the range 2400GiB to 7200TiB. Values expressed in bytes as multiples of 1 GiB. + /// public long UsageThreshold { get; set; } /// Set of export policy rules. internal VolumePropertiesExportPolicy ExportPolicy { get; set; } @@ -294,6 +318,8 @@ public IList ExportRules public ResourceIdentifier KeyVaultPrivateEndpointResourceId { get; set; } /// Specifies whether LDAP is enabled or not for a given NFS volume. public bool? IsLdapEnabled { get; set; } + /// Specifies the type of LDAP server for a given NFS volume. + public LdapServerType? LdapServerType { get; set; } /// Specifies whether Cool Access(tiering) is enabled for the volume. public bool? IsCoolAccessEnabled { get; set; } /// Specifies the number of days after which data that is not accessed by clients will be tiered. @@ -345,9 +371,19 @@ public IList ExportRules public string ProvisionedAvailabilityZone { get; } /// Specifies whether volume is a Large Volume or Regular Volume. public bool? IsLargeVolume { get; set; } + /// + /// 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 LargeVolumeType? LargeVolumeType { get; set; } /// Id of the snapshot or backup that the volume is restored from. public ResourceIdentifier OriginatingResourceId { get; } /// Space shared by short term clone volume with parent volume in bytes. public long? InheritedSizeInBytes { get; } + /// Language supported for volume. + public NetAppVolumeLanguage? Language { get; set; } + /// Specifies whether the volume operates in Breakthrough Mode. + public BreakthroughMode? BreakthroughMode { get; set; } } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeGroupCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeGroupCollection.cs index f5beaa6f743e..2159a84dc392 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeGroupCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeGroupCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -159,7 +159,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -204,7 +204,7 @@ public virtual async Task> GetAsync(string v /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -249,7 +249,7 @@ public virtual Response Get(string volumeGroupName, C /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -292,7 +292,7 @@ public virtual async Task> ExistsAsync(string volumeGroupName, Ca /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -335,7 +335,7 @@ public virtual Response Exists(string volumeGroupName, CancellationToken c /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -380,7 +380,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeGroupResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeGroupResource.cs index 25eb829847b8..65aae1642713 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeGroupResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeGroupResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeQuotaRuleCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeQuotaRuleCollection.cs index aa7c1206643a..a54e57a00912 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeQuotaRuleCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeQuotaRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string volumeQuotaRul /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string volumeQuotaRuleName /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string volumeQuotaRuleName, CancellationTok /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeQuotaRuleResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeQuotaRuleResource.cs index 18ddd0cf5bae..7ad9832443e3 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeQuotaRuleResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeQuotaRuleResource.cs @@ -105,7 +105,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -361,7 +361,7 @@ public virtual ArmOperation Update(WaitUntil wait /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -423,7 +423,7 @@ public virtual async Task> AddTagAsync(s /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -485,7 +485,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -542,7 +542,7 @@ public virtual async Task> SetTagsAsync( /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -599,7 +599,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -659,7 +659,7 @@ public virtual async Task> RemoveTagAsyn /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeResource.cs index b263f1b98653..f370f396dc1c 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeResource.cs @@ -101,6 +101,148 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } + /// Gets a collection of NetAppBucketResources in the NetAppVolume. + /// An object representing collection of NetAppBucketResources and their operations over a NetAppBucketResource. + public virtual NetAppBucketCollection GetNetAppBuckets() + { + return GetCachedClient(client => new NetAppBucketCollection(client, 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. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName} + /// + /// + /// Operation Id + /// Buckets_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the bucket. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetNetAppBucketAsync(string bucketName, CancellationToken cancellationToken = default) + { + return await GetNetAppBuckets().GetAsync(bucketName, cancellationToken).ConfigureAwait(false); + } + + /// + /// 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. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/buckets/{bucketName} + /// + /// + /// Operation Id + /// Buckets_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the bucket. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetNetAppBucket(string bucketName, CancellationToken cancellationToken = default) + { + return GetNetAppBuckets().Get(bucketName, cancellationToken); + } + + /// Gets a collection of RansomwareReportResources in the NetAppVolume. + /// An object representing collection of RansomwareReportResources and their operations over a RansomwareReportResource. + public virtual RansomwareReportCollection GetRansomwareReports() + { + return GetCachedClient(client => new RansomwareReportCollection(client, Id)); + } + + /// + /// 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. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports/{ransomwareReportName} + /// + /// + /// Operation Id + /// RansomwareReports_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ransomware report. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetRansomwareReportAsync(string ransomwareReportName, CancellationToken cancellationToken = default) + { + return await GetRansomwareReports().GetAsync(ransomwareReportName, cancellationToken).ConfigureAwait(false); + } + + /// + /// 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. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports/{ransomwareReportName} + /// + /// + /// Operation Id + /// RansomwareReports_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ransomware report. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetRansomwareReport(string ransomwareReportName, CancellationToken cancellationToken = default) + { + return GetRansomwareReports().Get(ransomwareReportName, cancellationToken); + } + /// Gets a collection of NetAppVolumeSnapshotResources in the NetAppVolume. /// An object representing collection of NetAppVolumeSnapshotResources and their operations over a NetAppVolumeSnapshotResource. public virtual NetAppVolumeSnapshotCollection GetNetAppVolumeSnapshots() @@ -121,7 +263,7 @@ public virtual NetAppVolumeSnapshotCollection GetNetAppVolumeSnapshots() /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -152,7 +294,7 @@ public virtual async Task> GetNetAppVolum /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -190,7 +332,7 @@ public virtual NetAppSubvolumeInfoCollection GetNetAppSubvolumeInfos() /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -221,7 +363,7 @@ public virtual async Task> GetNetAppSubvol /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -259,7 +401,7 @@ public virtual NetAppVolumeQuotaRuleCollection GetNetAppVolumeQuotaRules() /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -290,7 +432,7 @@ public virtual async Task> GetNetAppVolu /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -321,7 +463,7 @@ public virtual Response GetNetAppVolumeQuotaRule( /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -361,7 +503,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -401,7 +543,7 @@ public virtual Response Get(CancellationToken cancellation /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -444,7 +586,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? f /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -487,7 +629,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? forceDelete = null /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -533,7 +675,7 @@ public virtual async Task> UpdateAsync(WaitUn /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -579,7 +721,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Ne /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -617,7 +759,7 @@ public virtual async Task> GetLatestStatusBac /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -655,7 +797,7 @@ public virtual Response GetLatestStatusBackup(Cancella /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -693,7 +835,7 @@ public virtual async Task> GetVolumeLatestRestoreS /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -731,7 +873,7 @@ public virtual Response GetVolumeLatestRestoreStatusBackup( /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -773,7 +915,7 @@ public virtual async Task> AuthorizeExternalR /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -815,7 +957,7 @@ public virtual ArmOperation AuthorizeExternalReplication(W /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -861,7 +1003,7 @@ public virtual async Task AuthorizeReplicationAsync(WaitUntil wait /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -907,7 +1049,7 @@ public virtual ArmOperation AuthorizeReplication(WaitUntil waitUntil, NetAppVolu /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -950,7 +1092,7 @@ public virtual async Task BreakFileLocksAsync(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -993,7 +1135,7 @@ public virtual ArmOperation BreakFileLocks(WaitUntil waitUntil, NetAppVolumeBrea /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1036,7 +1178,7 @@ public virtual async Task BreakReplicationAsync(WaitUntil waitUnti /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1079,7 +1221,7 @@ public virtual ArmOperation BreakReplication(WaitUntil waitUntil, NetAppVolumeBr /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1121,7 +1263,7 @@ public virtual async Task DeleteReplicationAsync(WaitUntil waitUnt /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1163,7 +1305,7 @@ public virtual ArmOperation DeleteReplication(WaitUntil waitUntil, CancellationT /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1205,7 +1347,7 @@ public virtual async Task FinalizeExternalReplicationAsync(WaitUnt /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1247,7 +1389,7 @@ public virtual ArmOperation FinalizeExternalReplication(WaitUntil waitUntil, Can /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1289,7 +1431,7 @@ public virtual async Task FinalizeRelocationAsync(WaitUntil waitUn /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1331,7 +1473,7 @@ public virtual ArmOperation FinalizeRelocation(WaitUntil waitUntil, Cancellation /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1377,7 +1519,7 @@ public virtual async Task> GetGetG /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1410,6 +1552,90 @@ public virtual ArmOperation GetGetGroupIdListFo } } + /// + /// A long-running resource action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/listQuotaReport + /// + /// + /// Operation Id + /// Volumes_ListQuotaReport + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> GetQuotaReportAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _netAppVolumeVolumesClientDiagnostics.CreateScope("NetAppVolumeResource.GetQuotaReport"); + scope.Start(); + try + { + var response = await _netAppVolumeVolumesRestClient.ListQuotaReportAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(new NetAppVolumeQuotaReportListResultOperationSource(), _netAppVolumeVolumesClientDiagnostics, Pipeline, _netAppVolumeVolumesRestClient.CreateListQuotaReportRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// A long-running resource action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/listQuotaReport + /// + /// + /// Operation Id + /// Volumes_ListQuotaReport + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation GetQuotaReport(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _netAppVolumeVolumesClientDiagnostics.CreateScope("NetAppVolumeResource.GetQuotaReport"); + scope.Start(); + try + { + var response = _netAppVolumeVolumesRestClient.ListQuotaReport(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new NetAppArmOperation(new NetAppVolumeQuotaReportListResultOperationSource(), _netAppVolumeVolumesClientDiagnostics, Pipeline, _netAppVolumeVolumesRestClient.CreateListQuotaReportRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// List all replications for a specified volume /// @@ -1423,7 +1649,7 @@ public virtual ArmOperation GetGetGroupIdListFo /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1454,7 +1680,7 @@ public virtual AsyncPageable GetReplicationsAsync(ListR /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1485,7 +1711,7 @@ public virtual Pageable GetReplications(ListReplication /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1531,7 +1757,7 @@ public virtual async Task> PeerExternalCl /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1577,7 +1803,7 @@ public virtual ArmOperation PeerExternalCluster(WaitUn /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1619,7 +1845,7 @@ public virtual async Task PerformReplicationTransferAsync(WaitUnti /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1661,7 +1887,7 @@ public virtual ArmOperation PerformReplicationTransfer(WaitUntil waitUntil, Canc /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1707,7 +1933,7 @@ public virtual async Task PoolChangeAsync(WaitUntil waitUntil, Net /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1753,7 +1979,7 @@ public virtual ArmOperation PoolChange(WaitUntil waitUntil, NetAppVolumePoolChan /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1795,7 +2021,7 @@ public virtual async Task> PopulateAvailabili /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1837,7 +2063,7 @@ public virtual ArmOperation PopulateAvailabilityZone(WaitU /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1883,7 +2109,7 @@ public virtual async Task ReestablishReplicationAsync(WaitUntil wa /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1929,7 +2155,7 @@ public virtual ArmOperation ReestablishReplication(WaitUntil waitUntil, NetAppVo /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -1971,7 +2197,7 @@ public virtual async Task ReInitializeReplicationAsync(WaitUntil w /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -2013,7 +2239,7 @@ public virtual ArmOperation ReInitializeReplication(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -2056,7 +2282,7 @@ public virtual async Task RelocateAsync(WaitUntil waitUntil, Reloc /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -2099,7 +2325,7 @@ public virtual ArmOperation Relocate(WaitUntil waitUntil, RelocateVolumeContent /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -2137,7 +2363,7 @@ public virtual async Task> GetReplicatio /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -2175,7 +2401,7 @@ public virtual Response GetReplicationStatus(Canc /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -2217,7 +2443,7 @@ public virtual async Task ResetCifsPasswordAsync(WaitUntil waitUnt /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -2259,7 +2485,7 @@ public virtual ArmOperation ResetCifsPassword(WaitUntil waitUntil, CancellationT /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -2301,7 +2527,7 @@ public virtual async Task ResyncReplicationAsync(WaitUntil waitUnt /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -2343,7 +2569,7 @@ public virtual ArmOperation ResyncReplication(WaitUntil waitUntil, CancellationT /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -2389,7 +2615,7 @@ public virtual async Task RevertAsync(WaitUntil waitUntil, NetAppV /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -2435,7 +2661,7 @@ public virtual ArmOperation Revert(WaitUntil waitUntil, NetAppVolumeRevertConten /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -2477,7 +2703,7 @@ public virtual async Task RevertRelocationAsync(WaitUntil waitUnti /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -2519,7 +2745,7 @@ public virtual ArmOperation RevertRelocation(WaitUntil waitUntil, CancellationTo /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -2561,7 +2787,7 @@ public virtual async Task> SplitCloneFromPare /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -2603,7 +2829,7 @@ public virtual ArmOperation SplitCloneFromParent(WaitUntil /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -2645,7 +2871,7 @@ public virtual async Task MigrateBackupsBackupsUnderVolumeAsync(Wa /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// @@ -2687,7 +2913,7 @@ public virtual ArmOperation MigrateBackupsBackupsUnderVolume(WaitUntil waitUntil /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -2749,7 +2975,7 @@ public virtual async Task> AddTagAsync(string key /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -2811,7 +3037,7 @@ public virtual Response AddTag(string key, string value, C /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -2868,7 +3094,7 @@ public virtual async Task> SetTagsAsync(IDictiona /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -2925,7 +3151,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -2985,7 +3211,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeSnapshotCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeSnapshotCollection.cs index 64477096027f..8e8b298beb94 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeSnapshotCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeSnapshotCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string snapshotName, C /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string snapshotName, Cance /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string snapshotName, CancellationToken canc /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeSnapshotResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeSnapshotResource.cs index bd49d82d3776..525b092ed96b 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeSnapshotResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeSnapshotResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -268,7 +268,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task> UpdateAsyn /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -360,7 +360,7 @@ public virtual ArmOperation Update(WaitUntil waitU /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -406,7 +406,7 @@ public virtual async Task RestoreFilesAsync(WaitUntil waitUntil, N /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RansomwareReportCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RansomwareReportCollection.cs new file mode 100644 index 000000000000..05ce3e27a86f --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RansomwareReportCollection.cs @@ -0,0 +1,405 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetRansomwareReports method from an instance of . + /// + public partial class RansomwareReportCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _ransomwareReportClientDiagnostics; + private readonly RansomwareReportsRestOperations _ransomwareReportRestClient; + + /// Initializes a new instance of the class for mocking. + protected RansomwareReportCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal RansomwareReportCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _ransomwareReportClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NetApp", RansomwareReportResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(RansomwareReportResource.ResourceType, out string ransomwareReportApiVersion); + _ransomwareReportRestClient = new RansomwareReportsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, ransomwareReportApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != NetAppVolumeResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, NetAppVolumeResource.ResourceType), nameof(id)); + } + + /// + /// 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. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports/{ransomwareReportName} + /// + /// + /// Operation Id + /// RansomwareReports_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ransomware report. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string ransomwareReportName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(ransomwareReportName, nameof(ransomwareReportName)); + + using var scope = _ransomwareReportClientDiagnostics.CreateScope("RansomwareReportCollection.Get"); + scope.Start(); + try + { + var response = await _ransomwareReportRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ransomwareReportName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new RansomwareReportResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// 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. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports/{ransomwareReportName} + /// + /// + /// Operation Id + /// RansomwareReports_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ransomware report. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string ransomwareReportName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(ransomwareReportName, nameof(ransomwareReportName)); + + using var scope = _ransomwareReportClientDiagnostics.CreateScope("RansomwareReportCollection.Get"); + scope.Start(); + try + { + var response = _ransomwareReportRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ransomwareReportName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new RansomwareReportResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// 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" + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports + /// + /// + /// Operation Id + /// RansomwareReports_List + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _ransomwareReportRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _ransomwareReportRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new RansomwareReportResource(Client, RansomwareReportData.DeserializeRansomwareReportData(e)), _ransomwareReportClientDiagnostics, Pipeline, "RansomwareReportCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// 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" + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports + /// + /// + /// Operation Id + /// RansomwareReports_List + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _ransomwareReportRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _ransomwareReportRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new RansomwareReportResource(Client, RansomwareReportData.DeserializeRansomwareReportData(e)), _ransomwareReportClientDiagnostics, Pipeline, "RansomwareReportCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports/{ransomwareReportName} + /// + /// + /// Operation Id + /// RansomwareReports_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ransomware report. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string ransomwareReportName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(ransomwareReportName, nameof(ransomwareReportName)); + + using var scope = _ransomwareReportClientDiagnostics.CreateScope("RansomwareReportCollection.Exists"); + scope.Start(); + try + { + var response = await _ransomwareReportRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ransomwareReportName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports/{ransomwareReportName} + /// + /// + /// Operation Id + /// RansomwareReports_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ransomware report. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string ransomwareReportName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(ransomwareReportName, nameof(ransomwareReportName)); + + using var scope = _ransomwareReportClientDiagnostics.CreateScope("RansomwareReportCollection.Exists"); + scope.Start(); + try + { + var response = _ransomwareReportRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ransomwareReportName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports/{ransomwareReportName} + /// + /// + /// Operation Id + /// RansomwareReports_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ransomware report. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string ransomwareReportName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(ransomwareReportName, nameof(ransomwareReportName)); + + using var scope = _ransomwareReportClientDiagnostics.CreateScope("RansomwareReportCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _ransomwareReportRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ransomwareReportName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new RansomwareReportResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports/{ransomwareReportName} + /// + /// + /// Operation Id + /// RansomwareReports_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ransomware report. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string ransomwareReportName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(ransomwareReportName, nameof(ransomwareReportName)); + + using var scope = _ransomwareReportClientDiagnostics.CreateScope("RansomwareReportCollection.GetIfExists"); + scope.Start(); + try + { + var response = _ransomwareReportRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ransomwareReportName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new RansomwareReportResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RansomwareReportData.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RansomwareReportData.Serialization.cs new file mode 100644 index 000000000000..fb369c8ef427 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RansomwareReportData.Serialization.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + public partial class RansomwareReportData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RansomwareReportData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + RansomwareReportData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RansomwareReportData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRansomwareReportData(document.RootElement, options); + } + + internal static RansomwareReportData DeserializeRansomwareReportData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RansomwareReportProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = RansomwareReportProperties.DeserializeRansomwareReportProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerNetAppContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RansomwareReportData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerNetAppContext.Default); + default: + throw new FormatException($"The model {nameof(RansomwareReportData)} does not support writing '{options.Format}' format."); + } + } + + RansomwareReportData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRansomwareReportData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RansomwareReportData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RansomwareReportData.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RansomwareReportData.cs new file mode 100644 index 000000000000..5320ff915075 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RansomwareReportData.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A class representing the RansomwareReport data model. + /// 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. + /// + public partial class RansomwareReportData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public RansomwareReportData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Advanced Ransomware Protection reports Properties. + /// Keeps track of any properties unknown to the library. + internal RansomwareReportData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, RansomwareReportProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Advanced Ransomware Protection reports Properties. + public RansomwareReportProperties Properties { get; set; } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RansomwareReportResource.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RansomwareReportResource.Serialization.cs new file mode 100644 index 000000000000..5f9c69a490db --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RansomwareReportResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.NetApp +{ + public partial class RansomwareReportResource : IJsonModel + { + private static RansomwareReportData s_dataDeserializationInstance; + private static RansomwareReportData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + RansomwareReportData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetAppContext.Default); + + RansomwareReportData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetAppContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RansomwareReportResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RansomwareReportResource.cs new file mode 100644 index 000000000000..812e97007fba --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RansomwareReportResource.cs @@ -0,0 +1,272 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + /// + /// A Class representing a RansomwareReport along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetRansomwareReportResource method. + /// Otherwise you can get one from its parent resource using the GetRansomwareReport method. + /// + public partial class RansomwareReportResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The accountName. + /// The poolName. + /// The volumeName. + /// The ransomwareReportName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string ransomwareReportName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports/{ransomwareReportName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _ransomwareReportClientDiagnostics; + private readonly RansomwareReportsRestOperations _ransomwareReportRestClient; + private readonly RansomwareReportData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.NetApp/netAppAccounts/capacityPools/volumes/ransomwareReports"; + + /// Initializes a new instance of the class for mocking. + protected RansomwareReportResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal RansomwareReportResource(ArmClient client, RansomwareReportData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal RansomwareReportResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _ransomwareReportClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NetApp", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string ransomwareReportApiVersion); + _ransomwareReportRestClient = new RansomwareReportsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, ransomwareReportApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual RansomwareReportData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// 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. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports/{ransomwareReportName} + /// + /// + /// Operation Id + /// RansomwareReports_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _ransomwareReportClientDiagnostics.CreateScope("RansomwareReportResource.Get"); + scope.Start(); + try + { + var response = await _ransomwareReportRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new RansomwareReportResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// 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. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports/{ransomwareReportName} + /// + /// + /// Operation Id + /// RansomwareReports_Get + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _ransomwareReportClientDiagnostics.CreateScope("RansomwareReportResource.Get"); + scope.Start(); + try + { + var response = _ransomwareReportRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new RansomwareReportResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// "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", + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports/{ransomwareReportName}/clearSuspects + /// + /// + /// Operation Id + /// RansomwareReports_ClearSuspects + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Clear suspects request object supplied in the body of the operation. + /// The cancellation token to use. + /// is null. + public virtual async Task ClearSuspectsAsync(WaitUntil waitUntil, RansomwareSuspectsClearContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _ransomwareReportClientDiagnostics.CreateScope("RansomwareReportResource.ClearSuspects"); + scope.Start(); + try + { + var response = await _ransomwareReportRestClient.ClearSuspectsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new NetAppArmOperation(_ransomwareReportClientDiagnostics, Pipeline, _ransomwareReportRestClient.CreateClearSuspectsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// "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", + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/ransomwareReports/{ransomwareReportName}/clearSuspects + /// + /// + /// Operation Id + /// RansomwareReports_ClearSuspects + /// + /// + /// Default Api Version + /// 2025-09-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Clear suspects request object supplied in the body of the operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation ClearSuspects(WaitUntil waitUntil, RansomwareSuspectsClearContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _ransomwareReportClientDiagnostics.CreateScope("RansomwareReportResource.ClearSuspects"); + scope.Start(); + try + { + var response = _ransomwareReportRestClient.ClearSuspects(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new NetAppArmOperation(_ransomwareReportClientDiagnostics, Pipeline, _ransomwareReportRestClient.CreateClearSuspectsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RegionInfoResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RegionInfoResource.cs index 8acf9a7cc8e2..07f20706b805 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RegionInfoResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RegionInfoResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RegionInfoResourceCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RegionInfoResourceCollection.cs index 1b08ace36728..7f9b8f16867a 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RegionInfoResourceCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RegionInfoResourceCollection.cs @@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -108,7 +108,7 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -148,7 +148,7 @@ public virtual Response Get(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -178,7 +178,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken c /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual Pageable GetAll(CancellationToken cancellatio /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -246,7 +246,7 @@ public virtual async Task> ExistsAsync(CancellationToken cancella /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -284,7 +284,7 @@ public virtual Response Exists(CancellationToken cancellationToken = defau /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -324,7 +324,7 @@ public virtual async Task> GetIfExistsAsync /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/AccountsRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/AccountsRestOperations.cs index 3a640ff1caaa..0cfd706dfc61 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/AccountsRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/AccountsRestOperations.cs @@ -32,7 +32,7 @@ public AccountsRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-09-01"; + _apiVersion = apiVersion ?? "2025-09-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/ActiveDirectoryConfigsRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/ActiveDirectoryConfigsRestOperations.cs new file mode 100644 index 000000000000..1905dc01e243 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/ActiveDirectoryConfigsRestOperations.cs @@ -0,0 +1,723 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + internal partial class ActiveDirectoryConfigsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ActiveDirectoryConfigsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ActiveDirectoryConfigsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-09-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.NetApp/activeDirectoryConfigs", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.NetApp/activeDirectoryConfigs", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all active directory configurations within the subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ActiveDirectoryConfigListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ActiveDirectoryConfigListResult.DeserializeActiveDirectoryConfigListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all active directory configurations within the subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ActiveDirectoryConfigListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ActiveDirectoryConfigListResult.DeserializeActiveDirectoryConfigListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/activeDirectoryConfigs", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/activeDirectoryConfigs", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all active directory configurations within the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ActiveDirectoryConfigListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ActiveDirectoryConfigListResult.DeserializeActiveDirectoryConfigListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all active directory configurations within the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ActiveDirectoryConfigListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ActiveDirectoryConfigListResult.DeserializeActiveDirectoryConfigListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string activeDirectoryConfigName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/activeDirectoryConfigs/", false); + uri.AppendPath(activeDirectoryConfigName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string activeDirectoryConfigName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/activeDirectoryConfigs/", false); + uri.AppendPath(activeDirectoryConfigName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the details of the specified active directory configuration. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ActiveDirectoryConfig. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string activeDirectoryConfigName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(activeDirectoryConfigName, nameof(activeDirectoryConfigName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, activeDirectoryConfigName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ActiveDirectoryConfigData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ActiveDirectoryConfigData.DeserializeActiveDirectoryConfigData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ActiveDirectoryConfigData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the details of the specified active directory configuration. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ActiveDirectoryConfig. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string activeDirectoryConfigName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(activeDirectoryConfigName, nameof(activeDirectoryConfigName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, activeDirectoryConfigName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ActiveDirectoryConfigData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ActiveDirectoryConfigData.DeserializeActiveDirectoryConfigData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ActiveDirectoryConfigData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string activeDirectoryConfigName, ActiveDirectoryConfigData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/activeDirectoryConfigs/", false); + uri.AppendPath(activeDirectoryConfigName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string activeDirectoryConfigName, ActiveDirectoryConfigData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/activeDirectoryConfigs/", false); + uri.AppendPath(activeDirectoryConfigName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update the specified active directory configuration. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ActiveDirectoryConfig. + /// Resource create parameters. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string activeDirectoryConfigName, ActiveDirectoryConfigData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(activeDirectoryConfigName, nameof(activeDirectoryConfigName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, activeDirectoryConfigName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update the specified active directory configuration. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ActiveDirectoryConfig. + /// Resource create parameters. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string activeDirectoryConfigName, ActiveDirectoryConfigData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(activeDirectoryConfigName, nameof(activeDirectoryConfigName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, activeDirectoryConfigName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string activeDirectoryConfigName, ActiveDirectoryConfigPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/activeDirectoryConfigs/", false); + uri.AppendPath(activeDirectoryConfigName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string activeDirectoryConfigName, ActiveDirectoryConfigPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/activeDirectoryConfigs/", false); + uri.AppendPath(activeDirectoryConfigName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Patch the specified active directory configuration. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ActiveDirectoryConfig. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string activeDirectoryConfigName, ActiveDirectoryConfigPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(activeDirectoryConfigName, nameof(activeDirectoryConfigName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, activeDirectoryConfigName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Patch the specified active directory configuration. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ActiveDirectoryConfig. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string activeDirectoryConfigName, ActiveDirectoryConfigPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(activeDirectoryConfigName, nameof(activeDirectoryConfigName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, activeDirectoryConfigName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string activeDirectoryConfigName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/activeDirectoryConfigs/", false); + uri.AppendPath(activeDirectoryConfigName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string activeDirectoryConfigName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/activeDirectoryConfigs/", false); + uri.AppendPath(activeDirectoryConfigName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete the specified Active Directory configuration. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ActiveDirectoryConfig. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string activeDirectoryConfigName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(activeDirectoryConfigName, nameof(activeDirectoryConfigName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, activeDirectoryConfigName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete the specified Active Directory configuration. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ActiveDirectoryConfig. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string activeDirectoryConfigName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(activeDirectoryConfigName, nameof(activeDirectoryConfigName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, activeDirectoryConfigName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all active directory configurations within the subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ActiveDirectoryConfigListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ActiveDirectoryConfigListResult.DeserializeActiveDirectoryConfigListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all active directory configurations within the subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ActiveDirectoryConfigListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ActiveDirectoryConfigListResult.DeserializeActiveDirectoryConfigListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all active directory configurations within the resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ActiveDirectoryConfigListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ActiveDirectoryConfigListResult.DeserializeActiveDirectoryConfigListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all active directory configurations within the resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ActiveDirectoryConfigListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ActiveDirectoryConfigListResult.DeserializeActiveDirectoryConfigListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupPoliciesRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupPoliciesRestOperations.cs index 59f0d7e8c2c1..df235311af58 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupPoliciesRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public BackupPoliciesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-09-01"; + _apiVersion = apiVersion ?? "2025-09-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupVaultsRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupVaultsRestOperations.cs index 65edb984c879..d8c394a33d51 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupVaultsRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupVaultsRestOperations.cs @@ -32,7 +32,7 @@ public BackupVaultsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-09-01"; + _apiVersion = apiVersion ?? "2025-09-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsRestOperations.cs index 96c225703580..46a30e5e4837 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsRestOperations.cs @@ -32,7 +32,7 @@ public BackupsRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-09-01"; + _apiVersion = apiVersion ?? "2025-09-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsUnderAccountRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsUnderAccountRestOperations.cs index c6c8c7cafa2a..e10c7fcf0dc6 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsUnderAccountRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsUnderAccountRestOperations.cs @@ -31,7 +31,7 @@ public BackupsUnderAccountRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-09-01"; + _apiVersion = apiVersion ?? "2025-09-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsUnderBackupVaultRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsUnderBackupVaultRestOperations.cs index a52a788b9754..16d93f7bcf29 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsUnderBackupVaultRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsUnderBackupVaultRestOperations.cs @@ -31,7 +31,7 @@ public BackupsUnderBackupVaultRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-09-01"; + _apiVersion = apiVersion ?? "2025-09-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsUnderVolumeRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsUnderVolumeRestOperations.cs index 9d0758dd4fe2..e7886eae3e9a 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsUnderVolumeRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BackupsUnderVolumeRestOperations.cs @@ -31,7 +31,7 @@ public BackupsUnderVolumeRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-09-01"; + _apiVersion = apiVersion ?? "2025-09-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BucketsRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BucketsRestOperations.cs new file mode 100644 index 000000000000..8b652c0b6bed --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/BucketsRestOperations.cs @@ -0,0 +1,827 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + internal partial class BucketsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of BucketsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public BucketsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-09-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/buckets", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/buckets", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Describes all buckets belonging to a volume. Buckets allow additional services, such as AI services, connect to the volume data contained in those buckets. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NetAppBucketList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = NetAppBucketList.DeserializeNetAppBucketList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Describes all buckets belonging to a volume. Buckets allow additional services, such as AI services, connect to the volume data contained in those buckets. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NetAppBucketList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = NetAppBucketList.DeserializeNetAppBucketList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string bucketName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/buckets/", false); + uri.AppendPath(bucketName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string bucketName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/buckets/", false); + uri.AppendPath(bucketName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// 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. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// The name of the bucket. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string bucketName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + Argument.AssertNotNullOrEmpty(bucketName, nameof(bucketName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName, bucketName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NetAppBucketData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = NetAppBucketData.DeserializeNetAppBucketData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NetAppBucketData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// 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. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// The name of the bucket. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string bucketName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + Argument.AssertNotNullOrEmpty(bucketName, nameof(bucketName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName, bucketName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NetAppBucketData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = NetAppBucketData.DeserializeNetAppBucketData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NetAppBucketData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string bucketName, NetAppBucketData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/buckets/", false); + uri.AppendPath(bucketName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string bucketName, NetAppBucketData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/buckets/", false); + uri.AppendPath(bucketName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// 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. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// The name of the bucket. + /// The bucket details including user details, and the volume path that should be mounted inside the bucket. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string bucketName, NetAppBucketData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + Argument.AssertNotNullOrEmpty(bucketName, nameof(bucketName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName, bucketName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// 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. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// The name of the bucket. + /// The bucket details including user details, and the volume path that should be mounted inside the bucket. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string bucketName, NetAppBucketData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + Argument.AssertNotNullOrEmpty(bucketName, nameof(bucketName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName, bucketName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string bucketName, NetAppBucketPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/buckets/", false); + uri.AppendPath(bucketName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string bucketName, NetAppBucketPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/buckets/", false); + uri.AppendPath(bucketName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the details of a volume bucket. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// The name of the bucket. + /// The bucket details including user details, and the volume path that should be mounted inside the bucket. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string bucketName, NetAppBucketPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + Argument.AssertNotNullOrEmpty(bucketName, nameof(bucketName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName, bucketName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the details of a volume bucket. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// The name of the bucket. + /// The bucket details including user details, and the volume path that should be mounted inside the bucket. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string bucketName, NetAppBucketPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + Argument.AssertNotNullOrEmpty(bucketName, nameof(bucketName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName, bucketName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string bucketName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/buckets/", false); + uri.AppendPath(bucketName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string bucketName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/buckets/", false); + uri.AppendPath(bucketName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a volume's bucket. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// The name of the bucket. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string bucketName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + Argument.AssertNotNullOrEmpty(bucketName, nameof(bucketName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName, bucketName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a volume's bucket. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// The name of the bucket. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string bucketName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + Argument.AssertNotNullOrEmpty(bucketName, nameof(bucketName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName, bucketName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGenerateCredentialsRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string bucketName, NetAppBucketCredentialsExpiry body) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/buckets/", false); + uri.AppendPath(bucketName, true); + uri.AppendPath("/generateCredentials", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGenerateCredentialsRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string bucketName, NetAppBucketCredentialsExpiry body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/buckets/", false); + uri.AppendPath(bucketName, true); + uri.AppendPath("/generateCredentials", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// 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). + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// The name of the bucket. + /// The bucket's Access and Secret key pair expiry time expressed as the number of days from now. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> GenerateCredentialsAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string bucketName, NetAppBucketCredentialsExpiry body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + Argument.AssertNotNullOrEmpty(bucketName, nameof(bucketName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateGenerateCredentialsRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName, bucketName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NetAppBucketGenerateCredentials value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = NetAppBucketGenerateCredentials.DeserializeNetAppBucketGenerateCredentials(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// 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). + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// The name of the bucket. + /// The bucket's Access and Secret key pair expiry time expressed as the number of days from now. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response GenerateCredentials(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string bucketName, NetAppBucketCredentialsExpiry body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + Argument.AssertNotNullOrEmpty(bucketName, nameof(bucketName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateGenerateCredentialsRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName, bucketName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NetAppBucketGenerateCredentials value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = NetAppBucketGenerateCredentials.DeserializeNetAppBucketGenerateCredentials(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Describes all buckets belonging to a volume. Buckets allow additional services, such as AI services, connect to the volume data contained in those buckets. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, accountName, poolName, volumeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NetAppBucketList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = NetAppBucketList.DeserializeNetAppBucketList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Describes all buckets belonging to a volume. Buckets allow additional services, such as AI services, connect to the volume data contained in those buckets. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, accountName, poolName, volumeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NetAppBucketList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = NetAppBucketList.DeserializeNetAppBucketList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/CachesRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/CachesRestOperations.cs new file mode 100644 index 000000000000..767d27ab3763 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/CachesRestOperations.cs @@ -0,0 +1,877 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + internal partial class CachesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of CachesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public CachesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-09-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByCapacityPoolsRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/caches", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByCapacityPoolsRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/caches", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all Caches within the Capacity Pool. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByCapacityPoolsAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + + using var message = CreateListByCapacityPoolsRequest(subscriptionId, resourceGroupName, accountName, poolName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CacheList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CacheList.DeserializeCacheList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all Caches within the Capacity Pool. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByCapacityPools(string subscriptionId, string resourceGroupName, string accountName, string poolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + + using var message = CreateListByCapacityPoolsRequest(subscriptionId, resourceGroupName, accountName, poolName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CacheList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CacheList.DeserializeCacheList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string cacheName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/caches/", false); + uri.AppendPath(cacheName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, string cacheName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/caches/", false); + uri.AppendPath(cacheName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the details of the specified Cache. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the cache resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, string cacheName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(cacheName, nameof(cacheName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName, poolName, cacheName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CacheData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CacheData.DeserializeCacheData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((CacheData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the details of the specified Cache. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the cache resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string accountName, string poolName, string cacheName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(cacheName, nameof(cacheName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName, poolName, cacheName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CacheData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CacheData.DeserializeCacheData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((CacheData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string cacheName, CacheData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/caches/", false); + uri.AppendPath(cacheName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, string cacheName, CacheData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/caches/", false); + uri.AppendPath(cacheName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update the specified Cache within the Capacity Pool. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the cache resource. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, string cacheName, CacheData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(cacheName, nameof(cacheName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, accountName, poolName, cacheName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update the specified Cache within the Capacity Pool. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the cache resource. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string accountName, string poolName, string cacheName, CacheData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(cacheName, nameof(cacheName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, accountName, poolName, cacheName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string cacheName, CachePatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/caches/", false); + uri.AppendPath(cacheName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, string cacheName, CachePatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/caches/", false); + uri.AppendPath(cacheName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Patch the specified Cache. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the cache resource. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, string cacheName, CachePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(cacheName, nameof(cacheName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, accountName, poolName, cacheName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Patch the specified Cache. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the cache resource. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string accountName, string poolName, string cacheName, CachePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(cacheName, nameof(cacheName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, accountName, poolName, cacheName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string cacheName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/caches/", false); + uri.AppendPath(cacheName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, string cacheName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/caches/", false); + uri.AppendPath(cacheName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete the specified cache. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the cache resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, string cacheName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(cacheName, nameof(cacheName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, accountName, poolName, cacheName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete the specified cache. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the cache resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string accountName, string poolName, string cacheName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(cacheName, nameof(cacheName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, accountName, poolName, cacheName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListPeeringPassphrasesRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string cacheName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/caches/", false); + uri.AppendPath(cacheName, true); + uri.AppendPath("/listPeeringPassphrases", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListPeeringPassphrasesRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, string cacheName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/caches/", false); + uri.AppendPath(cacheName, true); + uri.AppendPath("/listPeeringPassphrases", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// This operation will list the cluster peering command, cluster peering passphrase and the vserver peering command. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the cache resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListPeeringPassphrasesAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, string cacheName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(cacheName, nameof(cacheName)); + + using var message = CreateListPeeringPassphrasesRequest(subscriptionId, resourceGroupName, accountName, poolName, cacheName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PeeringPassphrases value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PeeringPassphrases.DeserializePeeringPassphrases(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// This operation will list the cluster peering command, cluster peering passphrase and the vserver peering command. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the cache resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListPeeringPassphrases(string subscriptionId, string resourceGroupName, string accountName, string poolName, string cacheName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(cacheName, nameof(cacheName)); + + using var message = CreateListPeeringPassphrasesRequest(subscriptionId, resourceGroupName, accountName, poolName, cacheName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PeeringPassphrases value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PeeringPassphrases.DeserializePeeringPassphrases(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreatePoolChangeRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string cacheName, NetAppVolumePoolChangeContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/caches/", false); + uri.AppendPath(cacheName, true); + uri.AppendPath("/poolChange", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreatePoolChangeRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, string cacheName, NetAppVolumePoolChangeContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/caches/", false); + uri.AppendPath(cacheName, true); + uri.AppendPath("/poolChange", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Moves Cache to another Capacity Pool. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the cache resource. + /// Move cache to the pool supplied in the body of the operation. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task PoolChangeAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, string cacheName, NetAppVolumePoolChangeContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(cacheName, nameof(cacheName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreatePoolChangeRequest(subscriptionId, resourceGroupName, accountName, poolName, cacheName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Moves Cache to another Capacity Pool. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the cache resource. + /// Move cache to the pool supplied in the body of the operation. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response PoolChange(string subscriptionId, string resourceGroupName, string accountName, string poolName, string cacheName, NetAppVolumePoolChangeContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(cacheName, nameof(cacheName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreatePoolChangeRequest(subscriptionId, resourceGroupName, accountName, poolName, cacheName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByCapacityPoolsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string accountName, string poolName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByCapacityPoolsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string accountName, string poolName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all Caches within the Capacity Pool. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByCapacityPoolsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string accountName, string poolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + + using var message = CreateListByCapacityPoolsNextPageRequest(nextLink, subscriptionId, resourceGroupName, accountName, poolName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CacheList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CacheList.DeserializeCacheList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all Caches within the Capacity Pool. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByCapacityPoolsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string accountName, string poolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + + using var message = CreateListByCapacityPoolsNextPageRequest(nextLink, subscriptionId, resourceGroupName, accountName, poolName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CacheList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CacheList.DeserializeCacheList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/ElasticAccountsRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/ElasticAccountsRestOperations.cs new file mode 100644 index 000000000000..86201bef04bc --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/ElasticAccountsRestOperations.cs @@ -0,0 +1,723 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + internal partial class ElasticAccountsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ElasticAccountsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ElasticAccountsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-09-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List and describe all NetApp elastic accounts in the subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ElasticAccountListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ElasticAccountListResult.DeserializeElasticAccountListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List and describe all NetApp elastic accounts in the subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ElasticAccountListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ElasticAccountListResult.DeserializeElasticAccountListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List and describe all NetApp elastic accounts in the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ElasticAccountListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ElasticAccountListResult.DeserializeElasticAccountListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List and describe all NetApp elastic accounts in the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ElasticAccountListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ElasticAccountListResult.DeserializeElasticAccountListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string accountName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string accountName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the NetApp Elastic Account. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ElasticAccountData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ElasticAccountData.DeserializeElasticAccountData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ElasticAccountData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the NetApp Elastic Account. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ElasticAccountData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ElasticAccountData.DeserializeElasticAccountData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ElasticAccountData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string accountName, ElasticAccountData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string accountName, ElasticAccountData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update the specified NetApp Elastic Account within the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// Resource create parameters. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string accountName, ElasticAccountData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, accountName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update the specified NetApp Elastic Account within the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// Resource create parameters. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string accountName, ElasticAccountData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, accountName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string accountName, ElasticAccountPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string accountName, ElasticAccountPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Patch the specified NetApp Elastic Account. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string accountName, ElasticAccountPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, accountName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Patch the specified NetApp Elastic Account. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string accountName, ElasticAccountPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, accountName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string accountName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string accountName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete the specified NetApp elastic account. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, accountName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete the specified NetApp elastic account. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, accountName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List and describe all NetApp elastic accounts in the subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ElasticAccountListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ElasticAccountListResult.DeserializeElasticAccountListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List and describe all NetApp elastic accounts in the subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ElasticAccountListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ElasticAccountListResult.DeserializeElasticAccountListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List and describe all NetApp elastic accounts in the resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ElasticAccountListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ElasticAccountListResult.DeserializeElasticAccountListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List and describe all NetApp elastic accounts in the resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ElasticAccountListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ElasticAccountListResult.DeserializeElasticAccountListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/ElasticBackupPoliciesRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/ElasticBackupPoliciesRestOperations.cs new file mode 100644 index 000000000000..e6055f854ca6 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/ElasticBackupPoliciesRestOperations.cs @@ -0,0 +1,613 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + internal partial class ElasticBackupPoliciesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ElasticBackupPoliciesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ElasticBackupPoliciesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-09-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByElasticAccountRequestUri(string subscriptionId, string resourceGroupName, string accountName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticBackupPolicies", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByElasticAccountRequest(string subscriptionId, string resourceGroupName, string accountName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticBackupPolicies", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List and describe all Elastic Backup Policies in the elastic account. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByElasticAccountAsync(string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var message = CreateListByElasticAccountRequest(subscriptionId, resourceGroupName, accountName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ElasticBackupPolicyListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ElasticBackupPolicyListResult.DeserializeElasticBackupPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List and describe all Elastic Backup Policies in the elastic account. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByElasticAccount(string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var message = CreateListByElasticAccountRequest(subscriptionId, resourceGroupName, accountName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ElasticBackupPolicyListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ElasticBackupPolicyListResult.DeserializeElasticBackupPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string accountName, string backupPolicyName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticBackupPolicies/", false); + uri.AppendPath(backupPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string accountName, string backupPolicyName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticBackupPolicies/", false); + uri.AppendPath(backupPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the Elastic Backup Policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticBackupPolicy. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string accountName, string backupPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(backupPolicyName, nameof(backupPolicyName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName, backupPolicyName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ElasticBackupPolicyData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ElasticBackupPolicyData.DeserializeElasticBackupPolicyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ElasticBackupPolicyData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the Elastic Backup Policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticBackupPolicy. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string accountName, string backupPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(backupPolicyName, nameof(backupPolicyName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName, backupPolicyName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ElasticBackupPolicyData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ElasticBackupPolicyData.DeserializeElasticBackupPolicyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ElasticBackupPolicyData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string accountName, string backupPolicyName, ElasticBackupPolicyData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticBackupPolicies/", false); + uri.AppendPath(backupPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string accountName, string backupPolicyName, ElasticBackupPolicyData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticBackupPolicies/", false); + uri.AppendPath(backupPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update the specified Elastic Backup Policy in the NetApp account. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticBackupPolicy. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string accountName, string backupPolicyName, ElasticBackupPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(backupPolicyName, nameof(backupPolicyName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, accountName, backupPolicyName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update the specified Elastic Backup Policy in the NetApp account. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticBackupPolicy. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string accountName, string backupPolicyName, ElasticBackupPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(backupPolicyName, nameof(backupPolicyName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, accountName, backupPolicyName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string accountName, string backupPolicyName, ElasticBackupPolicyPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticBackupPolicies/", false); + uri.AppendPath(backupPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string accountName, string backupPolicyName, ElasticBackupPolicyPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticBackupPolicies/", false); + uri.AppendPath(backupPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Patch the specified NetApp Elastic Backup Policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticBackupPolicy. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string accountName, string backupPolicyName, ElasticBackupPolicyPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(backupPolicyName, nameof(backupPolicyName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, accountName, backupPolicyName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Patch the specified NetApp Elastic Backup Policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticBackupPolicy. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string accountName, string backupPolicyName, ElasticBackupPolicyPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(backupPolicyName, nameof(backupPolicyName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, accountName, backupPolicyName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string accountName, string backupPolicyName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticBackupPolicies/", false); + uri.AppendPath(backupPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string accountName, string backupPolicyName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticBackupPolicies/", false); + uri.AppendPath(backupPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete the specified Elastic Policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticBackupPolicy. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string accountName, string backupPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(backupPolicyName, nameof(backupPolicyName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, accountName, backupPolicyName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete the specified Elastic Policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticBackupPolicy. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string accountName, string backupPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(backupPolicyName, nameof(backupPolicyName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, accountName, backupPolicyName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByElasticAccountNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string accountName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByElasticAccountNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string accountName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List and describe all Elastic Backup Policies in the elastic account. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByElasticAccountNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var message = CreateListByElasticAccountNextPageRequest(nextLink, subscriptionId, resourceGroupName, accountName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ElasticBackupPolicyListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ElasticBackupPolicyListResult.DeserializeElasticBackupPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List and describe all Elastic Backup Policies in the elastic account. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByElasticAccountNextPage(string nextLink, string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var message = CreateListByElasticAccountNextPageRequest(nextLink, subscriptionId, resourceGroupName, accountName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ElasticBackupPolicyListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ElasticBackupPolicyListResult.DeserializeElasticBackupPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/ElasticBackupVaultsRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/ElasticBackupVaultsRestOperations.cs new file mode 100644 index 000000000000..cc6ce629847c --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/ElasticBackupVaultsRestOperations.cs @@ -0,0 +1,613 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + internal partial class ElasticBackupVaultsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ElasticBackupVaultsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ElasticBackupVaultsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-09-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByElasticAccountRequestUri(string subscriptionId, string resourceGroupName, string accountName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticBackupVaults", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByElasticAccountRequest(string subscriptionId, string resourceGroupName, string accountName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticBackupVaults", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List and describe all Elastic Backup Vaults in the elastic account. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByElasticAccountAsync(string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var message = CreateListByElasticAccountRequest(subscriptionId, resourceGroupName, accountName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ElasticBackupVaultListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ElasticBackupVaultListResult.DeserializeElasticBackupVaultListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List and describe all Elastic Backup Vaults in the elastic account. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByElasticAccount(string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var message = CreateListByElasticAccountRequest(subscriptionId, resourceGroupName, accountName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ElasticBackupVaultListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ElasticBackupVaultListResult.DeserializeElasticBackupVaultListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticBackupVaults/", false); + uri.AppendPath(backupVaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticBackupVaults/", false); + uri.AppendPath(backupVaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the Elastic Backup Vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticBackupVault. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(backupVaultName, nameof(backupVaultName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName, backupVaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ElasticBackupVaultData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ElasticBackupVaultData.DeserializeElasticBackupVaultData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ElasticBackupVaultData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the Elastic Backup Vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticBackupVault. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(backupVaultName, nameof(backupVaultName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName, backupVaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ElasticBackupVaultData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ElasticBackupVaultData.DeserializeElasticBackupVaultData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ElasticBackupVaultData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, ElasticBackupVaultData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticBackupVaults/", false); + uri.AppendPath(backupVaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, ElasticBackupVaultData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticBackupVaults/", false); + uri.AppendPath(backupVaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticBackupVault. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, ElasticBackupVaultData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(backupVaultName, nameof(backupVaultName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, accountName, backupVaultName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update the specified Elastic Backup Vault in the Elastic NetApp account. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticBackupVault. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, ElasticBackupVaultData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(backupVaultName, nameof(backupVaultName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, accountName, backupVaultName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, ElasticBackupVaultPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticBackupVaults/", false); + uri.AppendPath(backupVaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, ElasticBackupVaultPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticBackupVaults/", false); + uri.AppendPath(backupVaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Patch the specified NetApp Elastic Backup Vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticBackupVault. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, ElasticBackupVaultPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(backupVaultName, nameof(backupVaultName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, accountName, backupVaultName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Patch the specified NetApp Elastic Backup Vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticBackupVault. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, ElasticBackupVaultPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(backupVaultName, nameof(backupVaultName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, accountName, backupVaultName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticBackupVaults/", false); + uri.AppendPath(backupVaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticBackupVaults/", false); + uri.AppendPath(backupVaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete the specified Elastic Backup Vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticBackupVault. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(backupVaultName, nameof(backupVaultName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, accountName, backupVaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete the specified Elastic Backup Vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticBackupVault. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(backupVaultName, nameof(backupVaultName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, accountName, backupVaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByElasticAccountNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string accountName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByElasticAccountNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string accountName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List and describe all Elastic Backup Vaults in the elastic account. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByElasticAccountNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var message = CreateListByElasticAccountNextPageRequest(nextLink, subscriptionId, resourceGroupName, accountName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ElasticBackupVaultListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ElasticBackupVaultListResult.DeserializeElasticBackupVaultListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List and describe all Elastic Backup Vaults in the elastic account. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByElasticAccountNextPage(string nextLink, string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var message = CreateListByElasticAccountNextPageRequest(nextLink, subscriptionId, resourceGroupName, accountName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ElasticBackupVaultListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ElasticBackupVaultListResult.DeserializeElasticBackupVaultListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/ElasticBackupsRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/ElasticBackupsRestOperations.cs new file mode 100644 index 000000000000..9721e3ca7d83 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/ElasticBackupsRestOperations.cs @@ -0,0 +1,657 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + internal partial class ElasticBackupsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ElasticBackupsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ElasticBackupsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-09-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByVaultRequestUri(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticBackupVaults/", false); + uri.AppendPath(backupVaultName, true); + uri.AppendPath("/elasticBackups", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByVaultRequest(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticBackupVaults/", false); + uri.AppendPath(backupVaultName, true); + uri.AppendPath("/elasticBackups", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all elastic backups Under an elastic Backup Vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticBackupVault. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByVaultAsync(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(backupVaultName, nameof(backupVaultName)); + + using var message = CreateListByVaultRequest(subscriptionId, resourceGroupName, accountName, backupVaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ElasticBackupListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ElasticBackupListResult.DeserializeElasticBackupListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all elastic backups Under an elastic Backup Vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticBackupVault. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByVault(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(backupVaultName, nameof(backupVaultName)); + + using var message = CreateListByVaultRequest(subscriptionId, resourceGroupName, accountName, backupVaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ElasticBackupListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ElasticBackupListResult.DeserializeElasticBackupListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, string backupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticBackupVaults/", false); + uri.AppendPath(backupVaultName, true); + uri.AppendPath("/elasticBackups/", false); + uri.AppendPath(backupName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, string backupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticBackupVaults/", false); + uri.AppendPath(backupVaultName, true); + uri.AppendPath("/elasticBackups/", false); + uri.AppendPath(backupName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the specified Elastic Backup under Elastic Backup Vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticBackupVault. + /// The name of the ElasticBackup. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, string backupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(backupVaultName, nameof(backupVaultName)); + Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName, backupVaultName, backupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ElasticBackupData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ElasticBackupData.DeserializeElasticBackupData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ElasticBackupData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the specified Elastic Backup under Elastic Backup Vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticBackupVault. + /// The name of the ElasticBackup. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, string backupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(backupVaultName, nameof(backupVaultName)); + Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName, backupVaultName, backupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ElasticBackupData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ElasticBackupData.DeserializeElasticBackupData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ElasticBackupData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, string backupName, ElasticBackupData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticBackupVaults/", false); + uri.AppendPath(backupVaultName, true); + uri.AppendPath("/elasticBackups/", false); + uri.AppendPath(backupName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, string backupName, ElasticBackupData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticBackupVaults/", false); + uri.AppendPath(backupVaultName, true); + uri.AppendPath("/elasticBackups/", false); + uri.AppendPath(backupName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create an elastic backup under the elastic Backup Vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticBackupVault. + /// The name of the ElasticBackup. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, string backupName, ElasticBackupData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(backupVaultName, nameof(backupVaultName)); + Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, accountName, backupVaultName, backupName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create an elastic backup under the elastic Backup Vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticBackupVault. + /// The name of the ElasticBackup. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, string backupName, ElasticBackupData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(backupVaultName, nameof(backupVaultName)); + Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, accountName, backupVaultName, backupName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, string backupName, ElasticBackupPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticBackupVaults/", false); + uri.AppendPath(backupVaultName, true); + uri.AppendPath("/elasticBackups/", false); + uri.AppendPath(backupName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, string backupName, ElasticBackupPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticBackupVaults/", false); + uri.AppendPath(backupVaultName, true); + uri.AppendPath("/elasticBackups/", false); + uri.AppendPath(backupName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Patch an elastic Backup under the Elastic Backup Vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticBackupVault. + /// The name of the ElasticBackup. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, string backupName, ElasticBackupPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(backupVaultName, nameof(backupVaultName)); + Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, accountName, backupVaultName, backupName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Patch an elastic Backup under the Elastic Backup Vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticBackupVault. + /// The name of the ElasticBackup. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, string backupName, ElasticBackupPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(backupVaultName, nameof(backupVaultName)); + Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, accountName, backupVaultName, backupName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, string backupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticBackupVaults/", false); + uri.AppendPath(backupVaultName, true); + uri.AppendPath("/elasticBackups/", false); + uri.AppendPath(backupName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, string backupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticBackupVaults/", false); + uri.AppendPath(backupVaultName, true); + uri.AppendPath("/elasticBackups/", false); + uri.AppendPath(backupName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a ElasticBackup. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticBackupVault. + /// The name of the ElasticBackup. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, string backupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(backupVaultName, nameof(backupVaultName)); + Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, accountName, backupVaultName, backupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a ElasticBackup. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticBackupVault. + /// The name of the ElasticBackup. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, string backupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(backupVaultName, nameof(backupVaultName)); + Argument.AssertNotNullOrEmpty(backupName, nameof(backupName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, accountName, backupVaultName, backupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByVaultNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string accountName, string backupVaultName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByVaultNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string accountName, string backupVaultName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all elastic backups Under an elastic Backup Vault. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticBackupVault. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByVaultNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(backupVaultName, nameof(backupVaultName)); + + using var message = CreateListByVaultNextPageRequest(nextLink, subscriptionId, resourceGroupName, accountName, backupVaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ElasticBackupListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ElasticBackupListResult.DeserializeElasticBackupListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all elastic backups Under an elastic Backup Vault. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticBackupVault. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByVaultNextPage(string nextLink, string subscriptionId, string resourceGroupName, string accountName, string backupVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(backupVaultName, nameof(backupVaultName)); + + using var message = CreateListByVaultNextPageRequest(nextLink, subscriptionId, resourceGroupName, accountName, backupVaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ElasticBackupListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ElasticBackupListResult.DeserializeElasticBackupListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/ElasticCapacityPoolsRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/ElasticCapacityPoolsRestOperations.cs new file mode 100644 index 000000000000..f7d1d0d242c4 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/ElasticCapacityPoolsRestOperations.cs @@ -0,0 +1,825 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + internal partial class ElasticCapacityPoolsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ElasticCapacityPoolsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ElasticCapacityPoolsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-09-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByElasticAccountRequestUri(string subscriptionId, string resourceGroupName, string accountName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByElasticAccountRequest(string subscriptionId, string resourceGroupName, string accountName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List and describe all NetApp Elastic Capacity Pools in the Elastic NetApp Account. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByElasticAccountAsync(string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var message = CreateListByElasticAccountRequest(subscriptionId, resourceGroupName, accountName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ElasticCapacityPoolListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ElasticCapacityPoolListResult.DeserializeElasticCapacityPoolListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List and describe all NetApp Elastic Capacity Pools in the Elastic NetApp Account. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByElasticAccount(string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var message = CreateListByElasticAccountRequest(subscriptionId, resourceGroupName, accountName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ElasticCapacityPoolListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ElasticCapacityPoolListResult.DeserializeElasticCapacityPoolListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the NetApp Elastic Capacity Pool. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName, poolName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ElasticCapacityPoolData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ElasticCapacityPoolData.DeserializeElasticCapacityPoolData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ElasticCapacityPoolData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the NetApp Elastic Capacity Pool. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string accountName, string poolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName, poolName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ElasticCapacityPoolData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ElasticCapacityPoolData.DeserializeElasticCapacityPoolData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ElasticCapacityPoolData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, ElasticCapacityPoolData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, ElasticCapacityPoolData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update the specified NetApp Elastic Capacity Pool within the resource group and NetApp Elastic Account. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, ElasticCapacityPoolData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, accountName, poolName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update the specified NetApp Elastic Capacity Pool within the resource group and NetApp Elastic Account. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string accountName, string poolName, ElasticCapacityPoolData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, accountName, poolName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, ElasticCapacityPoolPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, ElasticCapacityPoolPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Patch the specified NetApp Elastic Capacity Pool. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, ElasticCapacityPoolPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, accountName, poolName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Patch the specified NetApp Elastic Capacity Pool. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string accountName, string poolName, ElasticCapacityPoolPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, accountName, poolName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete the specified NetApp Elastic Capacity Pool. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, accountName, poolName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete the specified NetApp Elastic Capacity Pool. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string accountName, string poolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, accountName, poolName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateChangeZoneRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, ChangeZoneContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/changeZone", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateChangeZoneRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, ChangeZoneContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/changeZone", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Moves pool to another zone. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The content of the action request. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task ChangeZoneAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, ChangeZoneContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateChangeZoneRequest(subscriptionId, resourceGroupName, accountName, poolName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Moves pool to another zone. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The content of the action request. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ChangeZone(string subscriptionId, string resourceGroupName, string accountName, string poolName, ChangeZoneContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateChangeZoneRequest(subscriptionId, resourceGroupName, accountName, poolName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCheckVolumeFilePathAvailabilityRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, CheckElasticVolumeFilePathAvailabilityContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/checkVolumeFilePathAvailability", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCheckVolumeFilePathAvailabilityRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, CheckElasticVolumeFilePathAvailabilityContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/checkVolumeFilePathAvailability", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The content of the action request. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CheckVolumeFilePathAvailabilityAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, CheckElasticVolumeFilePathAvailabilityContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateCheckVolumeFilePathAvailabilityRequest(subscriptionId, resourceGroupName, accountName, poolName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CheckElasticResourceAvailabilityResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CheckElasticResourceAvailabilityResult.DeserializeCheckElasticResourceAvailabilityResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Check if an Elastic Volume file path is available within the given Elastic Capacity Pool. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The content of the action request. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CheckVolumeFilePathAvailability(string subscriptionId, string resourceGroupName, string accountName, string poolName, CheckElasticVolumeFilePathAvailabilityContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateCheckVolumeFilePathAvailabilityRequest(subscriptionId, resourceGroupName, accountName, poolName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CheckElasticResourceAvailabilityResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CheckElasticResourceAvailabilityResult.DeserializeCheckElasticResourceAvailabilityResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByElasticAccountNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string accountName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByElasticAccountNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string accountName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List and describe all NetApp Elastic Capacity Pools in the Elastic NetApp Account. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByElasticAccountNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var message = CreateListByElasticAccountNextPageRequest(nextLink, subscriptionId, resourceGroupName, accountName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ElasticCapacityPoolListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ElasticCapacityPoolListResult.DeserializeElasticCapacityPoolListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List and describe all NetApp Elastic Capacity Pools in the Elastic NetApp Account. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByElasticAccountNextPage(string nextLink, string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var message = CreateListByElasticAccountNextPageRequest(nextLink, subscriptionId, resourceGroupName, accountName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ElasticCapacityPoolListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ElasticCapacityPoolListResult.DeserializeElasticCapacityPoolListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/ElasticSnapshotPoliciesRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/ElasticSnapshotPoliciesRestOperations.cs new file mode 100644 index 000000000000..0af4b9b0e510 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/ElasticSnapshotPoliciesRestOperations.cs @@ -0,0 +1,803 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + internal partial class ElasticSnapshotPoliciesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ElasticSnapshotPoliciesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ElasticSnapshotPoliciesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-09-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByElasticAccountRequestUri(string subscriptionId, string resourceGroupName, string accountName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticSnapshotPolicies", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByElasticAccountRequest(string subscriptionId, string resourceGroupName, string accountName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticSnapshotPolicies", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List ElasticSnapshotPolicy resources by ElasticAccount. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByElasticAccountAsync(string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var message = CreateListByElasticAccountRequest(subscriptionId, resourceGroupName, accountName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ElasticSnapshotPolicyListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ElasticSnapshotPolicyListResult.DeserializeElasticSnapshotPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ElasticSnapshotPolicy resources by ElasticAccount. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByElasticAccount(string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var message = CreateListByElasticAccountRequest(subscriptionId, resourceGroupName, accountName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ElasticSnapshotPolicyListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ElasticSnapshotPolicyListResult.DeserializeElasticSnapshotPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string accountName, string snapshotPolicyName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticSnapshotPolicies/", false); + uri.AppendPath(snapshotPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string accountName, string snapshotPolicyName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticSnapshotPolicies/", false); + uri.AppendPath(snapshotPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a ElasticSnapshotPolicy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticSnapshotPolicy. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string accountName, string snapshotPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(snapshotPolicyName, nameof(snapshotPolicyName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName, snapshotPolicyName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ElasticSnapshotPolicyData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ElasticSnapshotPolicyData.DeserializeElasticSnapshotPolicyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ElasticSnapshotPolicyData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a ElasticSnapshotPolicy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticSnapshotPolicy. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string accountName, string snapshotPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(snapshotPolicyName, nameof(snapshotPolicyName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName, snapshotPolicyName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ElasticSnapshotPolicyData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ElasticSnapshotPolicyData.DeserializeElasticSnapshotPolicyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ElasticSnapshotPolicyData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string accountName, string snapshotPolicyName, ElasticSnapshotPolicyData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticSnapshotPolicies/", false); + uri.AppendPath(snapshotPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string accountName, string snapshotPolicyName, ElasticSnapshotPolicyData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticSnapshotPolicies/", false); + uri.AppendPath(snapshotPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a ElasticSnapshotPolicy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticSnapshotPolicy. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string accountName, string snapshotPolicyName, ElasticSnapshotPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(snapshotPolicyName, nameof(snapshotPolicyName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, accountName, snapshotPolicyName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a ElasticSnapshotPolicy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticSnapshotPolicy. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string accountName, string snapshotPolicyName, ElasticSnapshotPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(snapshotPolicyName, nameof(snapshotPolicyName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, accountName, snapshotPolicyName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string accountName, string snapshotPolicyName, ElasticSnapshotPolicyPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticSnapshotPolicies/", false); + uri.AppendPath(snapshotPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string accountName, string snapshotPolicyName, ElasticSnapshotPolicyPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticSnapshotPolicies/", false); + uri.AppendPath(snapshotPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a ElasticSnapshotPolicy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticSnapshotPolicy. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string accountName, string snapshotPolicyName, ElasticSnapshotPolicyPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(snapshotPolicyName, nameof(snapshotPolicyName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, accountName, snapshotPolicyName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a ElasticSnapshotPolicy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticSnapshotPolicy. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string accountName, string snapshotPolicyName, ElasticSnapshotPolicyPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(snapshotPolicyName, nameof(snapshotPolicyName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, accountName, snapshotPolicyName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string accountName, string snapshotPolicyName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticSnapshotPolicies/", false); + uri.AppendPath(snapshotPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string accountName, string snapshotPolicyName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticSnapshotPolicies/", false); + uri.AppendPath(snapshotPolicyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a ElasticSnapshotPolicy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticSnapshotPolicy. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string accountName, string snapshotPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(snapshotPolicyName, nameof(snapshotPolicyName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, accountName, snapshotPolicyName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a ElasticSnapshotPolicy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticSnapshotPolicy. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string accountName, string snapshotPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(snapshotPolicyName, nameof(snapshotPolicyName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, accountName, snapshotPolicyName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListElasticVolumesRequestUri(string subscriptionId, string resourceGroupName, string accountName, string snapshotPolicyName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticSnapshotPolicies/", false); + uri.AppendPath(snapshotPolicyName, true); + uri.AppendPath("/elasticvolumes", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListElasticVolumesRequest(string subscriptionId, string resourceGroupName, string accountName, string snapshotPolicyName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticSnapshotPolicies/", false); + uri.AppendPath(snapshotPolicyName, true); + uri.AppendPath("/elasticvolumes", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get elastic volumes associated with Elastic Snapshot Policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticSnapshotPolicy. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListElasticVolumesAsync(string subscriptionId, string resourceGroupName, string accountName, string snapshotPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(snapshotPolicyName, nameof(snapshotPolicyName)); + + using var message = CreateListElasticVolumesRequest(subscriptionId, resourceGroupName, accountName, snapshotPolicyName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ElasticSnapshotPolicyVolumeList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ElasticSnapshotPolicyVolumeList.DeserializeElasticSnapshotPolicyVolumeList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get elastic volumes associated with Elastic Snapshot Policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticSnapshotPolicy. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListElasticVolumes(string subscriptionId, string resourceGroupName, string accountName, string snapshotPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(snapshotPolicyName, nameof(snapshotPolicyName)); + + using var message = CreateListElasticVolumesRequest(subscriptionId, resourceGroupName, accountName, snapshotPolicyName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ElasticSnapshotPolicyVolumeList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ElasticSnapshotPolicyVolumeList.DeserializeElasticSnapshotPolicyVolumeList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByElasticAccountNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string accountName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByElasticAccountNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string accountName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List ElasticSnapshotPolicy resources by ElasticAccount. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByElasticAccountNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var message = CreateListByElasticAccountNextPageRequest(nextLink, subscriptionId, resourceGroupName, accountName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ElasticSnapshotPolicyListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ElasticSnapshotPolicyListResult.DeserializeElasticSnapshotPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ElasticSnapshotPolicy resources by ElasticAccount. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByElasticAccountNextPage(string nextLink, string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var message = CreateListByElasticAccountNextPageRequest(nextLink, subscriptionId, resourceGroupName, accountName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ElasticSnapshotPolicyListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ElasticSnapshotPolicyListResult.DeserializeElasticSnapshotPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListElasticVolumesNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string accountName, string snapshotPolicyName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListElasticVolumesNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string accountName, string snapshotPolicyName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get elastic volumes associated with Elastic Snapshot Policy. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticSnapshotPolicy. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListElasticVolumesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string accountName, string snapshotPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(snapshotPolicyName, nameof(snapshotPolicyName)); + + using var message = CreateListElasticVolumesNextPageRequest(nextLink, subscriptionId, resourceGroupName, accountName, snapshotPolicyName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ElasticSnapshotPolicyVolumeList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ElasticSnapshotPolicyVolumeList.DeserializeElasticSnapshotPolicyVolumeList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get elastic volumes associated with Elastic Snapshot Policy. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticSnapshotPolicy. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListElasticVolumesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string accountName, string snapshotPolicyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(snapshotPolicyName, nameof(snapshotPolicyName)); + + using var message = CreateListElasticVolumesNextPageRequest(nextLink, subscriptionId, resourceGroupName, accountName, snapshotPolicyName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ElasticSnapshotPolicyVolumeList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ElasticSnapshotPolicyVolumeList.DeserializeElasticSnapshotPolicyVolumeList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/ElasticSnapshotsRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/ElasticSnapshotsRestOperations.cs new file mode 100644 index 000000000000..5ecd54e801f8 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/ElasticSnapshotsRestOperations.cs @@ -0,0 +1,585 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + internal partial class ElasticSnapshotsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ElasticSnapshotsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ElasticSnapshotsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-09-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByElasticVolumeRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/elasticVolumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/elasticSnapshots", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByElasticVolumeRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/elasticVolumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/elasticSnapshots", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List ElasticSnapshot resources by ElasticVolume. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The name of the ElasticVolume. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListByElasticVolumeAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var message = CreateListByElasticVolumeRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ElasticSnapshotListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ElasticSnapshotListResult.DeserializeElasticSnapshotListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ElasticSnapshot resources by ElasticVolume. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The name of the ElasticVolume. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListByElasticVolume(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var message = CreateListByElasticVolumeRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ElasticSnapshotListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ElasticSnapshotListResult.DeserializeElasticSnapshotListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string snapshotName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/elasticVolumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/elasticSnapshots/", false); + uri.AppendPath(snapshotName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string snapshotName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/elasticVolumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/elasticSnapshots/", false); + uri.AppendPath(snapshotName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a ElasticSnapshot. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The name of the ElasticVolume. + /// The name of the ElasticSnapshot. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string snapshotName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + Argument.AssertNotNullOrEmpty(snapshotName, nameof(snapshotName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName, snapshotName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ElasticSnapshotData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ElasticSnapshotData.DeserializeElasticSnapshotData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ElasticSnapshotData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a ElasticSnapshot. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The name of the ElasticVolume. + /// The name of the ElasticSnapshot. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string snapshotName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + Argument.AssertNotNullOrEmpty(snapshotName, nameof(snapshotName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName, snapshotName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ElasticSnapshotData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ElasticSnapshotData.DeserializeElasticSnapshotData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ElasticSnapshotData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string snapshotName, ElasticSnapshotData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/elasticVolumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/elasticSnapshots/", false); + uri.AppendPath(snapshotName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string snapshotName, ElasticSnapshotData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/elasticVolumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/elasticSnapshots/", false); + uri.AppendPath(snapshotName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a ElasticSnapshot. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The name of the ElasticVolume. + /// The name of the ElasticSnapshot. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string snapshotName, ElasticSnapshotData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + Argument.AssertNotNullOrEmpty(snapshotName, nameof(snapshotName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName, snapshotName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a ElasticSnapshot. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The name of the ElasticVolume. + /// The name of the ElasticSnapshot. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string snapshotName, ElasticSnapshotData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + Argument.AssertNotNullOrEmpty(snapshotName, nameof(snapshotName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName, snapshotName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string snapshotName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/elasticVolumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/elasticSnapshots/", false); + uri.AppendPath(snapshotName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string snapshotName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/elasticVolumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/elasticSnapshots/", false); + uri.AppendPath(snapshotName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a ElasticSnapshot. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The name of the ElasticVolume. + /// The name of the ElasticSnapshot. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string snapshotName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + Argument.AssertNotNullOrEmpty(snapshotName, nameof(snapshotName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName, snapshotName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a ElasticSnapshot. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The name of the ElasticVolume. + /// The name of the ElasticSnapshot. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string snapshotName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + Argument.AssertNotNullOrEmpty(snapshotName, nameof(snapshotName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName, snapshotName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByElasticVolumeNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByElasticVolumeNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List ElasticSnapshot resources by ElasticVolume. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The name of the ElasticVolume. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListByElasticVolumeNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var message = CreateListByElasticVolumeNextPageRequest(nextLink, subscriptionId, resourceGroupName, accountName, poolName, volumeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ElasticSnapshotListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ElasticSnapshotListResult.DeserializeElasticSnapshotListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ElasticSnapshot resources by ElasticVolume. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The name of the ElasticVolume. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListByElasticVolumeNextPage(string nextLink, string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var message = CreateListByElasticVolumeNextPageRequest(nextLink, subscriptionId, resourceGroupName, accountName, poolName, volumeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ElasticSnapshotListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ElasticSnapshotListResult.DeserializeElasticSnapshotListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/ElasticVolumesRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/ElasticVolumesRestOperations.cs new file mode 100644 index 000000000000..7cdb35f24ef8 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/ElasticVolumesRestOperations.cs @@ -0,0 +1,767 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + internal partial class ElasticVolumesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ElasticVolumesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ElasticVolumesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-09-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByElasticPoolRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/elasticVolumes", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByElasticPoolRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/elasticVolumes", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all Elastic Volumes within the Elastic Capacity Pool. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByElasticPoolAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + + using var message = CreateListByElasticPoolRequest(subscriptionId, resourceGroupName, accountName, poolName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ElasticVolumeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ElasticVolumeListResult.DeserializeElasticVolumeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all Elastic Volumes within the Elastic Capacity Pool. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByElasticPool(string subscriptionId, string resourceGroupName, string accountName, string poolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + + using var message = CreateListByElasticPoolRequest(subscriptionId, resourceGroupName, accountName, poolName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ElasticVolumeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ElasticVolumeListResult.DeserializeElasticVolumeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/elasticVolumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/elasticVolumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the details of the specified volume. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The name of the ElasticVolume. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ElasticVolumeData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ElasticVolumeData.DeserializeElasticVolumeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ElasticVolumeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the details of the specified volume. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The name of the ElasticVolume. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ElasticVolumeData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ElasticVolumeData.DeserializeElasticVolumeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ElasticVolumeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, ElasticVolumeData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/elasticVolumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, ElasticVolumeData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/elasticVolumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update the specified volume within the capacity pool. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The name of the ElasticVolume. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, ElasticVolumeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update the specified volume within the capacity pool. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The name of the ElasticVolume. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, ElasticVolumeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, ElasticVolumePatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/elasticVolumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, ElasticVolumePatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/elasticVolumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Patch the specified elastic volume. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The name of the ElasticVolume. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, ElasticVolumePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Patch the specified elastic volume. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The name of the ElasticVolume. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, ElasticVolumePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/elasticVolumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/elasticVolumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete the specified Elastic Volume. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The name of the ElasticVolume. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete the specified Elastic Volume. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The name of the ElasticVolume. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateRevertRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, ElasticVolumeRevert body) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/elasticVolumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/revert", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateRevertRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, ElasticVolumeRevert body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/elasticAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/elasticCapacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/elasticVolumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/revert", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Revert an Elastic Volume to the snapshot specified in the body. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The name of the ElasticVolume. + /// The content of the action request. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task RevertAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, ElasticVolumeRevert body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateRevertRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Revert an Elastic Volume to the snapshot specified in the body. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The name of the ElasticVolume. + /// The content of the action request. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Revert(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, ElasticVolumeRevert body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateRevertRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByElasticPoolNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string accountName, string poolName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByElasticPoolNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string accountName, string poolName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all Elastic Volumes within the Elastic Capacity Pool. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByElasticPoolNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string accountName, string poolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + + using var message = CreateListByElasticPoolNextPageRequest(nextLink, subscriptionId, resourceGroupName, accountName, poolName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ElasticVolumeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ElasticVolumeListResult.DeserializeElasticVolumeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all Elastic Volumes within the Elastic Capacity Pool. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ElasticAccount. + /// The name of the ElasticCapacityPool. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByElasticPoolNextPage(string nextLink, string subscriptionId, string resourceGroupName, string accountName, string poolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + + using var message = CreateListByElasticPoolNextPageRequest(nextLink, subscriptionId, resourceGroupName, accountName, poolName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ElasticVolumeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ElasticVolumeListResult.DeserializeElasticVolumeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceQuotaLimitsAccountRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceQuotaLimitsAccountRestOperations.cs index 6bb4cb6ca2b1..7692f40c44da 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceQuotaLimitsAccountRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceQuotaLimitsAccountRestOperations.cs @@ -32,7 +32,7 @@ public NetAppResourceQuotaLimitsAccountRestOperations(HttpPipeline pipeline, str { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-09-01"; + _apiVersion = apiVersion ?? "2025-09-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceQuotaLimitsRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceQuotaLimitsRestOperations.cs index 7c83f09b3a37..1921f4fe2f6e 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceQuotaLimitsRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceQuotaLimitsRestOperations.cs @@ -32,7 +32,7 @@ public NetAppResourceQuotaLimitsRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-09-01"; + _apiVersion = apiVersion ?? "2025-09-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceRegionInfosRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceRegionInfosRestOperations.cs index 1b2e65d5e8fc..b81829b7b120 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceRegionInfosRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceRegionInfosRestOperations.cs @@ -32,7 +32,7 @@ public NetAppResourceRegionInfosRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-09-01"; + _apiVersion = apiVersion ?? "2025-09-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceRestOperations.cs index 9e90a442ff0e..e1c6360439e8 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceRestOperations.cs @@ -32,7 +32,7 @@ public NetAppResourceRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-09-01"; + _apiVersion = apiVersion ?? "2025-09-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceUsagesRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceUsagesRestOperations.cs index 24c20ffd600b..c6ddb3711cc4 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceUsagesRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/NetAppResourceUsagesRestOperations.cs @@ -32,7 +32,7 @@ public NetAppResourceUsagesRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-09-01"; + _apiVersion = apiVersion ?? "2025-09-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/PoolsRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/PoolsRestOperations.cs index f42e8e89877d..fc3a9f7ed479 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/PoolsRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/PoolsRestOperations.cs @@ -32,7 +32,7 @@ public PoolsRestOperations(HttpPipeline pipeline, string applicationId, Uri endp { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-09-01"; + _apiVersion = apiVersion ?? "2025-09-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/RansomwareReportsRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/RansomwareReportsRestOperations.cs new file mode 100644 index 000000000000..9af18b7ab52b --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/RansomwareReportsRestOperations.cs @@ -0,0 +1,511 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NetApp.Models; + +namespace Azure.ResourceManager.NetApp +{ + internal partial class RansomwareReportsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of RansomwareReportsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public RansomwareReportsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-09-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/ransomwareReports", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/ransomwareReports", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// + /// 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" + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RansomwareReportsList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = RansomwareReportsList.DeserializeRansomwareReportsList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// + /// 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" + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RansomwareReportsList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = RansomwareReportsList.DeserializeRansomwareReportsList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string ransomwareReportName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/ransomwareReports/", false); + uri.AppendPath(ransomwareReportName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string ransomwareReportName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/ransomwareReports/", false); + uri.AppendPath(ransomwareReportName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// + /// 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. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// The name of the ransomware report. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string ransomwareReportName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + Argument.AssertNotNullOrEmpty(ransomwareReportName, nameof(ransomwareReportName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName, ransomwareReportName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RansomwareReportData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = RansomwareReportData.DeserializeRansomwareReportData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((RansomwareReportData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// + /// 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. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// The name of the ransomware report. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string ransomwareReportName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + Argument.AssertNotNullOrEmpty(ransomwareReportName, nameof(ransomwareReportName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName, ransomwareReportName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RansomwareReportData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = RansomwareReportData.DeserializeRansomwareReportData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((RansomwareReportData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateClearSuspectsRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string ransomwareReportName, RansomwareSuspectsClearContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/ransomwareReports/", false); + uri.AppendPath(ransomwareReportName, true); + uri.AppendPath("/clearSuspects", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateClearSuspectsRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string ransomwareReportName, RansomwareSuspectsClearContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/ransomwareReports/", false); + uri.AppendPath(ransomwareReportName, true); + uri.AppendPath("/clearSuspects", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// + /// "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", + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// The name of the ransomware report. + /// Clear suspects request object supplied in the body of the operation. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task ClearSuspectsAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string ransomwareReportName, RansomwareSuspectsClearContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + Argument.AssertNotNullOrEmpty(ransomwareReportName, nameof(ransomwareReportName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateClearSuspectsRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName, ransomwareReportName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// + /// "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", + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// The name of the ransomware report. + /// Clear suspects request object supplied in the body of the operation. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response ClearSuspects(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, string ransomwareReportName, RansomwareSuspectsClearContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + Argument.AssertNotNullOrEmpty(ransomwareReportName, nameof(ransomwareReportName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateClearSuspectsRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName, ransomwareReportName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// + /// 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" + /// + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, accountName, poolName, volumeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RansomwareReportsList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = RansomwareReportsList.DeserializeRansomwareReportsList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// + /// 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" + /// + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, accountName, poolName, volumeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RansomwareReportsList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = RansomwareReportsList.DeserializeRansomwareReportsList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/SnapshotPoliciesRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/SnapshotPoliciesRestOperations.cs index 4d85bf41e2cd..24b83b4d05c8 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/SnapshotPoliciesRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/SnapshotPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public SnapshotPoliciesRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-09-01"; + _apiVersion = apiVersion ?? "2025-09-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/SnapshotsRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/SnapshotsRestOperations.cs index 54cff2efdb2d..86e3c66b0295 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/SnapshotsRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/SnapshotsRestOperations.cs @@ -32,7 +32,7 @@ public SnapshotsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-09-01"; + _apiVersion = apiVersion ?? "2025-09-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/SubvolumesRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/SubvolumesRestOperations.cs index fb48e08a61a6..7604daed6950 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/SubvolumesRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/SubvolumesRestOperations.cs @@ -32,7 +32,7 @@ public SubvolumesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-09-01"; + _apiVersion = apiVersion ?? "2025-09-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/VolumeGroupsRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/VolumeGroupsRestOperations.cs index 3570d5594f27..d810037035fc 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/VolumeGroupsRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/VolumeGroupsRestOperations.cs @@ -32,7 +32,7 @@ public VolumeGroupsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-09-01"; + _apiVersion = apiVersion ?? "2025-09-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/VolumeQuotaRulesRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/VolumeQuotaRulesRestOperations.cs index 222e92aa0899..407bd9d61e59 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/VolumeQuotaRulesRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/VolumeQuotaRulesRestOperations.cs @@ -32,7 +32,7 @@ public VolumeQuotaRulesRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-09-01"; + _apiVersion = apiVersion ?? "2025-09-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/VolumesRestOperations.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/VolumesRestOperations.cs index ca250712249f..6017cc31e0be 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/VolumesRestOperations.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RestOperations/VolumesRestOperations.cs @@ -32,7 +32,7 @@ public VolumesRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-09-01"; + _apiVersion = apiVersion ?? "2025-09-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -1426,6 +1426,108 @@ public Response ListGetGroupIdListForLdapUser(string subscriptionId, string reso } } + internal RequestUriBuilder CreateListQuotaReportRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/listQuotaReport", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListQuotaReportRequest(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.NetApp/netAppAccounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/capacityPools/", false); + uri.AppendPath(poolName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeName, true); + uri.AppendPath("/listQuotaReport", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// A long-running resource action. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task ListQuotaReportAsync(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var message = CreateListQuotaReportRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// A long-running resource action. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the NetApp account. + /// The name of the capacity pool. + /// The name of the volume. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListQuotaReport(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNullOrEmpty(poolName, nameof(poolName)); + Argument.AssertNotNullOrEmpty(volumeName, nameof(volumeName)); + + using var message = CreateListQuotaReportRequest(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListReplicationsRequestUri(string subscriptionId, string resourceGroupName, string accountName, string poolName, string volumeName, ListReplicationsContent content) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/SnapshotPolicyCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/SnapshotPolicyCollection.cs index ed4a4a34f39a..97c9b696ba37 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/SnapshotPolicyCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/SnapshotPolicyCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string snap /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string snapshotPolicyName, C /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string snapshotPolicyName, /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string snapshotPolicyName, CancellationToke /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/SnapshotPolicyResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/SnapshotPolicyResource.cs index 45cf815730db..ab9cfd756685 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/SnapshotPolicyResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/SnapshotPolicyResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -268,7 +268,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task> UpdateAsync(Wait /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -360,7 +360,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -389,7 +389,7 @@ public virtual AsyncPageable GetVolumesAsync(CancellationT /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -418,7 +418,7 @@ public virtual Pageable GetVolumes(CancellationToken cance /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -480,7 +480,7 @@ public virtual async Task> AddTagAsync(string k /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -542,7 +542,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -599,7 +599,7 @@ public virtual async Task> SetTagsAsync(IDictio /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -656,7 +656,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource @@ -716,7 +716,7 @@ public virtual async Task> RemoveTagAsync(strin /// /// /// Default Api Version - /// 2025-09-01 + /// 2025-09-01-preview /// /// /// Resource diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/autorest.md b/sdk/netapp/Azure.ResourceManager.NetApp/src/autorest.md index be3ffef80881..efcc57615ca0 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/autorest.md +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/autorest.md @@ -8,8 +8,8 @@ azure-arm: true csharp: true library-name: NetApp namespace: Azure.ResourceManager.NetApp -require: https://github.com/Azure/azure-rest-api-specs/blob/dbdbc75c548071c0f5f0bdfae18dd1b31a7ab95a/specification/netapp/resource-manager/Microsoft.NetApp/NetApp/readme.md -tag: package-2025-09-01 +require: https://github.com/Azure/azure-rest-api-specs/blob/97241c594f16e0915407b7dc85377e4e3b26b0b9/specification/netapp/resource-manager/Microsoft.NetApp/NetApp/readme.md +tag: package-preview-2025-09-01-preview output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -284,6 +284,8 @@ rename-mapping: BackupStatus.relationshipStatus: VolumeBackupRelationshipStatus ListReplicationsRequest.exclude: ExcludeReplicationsFilter Exclude: ExcludeReplicationsFilter + CheckElasticResourceAvailabilityResponse: CheckElasticResourceAvailabilityResult + models-to-treat-empty-string-as-null: - VolumeSnapshotProperties diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ActiveDirectoryConfigCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ActiveDirectoryConfigCollection.cs new file mode 100644 index 000000000000..3bedac634dfd --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ActiveDirectoryConfigCollection.cs @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NetApp.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.NetApp.Samples +{ + public partial class Sample_ActiveDirectoryConfigCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ActiveDirectoryConfigsCreateOrUpdate() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ActiveDirectoryConfigs_CreateOrUpdate.json + // this example is just showing the usage of "ActiveDirectoryConfigs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ActiveDirectoryConfigResource + ActiveDirectoryConfigCollection collection = resourceGroupResource.GetActiveDirectoryConfigs(); + + // invoke the operation + string activeDirectoryConfigName = "adconfig1"; + ActiveDirectoryConfigData data = new ActiveDirectoryConfigData(new AzureLocation("eastus")) + { + Properties = new ActiveDirectoryConfigProperties("example.net", new SecretPassword + { + KeyVaultProperties = new SecretPasswordKeyVaultProperties(new Uri("https://example.vault.azure.net/"), "activeDirectoryPassword"), + Identity = new SecretPasswordIdentity + { + UserAssignedIdentity = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userAssignedIdentity1", + }, + }) + { + UserName = "admin1", + Dns = { "10.10.10.4", "10.10.10.5" }, + SmbServerName = "smbServer", + OrganizationalUnit = "OU=Computers,DC=corp,DC=contoso,DC=com", + Site = "Default-First-Site-Name", + BackupOperators = { "backupOp1" }, + Administrators = { "admin1" }, + SecurityOperators = { "secOp1" }, + }, + Identity = new ManagedServiceIdentity("UserAssigned") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userAssignedIdentity1")] = new UserAssignedIdentity() +}, + }, + Tags = +{ +["ac-tag1"] = "activeDirectoryConfig1" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, activeDirectoryConfigName, data); + ActiveDirectoryConfigResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ActiveDirectoryConfigData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ActiveDirectoryConfigsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ActiveDirectoryConfigs_Get.json + // this example is just showing the usage of "ActiveDirectoryConfigs_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ActiveDirectoryConfigResource + ActiveDirectoryConfigCollection collection = resourceGroupResource.GetActiveDirectoryConfigs(); + + // invoke the operation + string activeDirectoryConfigName = "adconfig1"; + ActiveDirectoryConfigResource result = await collection.GetAsync(activeDirectoryConfigName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ActiveDirectoryConfigData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ActiveDirectoryConfigsListByResourceGroup() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ActiveDirectoryConfigs_ListByResourceGroup.json + // this example is just showing the usage of "ActiveDirectoryConfigs_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ActiveDirectoryConfigResource + ActiveDirectoryConfigCollection collection = resourceGroupResource.GetActiveDirectoryConfigs(); + + // invoke the operation and iterate over the result + await foreach (ActiveDirectoryConfigResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ActiveDirectoryConfigData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_ActiveDirectoryConfigsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ActiveDirectoryConfigs_Get.json + // this example is just showing the usage of "ActiveDirectoryConfigs_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ActiveDirectoryConfigResource + ActiveDirectoryConfigCollection collection = resourceGroupResource.GetActiveDirectoryConfigs(); + + // invoke the operation + string activeDirectoryConfigName = "adconfig1"; + bool result = await collection.ExistsAsync(activeDirectoryConfigName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ActiveDirectoryConfigsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ActiveDirectoryConfigs_Get.json + // this example is just showing the usage of "ActiveDirectoryConfigs_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ActiveDirectoryConfigResource + ActiveDirectoryConfigCollection collection = resourceGroupResource.GetActiveDirectoryConfigs(); + + // invoke the operation + string activeDirectoryConfigName = "adconfig1"; + NullableResponse response = await collection.GetIfExistsAsync(activeDirectoryConfigName); + ActiveDirectoryConfigResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ActiveDirectoryConfigData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ActiveDirectoryConfigResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ActiveDirectoryConfigResource.cs new file mode 100644 index 000000000000..11d29921ac96 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ActiveDirectoryConfigResource.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.NetApp.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.NetApp.Samples +{ + public partial class Sample_ActiveDirectoryConfigResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ActiveDirectoryConfigsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ActiveDirectoryConfigs_Get.json + // this example is just showing the usage of "ActiveDirectoryConfigs_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ActiveDirectoryConfigResource created on azure + // for more information of creating ActiveDirectoryConfigResource, please refer to the document of ActiveDirectoryConfigResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string activeDirectoryConfigName = "adconfig1"; + ResourceIdentifier activeDirectoryConfigResourceId = ActiveDirectoryConfigResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, activeDirectoryConfigName); + ActiveDirectoryConfigResource activeDirectoryConfig = client.GetActiveDirectoryConfigResource(activeDirectoryConfigResourceId); + + // invoke the operation + ActiveDirectoryConfigResource result = await activeDirectoryConfig.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ActiveDirectoryConfigData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_ActiveDirectoryConfigsDelete() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ActiveDirectoryConfigs_Delete.json + // this example is just showing the usage of "ActiveDirectoryConfigs_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ActiveDirectoryConfigResource created on azure + // for more information of creating ActiveDirectoryConfigResource, please refer to the document of ActiveDirectoryConfigResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string activeDirectoryConfigName = "adconfig1"; + ResourceIdentifier activeDirectoryConfigResourceId = ActiveDirectoryConfigResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, activeDirectoryConfigName); + ActiveDirectoryConfigResource activeDirectoryConfig = client.GetActiveDirectoryConfigResource(activeDirectoryConfigResourceId); + + // invoke the operation + await activeDirectoryConfig.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ActiveDirectoryConfigsUpdate() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ActiveDirectoryConfigs_Update.json + // this example is just showing the usage of "ActiveDirectoryConfigs_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ActiveDirectoryConfigResource created on azure + // for more information of creating ActiveDirectoryConfigResource, please refer to the document of ActiveDirectoryConfigResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string activeDirectoryConfigName = "adconfig1"; + ResourceIdentifier activeDirectoryConfigResourceId = ActiveDirectoryConfigResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, activeDirectoryConfigName); + ActiveDirectoryConfigResource activeDirectoryConfig = client.GetActiveDirectoryConfigResource(activeDirectoryConfigResourceId); + + // invoke the operation + ActiveDirectoryConfigPatch patch = new ActiveDirectoryConfigPatch + { + Properties = new ActiveDirectoryConfigUpdateProperties + { + SmbServerName = "smbServer2", + }, + }; + ArmOperation lro = await activeDirectoryConfig.UpdateAsync(WaitUntil.Completed, patch); + ActiveDirectoryConfigResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ActiveDirectoryConfigData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_CacheCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_CacheCollection.cs new file mode 100644 index 000000000000..2dae970faf4a --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_CacheCollection.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.NetApp.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.NetApp.Samples +{ + public partial class Sample_CacheCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CachesCreateOrUpdate() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Caches_CreateOrUpdate.json + // this example is just showing the usage of "Caches_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this CapacityPoolResource created on azure + // for more information of creating CapacityPoolResource, please refer to the document of CapacityPoolResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + ResourceIdentifier capacityPoolResourceId = CapacityPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName); + CapacityPoolResource capacityPool = client.GetCapacityPoolResource(capacityPoolResourceId); + + // get the collection of this CacheResource + CacheCollection collection = capacityPool.GetCaches(); + + // invoke the operation + string cacheName = "cache1"; + CacheData data = new CacheData(new AzureLocation("eastus"), new CacheProperties( + "cache-west-us2-01", + 107374182400L, + new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/cacheVnet/subnets/cacheSubnet1"), + new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/icLifVnet/subnets/peeringSubnet1"), + NetAppEncryptionKeySource.MicrosoftNetApp, + new OriginClusterInformation("cluster1", new string[] { "192.0.2.10", "192.0.2.11" }, "vserver1", "originvol1")) + { + Ldap = LdapState.Enabled, + LdapServerType = LdapServerType.OpenLdap, + }); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, cacheName, data); + CacheResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + CacheData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_CachesGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Caches_Get.json + // this example is just showing the usage of "Caches_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this CapacityPoolResource created on azure + // for more information of creating CapacityPoolResource, please refer to the document of CapacityPoolResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + ResourceIdentifier capacityPoolResourceId = CapacityPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName); + CapacityPoolResource capacityPool = client.GetCapacityPoolResource(capacityPoolResourceId); + + // get the collection of this CacheResource + CacheCollection collection = capacityPool.GetCaches(); + + // invoke the operation + string cacheName = "cache1"; + CacheResource result = await collection.GetAsync(cacheName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + CacheData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_CachesList() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Caches_ListByCapacityPools.json + // this example is just showing the usage of "Caches_ListByCapacityPools" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this CapacityPoolResource created on azure + // for more information of creating CapacityPoolResource, please refer to the document of CapacityPoolResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + ResourceIdentifier capacityPoolResourceId = CapacityPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName); + CapacityPoolResource capacityPool = client.GetCapacityPoolResource(capacityPoolResourceId); + + // get the collection of this CacheResource + CacheCollection collection = capacityPool.GetCaches(); + + // invoke the operation and iterate over the result + await foreach (CacheResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + CacheData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_CachesGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Caches_Get.json + // this example is just showing the usage of "Caches_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this CapacityPoolResource created on azure + // for more information of creating CapacityPoolResource, please refer to the document of CapacityPoolResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + ResourceIdentifier capacityPoolResourceId = CapacityPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName); + CapacityPoolResource capacityPool = client.GetCapacityPoolResource(capacityPoolResourceId); + + // get the collection of this CacheResource + CacheCollection collection = capacityPool.GetCaches(); + + // invoke the operation + string cacheName = "cache1"; + bool result = await collection.ExistsAsync(cacheName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_CachesGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Caches_Get.json + // this example is just showing the usage of "Caches_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this CapacityPoolResource created on azure + // for more information of creating CapacityPoolResource, please refer to the document of CapacityPoolResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + ResourceIdentifier capacityPoolResourceId = CapacityPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName); + CapacityPoolResource capacityPool = client.GetCapacityPoolResource(capacityPoolResourceId); + + // get the collection of this CacheResource + CacheCollection collection = capacityPool.GetCaches(); + + // invoke the operation + string cacheName = "cache1"; + NullableResponse response = await collection.GetIfExistsAsync(cacheName); + CacheResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + CacheData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_CacheResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_CacheResource.cs new file mode 100644 index 000000000000..384a81e5d300 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_CacheResource.cs @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.NetApp.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.NetApp.Samples +{ + public partial class Sample_CacheResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_CachesGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Caches_Get.json + // this example is just showing the usage of "Caches_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this CacheResource created on azure + // for more information of creating CacheResource, please refer to the document of CacheResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string cacheName = "cache1"; + ResourceIdentifier cacheResourceId = CacheResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, cacheName); + CacheResource cache = client.GetCacheResource(cacheResourceId); + + // invoke the operation + CacheResource result = await cache.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + CacheData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_CachesDelete() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Caches_Delete.json + // this example is just showing the usage of "Caches_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this CacheResource created on azure + // for more information of creating CacheResource, please refer to the document of CacheResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string cacheName = "cache1"; + ResourceIdentifier cacheResourceId = CacheResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, cacheName); + CacheResource cache = client.GetCacheResource(cacheResourceId); + + // invoke the operation + await cache.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_CachesUpdate() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Caches_Update.json + // this example is just showing the usage of "Caches_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this CacheResource created on azure + // for more information of creating CacheResource, please refer to the document of CacheResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string cacheName = "cache1"; + ResourceIdentifier cacheResourceId = CacheResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, cacheName); + CacheResource cache = client.GetCacheResource(cacheResourceId); + + // invoke the operation + CachePatch patch = new CachePatch + { + Properties = new CacheUpdateProperties + { + Size = 214748364800L, + }, + }; + ArmOperation lro = await cache.UpdateAsync(WaitUntil.Completed, patch); + CacheResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + CacheData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetPeeringPassphrases_CachesListPeeringPassphrases() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Caches_ListPeeringPassphrases.json + // this example is just showing the usage of "Caches_ListPeeringPassphrases" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this CacheResource created on azure + // for more information of creating CacheResource, please refer to the document of CacheResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string cacheName = "cache-1"; + ResourceIdentifier cacheResourceId = CacheResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, cacheName); + CacheResource cache = client.GetCacheResource(cacheResourceId); + + // invoke the operation + PeeringPassphrases result = await cache.GetPeeringPassphrasesAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task PoolChange_CachesPoolChange() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Caches_PoolChange.json + // this example is just showing the usage of "Caches_PoolChange" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this CacheResource created on azure + // for more information of creating CacheResource, please refer to the document of CacheResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string cacheName = "cache1"; + ResourceIdentifier cacheResourceId = CacheResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, cacheName); + CacheResource cache = client.GetCacheResource(cacheResourceId); + + // invoke the operation + NetAppVolumePoolChangeContent content = new NetAppVolumePoolChangeContent(new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/capacityPools/pool2")); + ArmOperation lro = await cache.PoolChangeAsync(WaitUntil.Completed, content); + CacheResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + CacheData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_CapacityPoolCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_CapacityPoolCollection.cs index cc95d6f9b18b..944c0d40092a 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_CapacityPoolCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_CapacityPoolCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_CapacityPoolCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PoolsCreateOrUpdate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Pools_CreateOrUpdate.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Pools_CreateOrUpdate.json // this example is just showing the usage of "Pools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,7 +59,7 @@ public async Task CreateOrUpdate_PoolsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PoolsCreateOrUpdateCustomThroughput() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Pools_CreateOrUpdate_CustomThroughput.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Pools_CreateOrUpdate_CustomThroughput.json // this example is just showing the usage of "Pools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -99,7 +99,7 @@ public async Task CreateOrUpdate_PoolsCreateOrUpdateCustomThroughput() [Ignore("Only validating compilation of examples")] public async Task Get_PoolsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Pools_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Pools_Get.json // this example is just showing the usage of "Pools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -133,7 +133,7 @@ public async Task Get_PoolsGet() [Ignore("Only validating compilation of examples")] public async Task Get_PoolsGetCustomThroughput() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Pools_Get_CustomThroughput.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Pools_Get_CustomThroughput.json // this example is just showing the usage of "Pools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -167,7 +167,7 @@ public async Task Get_PoolsGetCustomThroughput() [Ignore("Only validating compilation of examples")] public async Task GetAll_PoolsList() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Pools_List.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Pools_List.json // this example is just showing the usage of "Pools_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -203,7 +203,7 @@ public async Task GetAll_PoolsList() [Ignore("Only validating compilation of examples")] public async Task Exists_PoolsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Pools_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Pools_Get.json // this example is just showing the usage of "Pools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -233,7 +233,7 @@ public async Task Exists_PoolsGet() [Ignore("Only validating compilation of examples")] public async Task Exists_PoolsGetCustomThroughput() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Pools_Get_CustomThroughput.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Pools_Get_CustomThroughput.json // this example is just showing the usage of "Pools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -263,7 +263,7 @@ public async Task Exists_PoolsGetCustomThroughput() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_PoolsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Pools_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Pools_Get.json // this example is just showing the usage of "Pools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -305,7 +305,7 @@ public async Task GetIfExists_PoolsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_PoolsGetCustomThroughput() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Pools_Get_CustomThroughput.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Pools_Get_CustomThroughput.json // this example is just showing the usage of "Pools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_CapacityPoolResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_CapacityPoolResource.cs index d7c9114b27a1..4d067bc54efa 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_CapacityPoolResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_CapacityPoolResource.cs @@ -20,7 +20,7 @@ public partial class Sample_CapacityPoolResource [Ignore("Only validating compilation of examples")] public async Task Get_PoolsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Pools_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Pools_Get.json // this example is just showing the usage of "Pools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_PoolsGet() [Ignore("Only validating compilation of examples")] public async Task Get_PoolsGetCustomThroughput() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Pools_Get_CustomThroughput.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Pools_Get_CustomThroughput.json // this example is just showing the usage of "Pools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Get_PoolsGetCustomThroughput() [Ignore("Only validating compilation of examples")] public async Task Delete_PoolsDelete() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Pools_Delete.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Pools_Delete.json // this example is just showing the usage of "Pools_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -109,7 +109,7 @@ public async Task Delete_PoolsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_PoolsUpdate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Pools_Update.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Pools_Update.json // this example is just showing the usage of "Pools_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -142,7 +142,7 @@ public async Task Update_PoolsUpdate() [Ignore("Only validating compilation of examples")] public async Task Update_PoolsUpdateCustomThroughput() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Pools_Update_CustomThroughput.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Pools_Update_CustomThroughput.json // this example is just showing the usage of "Pools_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticAccountCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticAccountCollection.cs new file mode 100644 index 000000000000..1a2b2d1d4cda --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticAccountCollection.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.NetApp.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.NetApp.Samples +{ + public partial class Sample_ElasticAccountCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ElasticAccountsCreateOrUpdate() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticAccounts_CreateOrUpdate.json + // this example is just showing the usage of "ElasticAccounts_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ElasticAccountResource + ElasticAccountCollection collection = resourceGroupResource.GetElasticAccounts(); + + // invoke the operation + string accountName = "account1"; + ElasticAccountData data = new ElasticAccountData(new AzureLocation("eastus")) + { + Properties = new ElasticAccountProperties(), + Tags = +{ +["ac-tag1"] = "account1" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, accountName, data); + ElasticAccountResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticAccountData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ElasticAccountsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticAccounts_Get.json + // this example is just showing the usage of "ElasticAccounts_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ElasticAccountResource + ElasticAccountCollection collection = resourceGroupResource.GetElasticAccounts(); + + // invoke the operation + string accountName = "account1"; + ElasticAccountResource result = await collection.GetAsync(accountName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticAccountData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ElasticAccountsListByResourceGroup() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticAccounts_ListByResourceGroup.json + // this example is just showing the usage of "ElasticAccounts_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ElasticAccountResource + ElasticAccountCollection collection = resourceGroupResource.GetElasticAccounts(); + + // invoke the operation and iterate over the result + await foreach (ElasticAccountResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticAccountData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_ElasticAccountsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticAccounts_Get.json + // this example is just showing the usage of "ElasticAccounts_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ElasticAccountResource + ElasticAccountCollection collection = resourceGroupResource.GetElasticAccounts(); + + // invoke the operation + string accountName = "account1"; + bool result = await collection.ExistsAsync(accountName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ElasticAccountsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticAccounts_Get.json + // this example is just showing the usage of "ElasticAccounts_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ElasticAccountResource + ElasticAccountCollection collection = resourceGroupResource.GetElasticAccounts(); + + // invoke the operation + string accountName = "account1"; + NullableResponse response = await collection.GetIfExistsAsync(accountName); + ElasticAccountResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticAccountData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticAccountResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticAccountResource.cs new file mode 100644 index 000000000000..c2b385f8f12b --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticAccountResource.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.NetApp.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.NetApp.Samples +{ + public partial class Sample_ElasticAccountResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ElasticAccountsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticAccounts_Get.json + // this example is just showing the usage of "ElasticAccounts_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticAccountResource created on azure + // for more information of creating ElasticAccountResource, please refer to the document of ElasticAccountResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + ResourceIdentifier elasticAccountResourceId = ElasticAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + ElasticAccountResource elasticAccount = client.GetElasticAccountResource(elasticAccountResourceId); + + // invoke the operation + ElasticAccountResource result = await elasticAccount.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticAccountData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_ElasticAccountsDelete() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticAccounts_Delete.json + // this example is just showing the usage of "ElasticAccounts_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticAccountResource created on azure + // for more information of creating ElasticAccountResource, please refer to the document of ElasticAccountResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + ResourceIdentifier elasticAccountResourceId = ElasticAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + ElasticAccountResource elasticAccount = client.GetElasticAccountResource(elasticAccountResourceId); + + // invoke the operation + await elasticAccount.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ElasticAccountsUpdate() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticAccounts_Update.json + // this example is just showing the usage of "ElasticAccounts_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticAccountResource created on azure + // for more information of creating ElasticAccountResource, please refer to the document of ElasticAccountResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + ResourceIdentifier elasticAccountResourceId = ElasticAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + ElasticAccountResource elasticAccount = client.GetElasticAccountResource(elasticAccountResourceId); + + // invoke the operation + ElasticAccountPatch patch = new ElasticAccountPatch + { + Tags = +{ +["Tag1"] = "Value1" +}, + }; + ArmOperation lro = await elasticAccount.UpdateAsync(WaitUntil.Completed, patch); + ElasticAccountResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticAccountData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticBackupCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticBackupCollection.cs new file mode 100644 index 000000000000..40a915aca2d2 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticBackupCollection.cs @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.NetApp.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.NetApp.Samples +{ + public partial class Sample_ElasticBackupCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ElasticBackupsCreateOrUpdate() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticBackups_CreateOrUpdate.json + // this example is just showing the usage of "ElasticBackups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticBackupVaultResource created on azure + // for more information of creating ElasticBackupVaultResource, please refer to the document of ElasticBackupVaultResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string backupVaultName = "backupVault1"; + ResourceIdentifier elasticBackupVaultResourceId = ElasticBackupVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, backupVaultName); + ElasticBackupVaultResource elasticBackupVault = client.GetElasticBackupVaultResource(elasticBackupVaultResourceId); + + // get the collection of this ElasticBackupResource + ElasticBackupCollection collection = elasticBackupVault.GetElasticBackups(); + + // invoke the operation + string backupName = "backup1"; + ElasticBackupData data = new ElasticBackupData + { + Properties = new ElasticBackupProperties(new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticCapacityPools/pool1/elasticVolumes/volume1")) + { + Label = "myLabel", + SnapshotUsage = SnapshotUsage.UseExistingSnapshot, + ElasticSnapshotResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticCapacityPools/pool1/elasticVolumes/volume1/elasticSnapshots/snap1"), + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, backupName, data); + ElasticBackupResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticBackupData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ElasticBackupsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticBackups_Get.json + // this example is just showing the usage of "ElasticBackups_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticBackupVaultResource created on azure + // for more information of creating ElasticBackupVaultResource, please refer to the document of ElasticBackupVaultResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string backupVaultName = "backupVault1"; + ResourceIdentifier elasticBackupVaultResourceId = ElasticBackupVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, backupVaultName); + ElasticBackupVaultResource elasticBackupVault = client.GetElasticBackupVaultResource(elasticBackupVaultResourceId); + + // get the collection of this ElasticBackupResource + ElasticBackupCollection collection = elasticBackupVault.GetElasticBackups(); + + // invoke the operation + string backupName = "backup1"; + ElasticBackupResource result = await collection.GetAsync(backupName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticBackupData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ElasticBackupsListByVault() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticBackups_ListByVault.json + // this example is just showing the usage of "ElasticBackups_ListByVault" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticBackupVaultResource created on azure + // for more information of creating ElasticBackupVaultResource, please refer to the document of ElasticBackupVaultResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string backupVaultName = "backupVault1"; + ResourceIdentifier elasticBackupVaultResourceId = ElasticBackupVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, backupVaultName); + ElasticBackupVaultResource elasticBackupVault = client.GetElasticBackupVaultResource(elasticBackupVaultResourceId); + + // get the collection of this ElasticBackupResource + ElasticBackupCollection collection = elasticBackupVault.GetElasticBackups(); + + // invoke the operation and iterate over the result + await foreach (ElasticBackupResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticBackupData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_ElasticBackupsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticBackups_Get.json + // this example is just showing the usage of "ElasticBackups_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticBackupVaultResource created on azure + // for more information of creating ElasticBackupVaultResource, please refer to the document of ElasticBackupVaultResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string backupVaultName = "backupVault1"; + ResourceIdentifier elasticBackupVaultResourceId = ElasticBackupVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, backupVaultName); + ElasticBackupVaultResource elasticBackupVault = client.GetElasticBackupVaultResource(elasticBackupVaultResourceId); + + // get the collection of this ElasticBackupResource + ElasticBackupCollection collection = elasticBackupVault.GetElasticBackups(); + + // invoke the operation + string backupName = "backup1"; + bool result = await collection.ExistsAsync(backupName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ElasticBackupsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticBackups_Get.json + // this example is just showing the usage of "ElasticBackups_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticBackupVaultResource created on azure + // for more information of creating ElasticBackupVaultResource, please refer to the document of ElasticBackupVaultResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string backupVaultName = "backupVault1"; + ResourceIdentifier elasticBackupVaultResourceId = ElasticBackupVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, backupVaultName); + ElasticBackupVaultResource elasticBackupVault = client.GetElasticBackupVaultResource(elasticBackupVaultResourceId); + + // get the collection of this ElasticBackupResource + ElasticBackupCollection collection = elasticBackupVault.GetElasticBackups(); + + // invoke the operation + string backupName = "backup1"; + NullableResponse response = await collection.GetIfExistsAsync(backupName); + ElasticBackupResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticBackupData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticBackupPolicyCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticBackupPolicyCollection.cs new file mode 100644 index 000000000000..ee7d50040f60 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticBackupPolicyCollection.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.NetApp.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.NetApp.Samples +{ + public partial class Sample_ElasticBackupPolicyCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ElasticBackupPoliciesCreateOrUpdate() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticBackupPolicies_CreateOrUpdate.json + // this example is just showing the usage of "ElasticBackupPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticAccountResource created on azure + // for more information of creating ElasticAccountResource, please refer to the document of ElasticAccountResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + ResourceIdentifier elasticAccountResourceId = ElasticAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + ElasticAccountResource elasticAccount = client.GetElasticAccountResource(elasticAccountResourceId); + + // get the collection of this ElasticBackupPolicyResource + ElasticBackupPolicyCollection collection = elasticAccount.GetElasticBackupPolicies(); + + // invoke the operation + string backupPolicyName = "backupPolicyName"; + ElasticBackupPolicyData data = new ElasticBackupPolicyData(new AzureLocation("westus")) + { + Properties = new ElasticBackupPolicyProperties + { + DailyBackupsToKeep = 10, + WeeklyBackupsToKeep = 10, + MonthlyBackupsToKeep = 10, + PolicyState = ElasticBackupPolicyState.Enabled, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, backupPolicyName, data); + ElasticBackupPolicyResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticBackupPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ElasticBackupPoliciesGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticBackupPolicies_Get.json + // this example is just showing the usage of "ElasticBackupPolicies_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticAccountResource created on azure + // for more information of creating ElasticAccountResource, please refer to the document of ElasticAccountResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + ResourceIdentifier elasticAccountResourceId = ElasticAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + ElasticAccountResource elasticAccount = client.GetElasticAccountResource(elasticAccountResourceId); + + // get the collection of this ElasticBackupPolicyResource + ElasticBackupPolicyCollection collection = elasticAccount.GetElasticBackupPolicies(); + + // invoke the operation + string backupPolicyName = "backupPolicyName"; + ElasticBackupPolicyResource result = await collection.GetAsync(backupPolicyName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticBackupPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ElasticBackupPoliciesListByElasticAccount() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticBackupPolicies_List.json + // this example is just showing the usage of "ElasticBackupPolicies_ListByElasticAccount" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticAccountResource created on azure + // for more information of creating ElasticAccountResource, please refer to the document of ElasticAccountResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + ResourceIdentifier elasticAccountResourceId = ElasticAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + ElasticAccountResource elasticAccount = client.GetElasticAccountResource(elasticAccountResourceId); + + // get the collection of this ElasticBackupPolicyResource + ElasticBackupPolicyCollection collection = elasticAccount.GetElasticBackupPolicies(); + + // invoke the operation and iterate over the result + await foreach (ElasticBackupPolicyResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticBackupPolicyData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_ElasticBackupPoliciesGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticBackupPolicies_Get.json + // this example is just showing the usage of "ElasticBackupPolicies_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticAccountResource created on azure + // for more information of creating ElasticAccountResource, please refer to the document of ElasticAccountResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + ResourceIdentifier elasticAccountResourceId = ElasticAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + ElasticAccountResource elasticAccount = client.GetElasticAccountResource(elasticAccountResourceId); + + // get the collection of this ElasticBackupPolicyResource + ElasticBackupPolicyCollection collection = elasticAccount.GetElasticBackupPolicies(); + + // invoke the operation + string backupPolicyName = "backupPolicyName"; + bool result = await collection.ExistsAsync(backupPolicyName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ElasticBackupPoliciesGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticBackupPolicies_Get.json + // this example is just showing the usage of "ElasticBackupPolicies_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticAccountResource created on azure + // for more information of creating ElasticAccountResource, please refer to the document of ElasticAccountResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + ResourceIdentifier elasticAccountResourceId = ElasticAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + ElasticAccountResource elasticAccount = client.GetElasticAccountResource(elasticAccountResourceId); + + // get the collection of this ElasticBackupPolicyResource + ElasticBackupPolicyCollection collection = elasticAccount.GetElasticBackupPolicies(); + + // invoke the operation + string backupPolicyName = "backupPolicyName"; + NullableResponse response = await collection.GetIfExistsAsync(backupPolicyName); + ElasticBackupPolicyResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticBackupPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticBackupPolicyResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticBackupPolicyResource.cs new file mode 100644 index 000000000000..bd3a2da2941d --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticBackupPolicyResource.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.NetApp.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.NetApp.Samples +{ + public partial class Sample_ElasticBackupPolicyResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ElasticBackupPoliciesGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticBackupPolicies_Get.json + // this example is just showing the usage of "ElasticBackupPolicies_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticBackupPolicyResource created on azure + // for more information of creating ElasticBackupPolicyResource, please refer to the document of ElasticBackupPolicyResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string backupPolicyName = "backupPolicyName"; + ResourceIdentifier elasticBackupPolicyResourceId = ElasticBackupPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, backupPolicyName); + ElasticBackupPolicyResource elasticBackupPolicy = client.GetElasticBackupPolicyResource(elasticBackupPolicyResourceId); + + // invoke the operation + ElasticBackupPolicyResource result = await elasticBackupPolicy.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticBackupPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_ElasticBackupPoliciesDelete() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticBackupPolicies_Delete.json + // this example is just showing the usage of "ElasticBackupPolicies_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticBackupPolicyResource created on azure + // for more information of creating ElasticBackupPolicyResource, please refer to the document of ElasticBackupPolicyResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "resourceGroup"; + string accountName = "accountName"; + string backupPolicyName = "backupPolicyName"; + ResourceIdentifier elasticBackupPolicyResourceId = ElasticBackupPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, backupPolicyName); + ElasticBackupPolicyResource elasticBackupPolicy = client.GetElasticBackupPolicyResource(elasticBackupPolicyResourceId); + + // invoke the operation + await elasticBackupPolicy.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ElasticBackupPoliciesUpdate() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticBackupPolicies_Update.json + // this example is just showing the usage of "ElasticBackupPolicies_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticBackupPolicyResource created on azure + // for more information of creating ElasticBackupPolicyResource, please refer to the document of ElasticBackupPolicyResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string backupPolicyName = "backupPolicyName"; + ResourceIdentifier elasticBackupPolicyResourceId = ElasticBackupPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, backupPolicyName); + ElasticBackupPolicyResource elasticBackupPolicy = client.GetElasticBackupPolicyResource(elasticBackupPolicyResourceId); + + // invoke the operation + ElasticBackupPolicyPatch patch = new ElasticBackupPolicyPatch + { + Properties = new ElasticBackupPolicyUpdateProperties + { + DailyBackupsToKeep = 5, + WeeklyBackupsToKeep = 10, + MonthlyBackupsToKeep = 10, + PolicyState = ElasticBackupPolicyState.Enabled, + }, + }; + ArmOperation lro = await elasticBackupPolicy.UpdateAsync(WaitUntil.Completed, patch); + ElasticBackupPolicyResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticBackupPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticBackupResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticBackupResource.cs new file mode 100644 index 000000000000..39e438abd22d --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticBackupResource.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.NetApp.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.NetApp.Samples +{ + public partial class Sample_ElasticBackupResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ElasticBackupsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticBackups_Get.json + // this example is just showing the usage of "ElasticBackups_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticBackupResource created on azure + // for more information of creating ElasticBackupResource, please refer to the document of ElasticBackupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string backupVaultName = "backupVault1"; + string backupName = "backup1"; + ResourceIdentifier elasticBackupResourceId = ElasticBackupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, backupVaultName, backupName); + ElasticBackupResource elasticBackup = client.GetElasticBackupResource(elasticBackupResourceId); + + // invoke the operation + ElasticBackupResource result = await elasticBackup.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticBackupData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_ElasticBackupsDelete() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticBackups_Delete.json + // this example is just showing the usage of "ElasticBackups_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticBackupResource created on azure + // for more information of creating ElasticBackupResource, please refer to the document of ElasticBackupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "resourceGroup"; + string accountName = "account1"; + string backupVaultName = "backupVault1"; + string backupName = "backup1"; + ResourceIdentifier elasticBackupResourceId = ElasticBackupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, backupVaultName, backupName); + ElasticBackupResource elasticBackup = client.GetElasticBackupResource(elasticBackupResourceId); + + // invoke the operation + await elasticBackup.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ElasticBackupsUpdate() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticBackups_Update.json + // this example is just showing the usage of "ElasticBackups_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticBackupResource created on azure + // for more information of creating ElasticBackupResource, please refer to the document of ElasticBackupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string backupVaultName = "backupVault1"; + string backupName = "backup1"; + ResourceIdentifier elasticBackupResourceId = ElasticBackupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, backupVaultName, backupName); + ElasticBackupResource elasticBackup = client.GetElasticBackupResource(elasticBackupResourceId); + + // invoke the operation + ElasticBackupPatch patch = new ElasticBackupPatch(); + ArmOperation lro = await elasticBackup.UpdateAsync(WaitUntil.Completed, patch); + ElasticBackupResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticBackupData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticBackupVaultCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticBackupVaultCollection.cs new file mode 100644 index 000000000000..fab5fe4db23d --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticBackupVaultCollection.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.NetApp.Samples +{ + public partial class Sample_ElasticBackupVaultCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ElasticBackupVaultsCreateOrUpdate() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticBackupVaults_Create.json + // this example is just showing the usage of "ElasticBackupVaults_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticAccountResource created on azure + // for more information of creating ElasticAccountResource, please refer to the document of ElasticAccountResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + ResourceIdentifier elasticAccountResourceId = ElasticAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + ElasticAccountResource elasticAccount = client.GetElasticAccountResource(elasticAccountResourceId); + + // get the collection of this ElasticBackupVaultResource + ElasticBackupVaultCollection collection = elasticAccount.GetElasticBackupVaults(); + + // invoke the operation + string backupVaultName = "backupVault1"; + ElasticBackupVaultData data = new ElasticBackupVaultData(new AzureLocation("eastus")); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, backupVaultName, data); + ElasticBackupVaultResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticBackupVaultData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ElasticBackupVaultsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticBackupVaults_Get.json + // this example is just showing the usage of "ElasticBackupVaults_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticAccountResource created on azure + // for more information of creating ElasticAccountResource, please refer to the document of ElasticAccountResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + ResourceIdentifier elasticAccountResourceId = ElasticAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + ElasticAccountResource elasticAccount = client.GetElasticAccountResource(elasticAccountResourceId); + + // get the collection of this ElasticBackupVaultResource + ElasticBackupVaultCollection collection = elasticAccount.GetElasticBackupVaults(); + + // invoke the operation + string backupVaultName = "backupVault1"; + ElasticBackupVaultResource result = await collection.GetAsync(backupVaultName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticBackupVaultData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ElasticBackupVaultsListByElasticAccount() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticBackupVaults_ListByElasticAccount.json + // this example is just showing the usage of "ElasticBackupVaults_ListByElasticAccount" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticAccountResource created on azure + // for more information of creating ElasticAccountResource, please refer to the document of ElasticAccountResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + ResourceIdentifier elasticAccountResourceId = ElasticAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + ElasticAccountResource elasticAccount = client.GetElasticAccountResource(elasticAccountResourceId); + + // get the collection of this ElasticBackupVaultResource + ElasticBackupVaultCollection collection = elasticAccount.GetElasticBackupVaults(); + + // invoke the operation and iterate over the result + await foreach (ElasticBackupVaultResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticBackupVaultData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_ElasticBackupVaultsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticBackupVaults_Get.json + // this example is just showing the usage of "ElasticBackupVaults_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticAccountResource created on azure + // for more information of creating ElasticAccountResource, please refer to the document of ElasticAccountResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + ResourceIdentifier elasticAccountResourceId = ElasticAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + ElasticAccountResource elasticAccount = client.GetElasticAccountResource(elasticAccountResourceId); + + // get the collection of this ElasticBackupVaultResource + ElasticBackupVaultCollection collection = elasticAccount.GetElasticBackupVaults(); + + // invoke the operation + string backupVaultName = "backupVault1"; + bool result = await collection.ExistsAsync(backupVaultName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ElasticBackupVaultsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticBackupVaults_Get.json + // this example is just showing the usage of "ElasticBackupVaults_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticAccountResource created on azure + // for more information of creating ElasticAccountResource, please refer to the document of ElasticAccountResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + ResourceIdentifier elasticAccountResourceId = ElasticAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + ElasticAccountResource elasticAccount = client.GetElasticAccountResource(elasticAccountResourceId); + + // get the collection of this ElasticBackupVaultResource + ElasticBackupVaultCollection collection = elasticAccount.GetElasticBackupVaults(); + + // invoke the operation + string backupVaultName = "backupVault1"; + NullableResponse response = await collection.GetIfExistsAsync(backupVaultName); + ElasticBackupVaultResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticBackupVaultData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticBackupVaultResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticBackupVaultResource.cs new file mode 100644 index 000000000000..9adbc4b2020a --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticBackupVaultResource.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.NetApp.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.NetApp.Samples +{ + public partial class Sample_ElasticBackupVaultResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ElasticBackupVaultsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticBackupVaults_Get.json + // this example is just showing the usage of "ElasticBackupVaults_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticBackupVaultResource created on azure + // for more information of creating ElasticBackupVaultResource, please refer to the document of ElasticBackupVaultResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string backupVaultName = "backupVault1"; + ResourceIdentifier elasticBackupVaultResourceId = ElasticBackupVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, backupVaultName); + ElasticBackupVaultResource elasticBackupVault = client.GetElasticBackupVaultResource(elasticBackupVaultResourceId); + + // invoke the operation + ElasticBackupVaultResource result = await elasticBackupVault.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticBackupVaultData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_ElasticBackupVaultsDelete() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticBackupVaults_Delete.json + // this example is just showing the usage of "ElasticBackupVaults_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticBackupVaultResource created on azure + // for more information of creating ElasticBackupVaultResource, please refer to the document of ElasticBackupVaultResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "resourceGroup"; + string accountName = "account1"; + string backupVaultName = "backupVault1"; + ResourceIdentifier elasticBackupVaultResourceId = ElasticBackupVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, backupVaultName); + ElasticBackupVaultResource elasticBackupVault = client.GetElasticBackupVaultResource(elasticBackupVaultResourceId); + + // invoke the operation + await elasticBackupVault.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ElasticBackupVaultsUpdate() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticBackupVaults_Update.json + // this example is just showing the usage of "ElasticBackupVaults_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticBackupVaultResource created on azure + // for more information of creating ElasticBackupVaultResource, please refer to the document of ElasticBackupVaultResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string backupVaultName = "backupVault1"; + ResourceIdentifier elasticBackupVaultResourceId = ElasticBackupVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, backupVaultName); + ElasticBackupVaultResource elasticBackupVault = client.GetElasticBackupVaultResource(elasticBackupVaultResourceId); + + // invoke the operation + ElasticBackupVaultPatch patch = new ElasticBackupVaultPatch + { + Tags = +{ +["Tag1"] = "Value1" +}, + }; + ArmOperation lro = await elasticBackupVault.UpdateAsync(WaitUntil.Completed, patch); + ElasticBackupVaultResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticBackupVaultData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticCapacityPoolCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticCapacityPoolCollection.cs new file mode 100644 index 000000000000..0b23588e84a1 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticCapacityPoolCollection.cs @@ -0,0 +1,248 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.NetApp.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.NetApp.Samples +{ + public partial class Sample_ElasticCapacityPoolCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ElasticCapacityPoolsCreateOrUpdate() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticCapacityPools_CreateOrUpdate.json + // this example is just showing the usage of "ElasticCapacityPools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticAccountResource created on azure + // for more information of creating ElasticAccountResource, please refer to the document of ElasticAccountResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + ResourceIdentifier elasticAccountResourceId = ElasticAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + ElasticAccountResource elasticAccount = client.GetElasticAccountResource(elasticAccountResourceId); + + // get the collection of this ElasticCapacityPoolResource + ElasticCapacityPoolCollection collection = elasticAccount.GetElasticCapacityPools(); + + // invoke the operation + string poolName = "pool1"; + ElasticCapacityPoolData data = new ElasticCapacityPoolData(new AzureLocation("eastus")) + { + Properties = new ElasticCapacityPoolProperties(4398046511104L, ElasticServiceLevel.ZoneRedundant, new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) + { + ActiveDirectoryConfigResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/activeDirectoryConfigs/activeDirectoryConfig1"), + }, + Zones = { "1", "2", "3" }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, poolName, data); + ElasticCapacityPoolResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticCapacityPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ElasticCapacityPoolsCreateOrUpdateCMK() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticCapacityPools_CreateOrUpdateCMK.json + // this example is just showing the usage of "ElasticCapacityPools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticAccountResource created on azure + // for more information of creating ElasticAccountResource, please refer to the document of ElasticAccountResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + ResourceIdentifier elasticAccountResourceId = ElasticAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + ElasticAccountResource elasticAccount = client.GetElasticAccountResource(elasticAccountResourceId); + + // get the collection of this ElasticCapacityPoolResource + ElasticCapacityPoolCollection collection = elasticAccount.GetElasticCapacityPools(); + + // invoke the operation + string poolName = "pool1"; + ElasticCapacityPoolData data = new ElasticCapacityPoolData(new AzureLocation("eastus")) + { + Properties = new ElasticCapacityPoolProperties(4398046511104L, ElasticServiceLevel.ZoneRedundant, new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) + { + Encryption = new ElasticEncryptionConfiguration(ElasticPoolEncryptionKeySource.NetApp, new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myKeyVault/privateEndpointConnections/myKeyVaultPec")), + ActiveDirectoryConfigResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/activeDirectoryConfigs/activeDirectoryConfig1"), + }, + Zones = { "1", "2", "3" }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, poolName, data); + ElasticCapacityPoolResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticCapacityPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ElasticCapacityPoolsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticCapacityPools_Get.json + // this example is just showing the usage of "ElasticCapacityPools_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticAccountResource created on azure + // for more information of creating ElasticAccountResource, please refer to the document of ElasticAccountResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + ResourceIdentifier elasticAccountResourceId = ElasticAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + ElasticAccountResource elasticAccount = client.GetElasticAccountResource(elasticAccountResourceId); + + // get the collection of this ElasticCapacityPoolResource + ElasticCapacityPoolCollection collection = elasticAccount.GetElasticCapacityPools(); + + // invoke the operation + string poolName = "pool1"; + ElasticCapacityPoolResource result = await collection.GetAsync(poolName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticCapacityPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ElasticCapacityPoolsListByElasticAccount() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticCapacityPools_ListByElasticAccount.json + // this example is just showing the usage of "ElasticCapacityPools_ListByElasticAccount" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticAccountResource created on azure + // for more information of creating ElasticAccountResource, please refer to the document of ElasticAccountResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + ResourceIdentifier elasticAccountResourceId = ElasticAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + ElasticAccountResource elasticAccount = client.GetElasticAccountResource(elasticAccountResourceId); + + // get the collection of this ElasticCapacityPoolResource + ElasticCapacityPoolCollection collection = elasticAccount.GetElasticCapacityPools(); + + // invoke the operation and iterate over the result + await foreach (ElasticCapacityPoolResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticCapacityPoolData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_ElasticCapacityPoolsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticCapacityPools_Get.json + // this example is just showing the usage of "ElasticCapacityPools_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticAccountResource created on azure + // for more information of creating ElasticAccountResource, please refer to the document of ElasticAccountResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + ResourceIdentifier elasticAccountResourceId = ElasticAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + ElasticAccountResource elasticAccount = client.GetElasticAccountResource(elasticAccountResourceId); + + // get the collection of this ElasticCapacityPoolResource + ElasticCapacityPoolCollection collection = elasticAccount.GetElasticCapacityPools(); + + // invoke the operation + string poolName = "pool1"; + bool result = await collection.ExistsAsync(poolName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ElasticCapacityPoolsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticCapacityPools_Get.json + // this example is just showing the usage of "ElasticCapacityPools_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticAccountResource created on azure + // for more information of creating ElasticAccountResource, please refer to the document of ElasticAccountResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + ResourceIdentifier elasticAccountResourceId = ElasticAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + ElasticAccountResource elasticAccount = client.GetElasticAccountResource(elasticAccountResourceId); + + // get the collection of this ElasticCapacityPoolResource + ElasticCapacityPoolCollection collection = elasticAccount.GetElasticCapacityPools(); + + // invoke the operation + string poolName = "pool1"; + NullableResponse response = await collection.GetIfExistsAsync(poolName); + ElasticCapacityPoolResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticCapacityPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticCapacityPoolResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticCapacityPoolResource.cs new file mode 100644 index 000000000000..c8f31859e6d2 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticCapacityPoolResource.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.NetApp.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.NetApp.Samples +{ + public partial class Sample_ElasticCapacityPoolResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ElasticCapacityPoolsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticCapacityPools_Get.json + // this example is just showing the usage of "ElasticCapacityPools_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticCapacityPoolResource created on azure + // for more information of creating ElasticCapacityPoolResource, please refer to the document of ElasticCapacityPoolResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + ResourceIdentifier elasticCapacityPoolResourceId = ElasticCapacityPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName); + ElasticCapacityPoolResource elasticCapacityPool = client.GetElasticCapacityPoolResource(elasticCapacityPoolResourceId); + + // invoke the operation + ElasticCapacityPoolResource result = await elasticCapacityPool.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticCapacityPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_ElasticCapacityPoolsDelete() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticCapacityPools_Delete.json + // this example is just showing the usage of "ElasticCapacityPools_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticCapacityPoolResource created on azure + // for more information of creating ElasticCapacityPoolResource, please refer to the document of ElasticCapacityPoolResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + ResourceIdentifier elasticCapacityPoolResourceId = ElasticCapacityPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName); + ElasticCapacityPoolResource elasticCapacityPool = client.GetElasticCapacityPoolResource(elasticCapacityPoolResourceId); + + // invoke the operation + await elasticCapacityPool.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ElasticCapacityPoolsUpdate() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticCapacityPools_Update.json + // this example is just showing the usage of "ElasticCapacityPools_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticCapacityPoolResource created on azure + // for more information of creating ElasticCapacityPoolResource, please refer to the document of ElasticCapacityPoolResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + ResourceIdentifier elasticCapacityPoolResourceId = ElasticCapacityPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName); + ElasticCapacityPoolResource elasticCapacityPool = client.GetElasticCapacityPoolResource(elasticCapacityPoolResourceId); + + // invoke the operation + ElasticCapacityPoolPatch patch = new ElasticCapacityPoolPatch + { + Properties = new ElasticCapacityPoolUpdateProperties + { + Size = 4398046511104L, + ActiveDirectoryConfigResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/activeDirectoryConfigs/activeDirectoryConfig1"), + }, + }; + ArmOperation lro = await elasticCapacityPool.UpdateAsync(WaitUntil.Completed, patch); + ElasticCapacityPoolResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticCapacityPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task ChangeZone_ElasticCapacityPoolsChangeZone() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticCapacityPools_ChangeZone.json + // this example is just showing the usage of "ElasticCapacityPools_ChangeZone" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticCapacityPoolResource created on azure + // for more information of creating ElasticCapacityPoolResource, please refer to the document of ElasticCapacityPoolResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + ResourceIdentifier elasticCapacityPoolResourceId = ElasticCapacityPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName); + ElasticCapacityPoolResource elasticCapacityPool = client.GetElasticCapacityPoolResource(elasticCapacityPoolResourceId); + + // invoke the operation + ChangeZoneContent content = new ChangeZoneContent("3"); + ArmOperation lro = await elasticCapacityPool.ChangeZoneAsync(WaitUntil.Completed, content); + ElasticCapacityPoolResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticCapacityPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CheckVolumeFilePathAvailability_ElasticCapacityPoolsCheckVolumeFilePathAvailability() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticCapacityPools_CheckVolumeFilePathAvailability.json + // this example is just showing the usage of "ElasticCapacityPools_CheckVolumeFilePathAvailability" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticCapacityPoolResource created on azure + // for more information of creating ElasticCapacityPoolResource, please refer to the document of ElasticCapacityPoolResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + ResourceIdentifier elasticCapacityPoolResourceId = ElasticCapacityPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName); + ElasticCapacityPoolResource elasticCapacityPool = client.GetElasticCapacityPoolResource(elasticCapacityPoolResourceId); + + // invoke the operation + CheckElasticVolumeFilePathAvailabilityContent content = new CheckElasticVolumeFilePathAvailabilityContent("my-exact-filepth"); + CheckElasticResourceAvailabilityResult result = await elasticCapacityPool.CheckVolumeFilePathAvailabilityAsync(content); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticSnapshotCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticSnapshotCollection.cs new file mode 100644 index 000000000000..09b60f078f3f --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticSnapshotCollection.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.NetApp.Samples +{ + public partial class Sample_ElasticSnapshotCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ElasticSnapshotsCreateOrUpdate() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticSnapshots_CreateOrUpdate.json + // this example is just showing the usage of "ElasticSnapshots_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticVolumeResource created on azure + // for more information of creating ElasticVolumeResource, please refer to the document of ElasticVolumeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + ResourceIdentifier elasticVolumeResourceId = ElasticVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + ElasticVolumeResource elasticVolume = client.GetElasticVolumeResource(elasticVolumeResourceId); + + // get the collection of this ElasticSnapshotResource + ElasticSnapshotCollection collection = elasticVolume.GetElasticSnapshots(); + + // invoke the operation + string snapshotName = "snapshot1"; + ElasticSnapshotData data = new ElasticSnapshotData(); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, snapshotName, data); + ElasticSnapshotResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticSnapshotData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ElasticSnapshotsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticSnapshots_Get.json + // this example is just showing the usage of "ElasticSnapshots_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticVolumeResource created on azure + // for more information of creating ElasticVolumeResource, please refer to the document of ElasticVolumeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + ResourceIdentifier elasticVolumeResourceId = ElasticVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + ElasticVolumeResource elasticVolume = client.GetElasticVolumeResource(elasticVolumeResourceId); + + // get the collection of this ElasticSnapshotResource + ElasticSnapshotCollection collection = elasticVolume.GetElasticSnapshots(); + + // invoke the operation + string snapshotName = "snapshot1"; + ElasticSnapshotResource result = await collection.GetAsync(snapshotName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticSnapshotData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ElasticSnapshotsListByElasticVolume() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticSnapshots_ListByElasticVolume.json + // this example is just showing the usage of "ElasticSnapshots_ListByElasticVolume" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticVolumeResource created on azure + // for more information of creating ElasticVolumeResource, please refer to the document of ElasticVolumeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + ResourceIdentifier elasticVolumeResourceId = ElasticVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + ElasticVolumeResource elasticVolume = client.GetElasticVolumeResource(elasticVolumeResourceId); + + // get the collection of this ElasticSnapshotResource + ElasticSnapshotCollection collection = elasticVolume.GetElasticSnapshots(); + + // invoke the operation and iterate over the result + await foreach (ElasticSnapshotResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticSnapshotData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_ElasticSnapshotsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticSnapshots_Get.json + // this example is just showing the usage of "ElasticSnapshots_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticVolumeResource created on azure + // for more information of creating ElasticVolumeResource, please refer to the document of ElasticVolumeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + ResourceIdentifier elasticVolumeResourceId = ElasticVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + ElasticVolumeResource elasticVolume = client.GetElasticVolumeResource(elasticVolumeResourceId); + + // get the collection of this ElasticSnapshotResource + ElasticSnapshotCollection collection = elasticVolume.GetElasticSnapshots(); + + // invoke the operation + string snapshotName = "snapshot1"; + bool result = await collection.ExistsAsync(snapshotName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ElasticSnapshotsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticSnapshots_Get.json + // this example is just showing the usage of "ElasticSnapshots_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticVolumeResource created on azure + // for more information of creating ElasticVolumeResource, please refer to the document of ElasticVolumeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + ResourceIdentifier elasticVolumeResourceId = ElasticVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + ElasticVolumeResource elasticVolume = client.GetElasticVolumeResource(elasticVolumeResourceId); + + // get the collection of this ElasticSnapshotResource + ElasticSnapshotCollection collection = elasticVolume.GetElasticSnapshots(); + + // invoke the operation + string snapshotName = "snapshot1"; + NullableResponse response = await collection.GetIfExistsAsync(snapshotName); + ElasticSnapshotResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticSnapshotData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticSnapshotPolicyCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticSnapshotPolicyCollection.cs new file mode 100644 index 000000000000..20238597b233 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticSnapshotPolicyCollection.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.NetApp.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.NetApp.Samples +{ + public partial class Sample_ElasticSnapshotPolicyCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ElasticSnapshotPoliciesCreateOrUpdate() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticSnapshotPolicies_CreateOrUpdate.json + // this example is just showing the usage of "ElasticSnapshotPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticAccountResource created on azure + // for more information of creating ElasticAccountResource, please refer to the document of ElasticAccountResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + ResourceIdentifier elasticAccountResourceId = ElasticAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + ElasticAccountResource elasticAccount = client.GetElasticAccountResource(elasticAccountResourceId); + + // get the collection of this ElasticSnapshotPolicyResource + ElasticSnapshotPolicyCollection collection = elasticAccount.GetElasticSnapshotPolicies(); + + // invoke the operation + string snapshotPolicyName = "snapshotPolicyName"; + ElasticSnapshotPolicyData data = new ElasticSnapshotPolicyData(new AzureLocation("eastus")) + { + Properties = new ElasticSnapshotPolicyProperties + { + HourlySchedule = new ElasticSnapshotPolicyHourlySchedule + { + SnapshotsToKeep = 2, + Minute = 50, + }, + DailySchedule = new ElasticSnapshotPolicyDailySchedule + { + SnapshotsToKeep = 4, + Hour = 14, + Minute = 30, + }, + WeeklySchedule = new ElasticSnapshotPolicyWeeklySchedule + { + SnapshotsToKeep = 3, + Days = { Models.DayOfWeek.Wednesday }, + Hour = 14, + Minute = 45, + }, + MonthlySchedule = new ElasticSnapshotPolicyMonthlySchedule + { + SnapshotsToKeep = 5, + DaysOfMonth = { 10, 11, 12 }, + Hour = 14, + Minute = 15, + }, + PolicyStatus = PolicyStatus.Enabled, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, snapshotPolicyName, data); + ElasticSnapshotPolicyResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticSnapshotPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ElasticSnapshotPoliciesGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticSnapshotPolicies_Get.json + // this example is just showing the usage of "ElasticSnapshotPolicies_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticAccountResource created on azure + // for more information of creating ElasticAccountResource, please refer to the document of ElasticAccountResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + ResourceIdentifier elasticAccountResourceId = ElasticAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + ElasticAccountResource elasticAccount = client.GetElasticAccountResource(elasticAccountResourceId); + + // get the collection of this ElasticSnapshotPolicyResource + ElasticSnapshotPolicyCollection collection = elasticAccount.GetElasticSnapshotPolicies(); + + // invoke the operation + string snapshotPolicyName = "snapshotPolicyName"; + ElasticSnapshotPolicyResource result = await collection.GetAsync(snapshotPolicyName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticSnapshotPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ElasticSnapshotPoliciesListByElasticAccount() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticSnapshotPolicies_ListByElasticAccount.json + // this example is just showing the usage of "ElasticSnapshotPolicies_ListByElasticAccount" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticAccountResource created on azure + // for more information of creating ElasticAccountResource, please refer to the document of ElasticAccountResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + ResourceIdentifier elasticAccountResourceId = ElasticAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + ElasticAccountResource elasticAccount = client.GetElasticAccountResource(elasticAccountResourceId); + + // get the collection of this ElasticSnapshotPolicyResource + ElasticSnapshotPolicyCollection collection = elasticAccount.GetElasticSnapshotPolicies(); + + // invoke the operation and iterate over the result + await foreach (ElasticSnapshotPolicyResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticSnapshotPolicyData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_ElasticSnapshotPoliciesGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticSnapshotPolicies_Get.json + // this example is just showing the usage of "ElasticSnapshotPolicies_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticAccountResource created on azure + // for more information of creating ElasticAccountResource, please refer to the document of ElasticAccountResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + ResourceIdentifier elasticAccountResourceId = ElasticAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + ElasticAccountResource elasticAccount = client.GetElasticAccountResource(elasticAccountResourceId); + + // get the collection of this ElasticSnapshotPolicyResource + ElasticSnapshotPolicyCollection collection = elasticAccount.GetElasticSnapshotPolicies(); + + // invoke the operation + string snapshotPolicyName = "snapshotPolicyName"; + bool result = await collection.ExistsAsync(snapshotPolicyName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ElasticSnapshotPoliciesGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticSnapshotPolicies_Get.json + // this example is just showing the usage of "ElasticSnapshotPolicies_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticAccountResource created on azure + // for more information of creating ElasticAccountResource, please refer to the document of ElasticAccountResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + ResourceIdentifier elasticAccountResourceId = ElasticAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + ElasticAccountResource elasticAccount = client.GetElasticAccountResource(elasticAccountResourceId); + + // get the collection of this ElasticSnapshotPolicyResource + ElasticSnapshotPolicyCollection collection = elasticAccount.GetElasticSnapshotPolicies(); + + // invoke the operation + string snapshotPolicyName = "snapshotPolicyName"; + NullableResponse response = await collection.GetIfExistsAsync(snapshotPolicyName); + ElasticSnapshotPolicyResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticSnapshotPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticSnapshotPolicyResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticSnapshotPolicyResource.cs new file mode 100644 index 000000000000..63a41c046bdb --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticSnapshotPolicyResource.cs @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.NetApp.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.NetApp.Samples +{ + public partial class Sample_ElasticSnapshotPolicyResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ElasticSnapshotPoliciesGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticSnapshotPolicies_Get.json + // this example is just showing the usage of "ElasticSnapshotPolicies_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticSnapshotPolicyResource created on azure + // for more information of creating ElasticSnapshotPolicyResource, please refer to the document of ElasticSnapshotPolicyResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string snapshotPolicyName = "snapshotPolicyName"; + ResourceIdentifier elasticSnapshotPolicyResourceId = ElasticSnapshotPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, snapshotPolicyName); + ElasticSnapshotPolicyResource elasticSnapshotPolicy = client.GetElasticSnapshotPolicyResource(elasticSnapshotPolicyResourceId); + + // invoke the operation + ElasticSnapshotPolicyResource result = await elasticSnapshotPolicy.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticSnapshotPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_ElasticSnapshotPoliciesDelete() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticSnapshotPolicies_Delete.json + // this example is just showing the usage of "ElasticSnapshotPolicies_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticSnapshotPolicyResource created on azure + // for more information of creating ElasticSnapshotPolicyResource, please refer to the document of ElasticSnapshotPolicyResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "resourceGroup"; + string accountName = "accountName"; + string snapshotPolicyName = "snapshotPolicyName"; + ResourceIdentifier elasticSnapshotPolicyResourceId = ElasticSnapshotPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, snapshotPolicyName); + ElasticSnapshotPolicyResource elasticSnapshotPolicy = client.GetElasticSnapshotPolicyResource(elasticSnapshotPolicyResourceId); + + // invoke the operation + await elasticSnapshotPolicy.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ElasticSnapshotPoliciesUpdate() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticSnapshotPolicies_Update.json + // this example is just showing the usage of "ElasticSnapshotPolicies_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticSnapshotPolicyResource created on azure + // for more information of creating ElasticSnapshotPolicyResource, please refer to the document of ElasticSnapshotPolicyResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string snapshotPolicyName = "snapshotPolicyName"; + ResourceIdentifier elasticSnapshotPolicyResourceId = ElasticSnapshotPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, snapshotPolicyName); + ElasticSnapshotPolicyResource elasticSnapshotPolicy = client.GetElasticSnapshotPolicyResource(elasticSnapshotPolicyResourceId); + + // invoke the operation + ElasticSnapshotPolicyPatch patch = new ElasticSnapshotPolicyPatch + { + Properties = new ElasticSnapshotPolicyUpdateProperties + { + HourlySchedule = new ElasticSnapshotPolicyHourlySchedule + { + SnapshotsToKeep = 2, + Minute = 50, + }, + DailySchedule = new ElasticSnapshotPolicyDailySchedule + { + SnapshotsToKeep = 4, + Hour = 14, + Minute = 30, + }, + WeeklySchedule = new ElasticSnapshotPolicyWeeklySchedule + { + SnapshotsToKeep = 3, + Days = { Models.DayOfWeek.Wednesday }, + Hour = 14, + Minute = 45, + }, + MonthlySchedule = new ElasticSnapshotPolicyMonthlySchedule + { + SnapshotsToKeep = 5, + DaysOfMonth = { 10, 11, 12 }, + Hour = 14, + Minute = 15, + }, + PolicyStatus = PolicyStatus.Enabled, + }, + }; + ArmOperation lro = await elasticSnapshotPolicy.UpdateAsync(WaitUntil.Completed, patch); + ElasticSnapshotPolicyResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticSnapshotPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetElasticVolumes_ElasticSnapshotPoliciesListElasticVolumes() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticSnapshotPolicies_ListElasticVolumes.json + // this example is just showing the usage of "ElasticSnapshotPolicies_ListElasticVolumes" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticSnapshotPolicyResource created on azure + // for more information of creating ElasticSnapshotPolicyResource, please refer to the document of ElasticSnapshotPolicyResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string snapshotPolicyName = "snapshotPolicyName"; + ResourceIdentifier elasticSnapshotPolicyResourceId = ElasticSnapshotPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, snapshotPolicyName); + ElasticSnapshotPolicyResource elasticSnapshotPolicy = client.GetElasticSnapshotPolicyResource(elasticSnapshotPolicyResourceId); + + // invoke the operation and iterate over the result + await foreach (ElasticVolumeResource item in elasticSnapshotPolicy.GetElasticVolumesAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticVolumeData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticSnapshotResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticSnapshotResource.cs new file mode 100644 index 000000000000..26d1d657fdc1 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticSnapshotResource.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.NetApp.Samples +{ + public partial class Sample_ElasticSnapshotResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ElasticSnapshotsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticSnapshots_Get.json + // this example is just showing the usage of "ElasticSnapshots_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticSnapshotResource created on azure + // for more information of creating ElasticSnapshotResource, please refer to the document of ElasticSnapshotResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + string snapshotName = "snapshot1"; + ResourceIdentifier elasticSnapshotResourceId = ElasticSnapshotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName, snapshotName); + ElasticSnapshotResource elasticSnapshot = client.GetElasticSnapshotResource(elasticSnapshotResourceId); + + // invoke the operation + ElasticSnapshotResource result = await elasticSnapshot.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticSnapshotData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_ElasticSnapshotsDelete() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticSnapshots_Delete.json + // this example is just showing the usage of "ElasticSnapshots_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticSnapshotResource created on azure + // for more information of creating ElasticSnapshotResource, please refer to the document of ElasticSnapshotResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + string snapshotName = "snapshot1"; + ResourceIdentifier elasticSnapshotResourceId = ElasticSnapshotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName, snapshotName); + ElasticSnapshotResource elasticSnapshot = client.GetElasticSnapshotResource(elasticSnapshotResourceId); + + // invoke the operation + await elasticSnapshot.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ElasticSnapshotsCreateOrUpdate() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticSnapshots_CreateOrUpdate.json + // this example is just showing the usage of "ElasticSnapshots_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticSnapshotResource created on azure + // for more information of creating ElasticSnapshotResource, please refer to the document of ElasticSnapshotResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + string snapshotName = "snapshot1"; + ResourceIdentifier elasticSnapshotResourceId = ElasticSnapshotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName, snapshotName); + ElasticSnapshotResource elasticSnapshot = client.GetElasticSnapshotResource(elasticSnapshotResourceId); + + // invoke the operation + ElasticSnapshotData data = new ElasticSnapshotData(); + ArmOperation lro = await elasticSnapshot.UpdateAsync(WaitUntil.Completed, data); + ElasticSnapshotResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticSnapshotData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticVolumeCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticVolumeCollection.cs new file mode 100644 index 000000000000..c64a8452ac51 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticVolumeCollection.cs @@ -0,0 +1,226 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.NetApp.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.NetApp.Samples +{ + public partial class Sample_ElasticVolumeCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ElasticVolumesCreateOrUpdate() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticVolumes_CreateOrUpdate.json + // this example is just showing the usage of "ElasticVolumes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticCapacityPoolResource created on azure + // for more information of creating ElasticCapacityPoolResource, please refer to the document of ElasticCapacityPoolResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + ResourceIdentifier elasticCapacityPoolResourceId = ElasticCapacityPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName); + ElasticCapacityPoolResource elasticCapacityPool = client.GetElasticCapacityPoolResource(elasticCapacityPoolResourceId); + + // get the collection of this ElasticVolumeResource + ElasticVolumeCollection collection = elasticCapacityPool.GetElasticVolumes(); + + // invoke the operation + string volumeName = "volume1"; + ElasticVolumeData data = new ElasticVolumeData(new AzureLocation("eastus")) + { + Properties = new ElasticVolumeProperties("my-unique-file-path", 107374182400L, new ElasticProtocolType[] { ElasticProtocolType.NFSv3 }) + { + ExportRules = {new ElasticExportPolicyRule +{ +RuleIndex = 1, +UnixAccessRule = ElasticUnixAccessRule.ReadOnly, +Nfsv3 = ElasticNfsv3Access.Enabled, +Nfsv4 = ElasticNfsv4Access.Disabled, +AllowedClients = {"0.0.0.0/0"}, +RootAccess = ElasticRootAccess.Disabled, +}}, + DataProtection = new ElasticVolumeDataProtectionProperties + { + SnapshotPolicyResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticSnapshotPolicies/policy1"), + Backup = new ElasticVolumeBackupProperties + { + ElasticBackupPolicyResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticBackupPolicies/elasticBackupPolicy1"), + PolicyEnforcement = ElasticVolumePolicyEnforcement.Enforced, + ElasticBackupVaultResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticBackupVaults/elasticBackupVault1"), + }, + }, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, volumeName, data); + ElasticVolumeResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticVolumeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ElasticVolumesGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticVolumes_Get.json + // this example is just showing the usage of "ElasticVolumes_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticCapacityPoolResource created on azure + // for more information of creating ElasticCapacityPoolResource, please refer to the document of ElasticCapacityPoolResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + ResourceIdentifier elasticCapacityPoolResourceId = ElasticCapacityPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName); + ElasticCapacityPoolResource elasticCapacityPool = client.GetElasticCapacityPoolResource(elasticCapacityPoolResourceId); + + // get the collection of this ElasticVolumeResource + ElasticVolumeCollection collection = elasticCapacityPool.GetElasticVolumes(); + + // invoke the operation + string volumeName = "volume1"; + ElasticVolumeResource result = await collection.GetAsync(volumeName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticVolumeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ElasticVolumesListByElasticPool() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticVolumes_ListByElasticPool.json + // this example is just showing the usage of "ElasticVolumes_ListByElasticPool" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticCapacityPoolResource created on azure + // for more information of creating ElasticCapacityPoolResource, please refer to the document of ElasticCapacityPoolResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + ResourceIdentifier elasticCapacityPoolResourceId = ElasticCapacityPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName); + ElasticCapacityPoolResource elasticCapacityPool = client.GetElasticCapacityPoolResource(elasticCapacityPoolResourceId); + + // get the collection of this ElasticVolumeResource + ElasticVolumeCollection collection = elasticCapacityPool.GetElasticVolumes(); + + // invoke the operation and iterate over the result + await foreach (ElasticVolumeResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticVolumeData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_ElasticVolumesGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticVolumes_Get.json + // this example is just showing the usage of "ElasticVolumes_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticCapacityPoolResource created on azure + // for more information of creating ElasticCapacityPoolResource, please refer to the document of ElasticCapacityPoolResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + ResourceIdentifier elasticCapacityPoolResourceId = ElasticCapacityPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName); + ElasticCapacityPoolResource elasticCapacityPool = client.GetElasticCapacityPoolResource(elasticCapacityPoolResourceId); + + // get the collection of this ElasticVolumeResource + ElasticVolumeCollection collection = elasticCapacityPool.GetElasticVolumes(); + + // invoke the operation + string volumeName = "volume1"; + bool result = await collection.ExistsAsync(volumeName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ElasticVolumesGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticVolumes_Get.json + // this example is just showing the usage of "ElasticVolumes_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticCapacityPoolResource created on azure + // for more information of creating ElasticCapacityPoolResource, please refer to the document of ElasticCapacityPoolResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + ResourceIdentifier elasticCapacityPoolResourceId = ElasticCapacityPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName); + ElasticCapacityPoolResource elasticCapacityPool = client.GetElasticCapacityPoolResource(elasticCapacityPoolResourceId); + + // get the collection of this ElasticVolumeResource + ElasticVolumeCollection collection = elasticCapacityPool.GetElasticVolumes(); + + // invoke the operation + string volumeName = "volume1"; + NullableResponse response = await collection.GetIfExistsAsync(volumeName); + ElasticVolumeResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticVolumeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticVolumeResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticVolumeResource.cs new file mode 100644 index 000000000000..e8bced31c436 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_ElasticVolumeResource.cs @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.NetApp.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.NetApp.Samples +{ + public partial class Sample_ElasticVolumeResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ElasticVolumesGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticVolumes_Get.json + // this example is just showing the usage of "ElasticVolumes_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticVolumeResource created on azure + // for more information of creating ElasticVolumeResource, please refer to the document of ElasticVolumeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + ResourceIdentifier elasticVolumeResourceId = ElasticVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + ElasticVolumeResource elasticVolume = client.GetElasticVolumeResource(elasticVolumeResourceId); + + // invoke the operation + ElasticVolumeResource result = await elasticVolume.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticVolumeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_ElasticVolumesDelete() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticVolumes_Delete.json + // this example is just showing the usage of "ElasticVolumes_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticVolumeResource created on azure + // for more information of creating ElasticVolumeResource, please refer to the document of ElasticVolumeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + ResourceIdentifier elasticVolumeResourceId = ElasticVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + ElasticVolumeResource elasticVolume = client.GetElasticVolumeResource(elasticVolumeResourceId); + + // invoke the operation + await elasticVolume.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ElasticVolumesUpdate() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticVolumes_Update.json + // this example is just showing the usage of "ElasticVolumes_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticVolumeResource created on azure + // for more information of creating ElasticVolumeResource, please refer to the document of ElasticVolumeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + ResourceIdentifier elasticVolumeResourceId = ElasticVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + ElasticVolumeResource elasticVolume = client.GetElasticVolumeResource(elasticVolumeResourceId); + + // invoke the operation + ElasticVolumePatch patch = new ElasticVolumePatch + { + Properties = new ElasticVolumeUpdateProperties + { + ExportRules = {new ElasticExportPolicyRule +{ +RuleIndex = 1, +UnixAccessRule = ElasticUnixAccessRule.ReadOnly, +Nfsv3 = ElasticNfsv3Access.Enabled, +Nfsv4 = ElasticNfsv4Access.Disabled, +AllowedClients = {"0.0.0.0/0"}, +RootAccess = ElasticRootAccess.Disabled, +}}, + DataProtection = new ElasticVolumeDataProtectionPatchProperties + { + SnapshotPolicyResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticSnapshotPolicies/policy1"), + }, + }, + }; + ArmOperation lro = await elasticVolume.UpdateAsync(WaitUntil.Completed, patch); + ElasticVolumeResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticVolumeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Revert_ElasticVolumesRevert() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticVolumes_Revert.json + // this example is just showing the usage of "ElasticVolumes_Revert" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ElasticVolumeResource created on azure + // for more information of creating ElasticVolumeResource, please refer to the document of ElasticVolumeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + ResourceIdentifier elasticVolumeResourceId = ElasticVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + ElasticVolumeResource elasticVolume = client.GetElasticVolumeResource(elasticVolumeResourceId); + + // invoke the operation + ElasticVolumeRevert body = new ElasticVolumeRevert + { + SnapshotResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.NetApp/elasticAccounts/account1/elasticCapacityPools/pool1/elasticVolumes/volume1/elasticSnapshots/snapshot1"), + }; + ArmOperation lro = await elasticVolume.RevertAsync(WaitUntil.Completed, body); + ElasticVolumeResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticVolumeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppAccountCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppAccountCollection.cs index 025d2ec0967e..7db8bfeded0f 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppAccountCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppAccountCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_NetAppAccountCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_AccountsCreateOrUpdate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Accounts_CreateOrUpdate.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Accounts_CreateOrUpdate.json // this example is just showing the usage of "Accounts_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task CreateOrUpdate_AccountsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_AccountsCreateOrUpdateWithActiveDirectory() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Accounts_CreateOrUpdateAD.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Accounts_CreateOrUpdateAD.json // this example is just showing the usage of "Accounts_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -81,7 +81,7 @@ public async Task CreateOrUpdate_AccountsCreateOrUpdateWithActiveDirectory() ActiveDirectories = {new NetAppAccountActiveDirectory { Username = "ad_user_name", -Password = "ad_password", +Password = "", Domain = "10.10.10.3", Dns = "10.10.10.3", SmbServerName = "SMBServer", @@ -106,7 +106,7 @@ public async Task CreateOrUpdate_AccountsCreateOrUpdateWithActiveDirectory() [Ignore("Only validating compilation of examples")] public async Task Get_AccountsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Accounts_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Accounts_Get.json // this example is just showing the usage of "Accounts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -139,7 +139,7 @@ public async Task Get_AccountsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_AccountsList() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Accounts_List.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Accounts_List.json // this example is just showing the usage of "Accounts_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task GetAll_AccountsList() [Ignore("Only validating compilation of examples")] public async Task Exists_AccountsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Accounts_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Accounts_Get.json // this example is just showing the usage of "Accounts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -203,7 +203,7 @@ public async Task Exists_AccountsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_AccountsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Accounts_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Accounts_Get.json // this example is just showing the usage of "Accounts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppAccountResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppAccountResource.cs index c587d9fbd1e0..90e1a07bbcbc 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppAccountResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppAccountResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetAppAccountResource [Ignore("Only validating compilation of examples")] public async Task Get_AccountsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Accounts_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Accounts_Get.json // this example is just showing the usage of "Accounts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_AccountsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_AccountsDelete() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Accounts_Delete.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Accounts_Delete.json // this example is just showing the usage of "Accounts_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -76,7 +76,7 @@ public async Task Delete_AccountsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_AccountsUpdate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Accounts_Update.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Accounts_Update.json // this example is just showing the usage of "Accounts_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -114,7 +114,7 @@ public async Task Update_AccountsUpdate() [Ignore("Only validating compilation of examples")] public async Task ChangeKeyVault_AccountsChangeKeyVault() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Accounts_ChangeKeyVault.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Accounts_ChangeKeyVault.json // this example is just showing the usage of "Accounts_ChangeKeyVault" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -151,7 +151,7 @@ public async Task ChangeKeyVault_AccountsChangeKeyVault() [Ignore("Only validating compilation of examples")] public async Task GetChangeKeyVaultInformation_AccountsGetChangeKeyVaultInformation() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Accounts_GetChangeKeyVaultInformation.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Accounts_GetChangeKeyVaultInformation.json // this example is just showing the usage of "Accounts_GetChangeKeyVaultInformation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -178,7 +178,7 @@ public async Task GetChangeKeyVaultInformation_AccountsGetChangeKeyVaultInformat [Ignore("Only validating compilation of examples")] public async Task RenewCredentials_AccountsRenewCredentials() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Accounts_RenewCredentials.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Accounts_RenewCredentials.json // this example is just showing the usage of "Accounts_RenewCredentials" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -204,7 +204,7 @@ public async Task RenewCredentials_AccountsRenewCredentials() [Ignore("Only validating compilation of examples")] public async Task TransitionToCmk_AccountsMigrateEncryptionKey() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Accounts_TransitionEncryptionKey.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Accounts_TransitionEncryptionKey.json // this example is just showing the usage of "Accounts_TransitionToCmk" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -231,7 +231,7 @@ public async Task TransitionToCmk_AccountsMigrateEncryptionKey() [Ignore("Only validating compilation of examples")] public async Task MigrateBackupsBackupsUnderAccount_BackupsUnderAccountMigrate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/BackupsUnderAccount_Migrate.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/BackupsUnderAccount_Migrate.json // this example is just showing the usage of "BackupsUnderAccount_MigrateBackups" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -258,7 +258,7 @@ public async Task MigrateBackupsBackupsUnderAccount_BackupsUnderAccountMigrate() [Ignore("Only validating compilation of examples")] public async Task GetNetAppResourceQuotaLimitsAccounts_QuotaLimits() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/NetAppResourceQuotaLimitsAccount_List.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/NetAppResourceQuotaLimitsAccount_List.json // this example is just showing the usage of "NetAppResourceQuotaLimitsAccount_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -287,7 +287,7 @@ public async Task GetNetAppResourceQuotaLimitsAccounts_QuotaLimits() [Ignore("Only validating compilation of examples")] public async Task GetNetAppResourceQuotaLimitsAccount_QuotaLimits() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/NetAppResourceQuotaLimitsAccount_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/NetAppResourceQuotaLimitsAccount_Get.json // this example is just showing the usage of "NetAppResourceQuotaLimitsAccount_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -314,7 +314,7 @@ public async Task GetNetAppResourceQuotaLimitsAccount_QuotaLimits() [Ignore("Only validating compilation of examples")] public async Task GetVolumeGroups_VolumeGroupsListOracle() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/VolumeGroups_List_Oracle.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/VolumeGroups_List_Oracle.json // this example is just showing the usage of "VolumeGroups_ListByNetAppAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -343,7 +343,7 @@ public async Task GetVolumeGroups_VolumeGroupsListOracle() [Ignore("Only validating compilation of examples")] public async Task GetVolumeGroups_VolumeGroupsListSapHana() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/VolumeGroups_List_SapHana.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/VolumeGroups_List_SapHana.json // this example is just showing the usage of "VolumeGroups_ListByNetAppAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppBackupPolicyCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppBackupPolicyCollection.cs index 30c4402ce0bc..3fb95df4de26 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppBackupPolicyCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppBackupPolicyCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_NetAppBackupPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_BackupPoliciesCreate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/BackupPolicies_Create.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/BackupPolicies_Create.json // this example is just showing the usage of "BackupPolicies_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task CreateOrUpdate_BackupPoliciesCreate() [Ignore("Only validating compilation of examples")] public async Task Get_BackupsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/BackupPolicies_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/BackupPolicies_Get.json // this example is just showing the usage of "BackupPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Get_BackupsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_BackupPoliciesList() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/BackupPolicies_List.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/BackupPolicies_List.json // this example is just showing the usage of "BackupPolicies_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,7 +131,7 @@ public async Task GetAll_BackupPoliciesList() [Ignore("Only validating compilation of examples")] public async Task Exists_BackupsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/BackupPolicies_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/BackupPolicies_Get.json // this example is just showing the usage of "BackupPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -161,7 +161,7 @@ public async Task Exists_BackupsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_BackupsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/BackupPolicies_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/BackupPolicies_Get.json // this example is just showing the usage of "BackupPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppBackupPolicyResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppBackupPolicyResource.cs index 63adbc5a0fbf..b5a13c345900 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppBackupPolicyResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppBackupPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetAppBackupPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_BackupsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/BackupPolicies_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/BackupPolicies_Get.json // this example is just showing the usage of "BackupPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_BackupsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_BackupPoliciesDelete() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/BackupPolicies_Delete.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/BackupPolicies_Delete.json // this example is just showing the usage of "BackupPolicies_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_BackupPoliciesDelete() [Ignore("Only validating compilation of examples")] public async Task Update_BackupPoliciesUpdate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/BackupPolicies_Update.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/BackupPolicies_Update.json // this example is just showing the usage of "BackupPolicies_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppBackupVaultBackupCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppBackupVaultBackupCollection.cs index 536d85302f18..baaae88fa377 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppBackupVaultBackupCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppBackupVaultBackupCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_NetAppBackupVaultBackupCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_BackupsUnderBackupVaultCreate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/BackupsUnderBackupVault_Create.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/BackupsUnderBackupVault_Create.json // this example is just showing the usage of "Backups_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,7 +59,7 @@ public async Task CreateOrUpdate_BackupsUnderBackupVaultCreate() [Ignore("Only validating compilation of examples")] public async Task Get_BackupsUnderBackupVaultGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/BackupsUnderBackupVault_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/BackupsUnderBackupVault_Get.json // this example is just showing the usage of "Backups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,9 +92,9 @@ public async Task Get_BackupsUnderBackupVaultGet() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetAll_BackupsList() + public async Task GetAll_BackupsListByVault() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/BackupsUnderBackupVault_List.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Backups_ListByVault.json // this example is just showing the usage of "Backups_ListByVault" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,7 +131,7 @@ public async Task GetAll_BackupsList() [Ignore("Only validating compilation of examples")] public async Task Exists_BackupsUnderBackupVaultGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/BackupsUnderBackupVault_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/BackupsUnderBackupVault_Get.json // this example is just showing the usage of "Backups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -162,7 +162,7 @@ public async Task Exists_BackupsUnderBackupVaultGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_BackupsUnderBackupVaultGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/BackupsUnderBackupVault_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/BackupsUnderBackupVault_Get.json // this example is just showing the usage of "Backups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppBackupVaultBackupResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppBackupVaultBackupResource.cs index 5012e94843c1..948943ec8eab 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppBackupVaultBackupResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppBackupVaultBackupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetAppBackupVaultBackupResource [Ignore("Only validating compilation of examples")] public async Task Get_BackupsUnderBackupVaultGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/BackupsUnderBackupVault_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/BackupsUnderBackupVault_Get.json // this example is just showing the usage of "Backups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_BackupsUnderBackupVaultGet() [Ignore("Only validating compilation of examples")] public async Task Delete_BackupsUnderBackupVaultDelete() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/BackupsUnderBackupVault_Delete.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/BackupsUnderBackupVault_Delete.json // this example is just showing the usage of "Backups_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Delete_BackupsUnderBackupVaultDelete() [Ignore("Only validating compilation of examples")] public async Task Update_BackupsUnderBackupVaultUpdate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/BackupsUnderBackupVault_Update.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/BackupsUnderBackupVault_Update.json // this example is just showing the usage of "Backups_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -114,7 +114,7 @@ public async Task Update_BackupsUnderBackupVaultUpdate() [Ignore("Only validating compilation of examples")] public async Task RestoreFilesBackupsUnderBackupVault_BackupsSingleFileRestore() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/BackupsUnderBackupVault_SingleFileRestore.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/BackupsUnderBackupVault_SingleFileRestore.json // this example is just showing the usage of "BackupsUnderBackupVault_RestoreFiles" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppBackupVaultCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppBackupVaultCollection.cs index 66eac95254a1..ddec7f9bfc74 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppBackupVaultCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppBackupVaultCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_NetAppBackupVaultCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_BackupVaultCreateOrUpdate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/BackupVaults_Create.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/BackupVaults_Create.json // this example is just showing the usage of "BackupVaults_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task CreateOrUpdate_BackupVaultCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_BackupVaultsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/BackupVaults_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/BackupVaults_Get.json // this example is just showing the usage of "BackupVaults_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task Get_BackupVaultsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_BackupVaultsList() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/BackupVaults_List.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/BackupVaults_List.json // this example is just showing the usage of "BackupVaults_ListByNetAppAccount" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task GetAll_BackupVaultsList() [Ignore("Only validating compilation of examples")] public async Task Exists_BackupVaultsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/BackupVaults_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/BackupVaults_Get.json // this example is just showing the usage of "BackupVaults_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -155,7 +155,7 @@ public async Task Exists_BackupVaultsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_BackupVaultsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/BackupVaults_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/BackupVaults_Get.json // this example is just showing the usage of "BackupVaults_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppBackupVaultResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppBackupVaultResource.cs index 8bf0f7d37211..baf47c5b9735 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppBackupVaultResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppBackupVaultResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetAppBackupVaultResource [Ignore("Only validating compilation of examples")] public async Task Get_BackupVaultsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/BackupVaults_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/BackupVaults_Get.json // this example is just showing the usage of "BackupVaults_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_BackupVaultsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_BackupVaultsDelete() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/BackupVaults_Delete.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/BackupVaults_Delete.json // this example is just showing the usage of "BackupVaults_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_BackupVaultsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_BackupVaultsUpdate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/BackupVaults_Update.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/BackupVaults_Update.json // this example is just showing the usage of "BackupVaults_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppBucketCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppBucketCollection.cs new file mode 100644 index 000000000000..13afd04ae529 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppBucketCollection.cs @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.NetApp.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.NetApp.Samples +{ + public partial class Sample_NetAppBucketCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_BucketsCreateOrUpdate() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Buckets_CreateOrUpdate.json + // this example is just showing the usage of "Buckets_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetAppVolumeResource created on azure + // for more information of creating NetAppVolumeResource, please refer to the document of NetAppVolumeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + ResourceIdentifier netAppVolumeResourceId = NetAppVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + NetAppVolumeResource netAppVolume = client.GetNetAppVolumeResource(netAppVolumeResourceId); + + // get the collection of this NetAppBucketResource + NetAppBucketCollection collection = netAppVolume.GetNetAppBuckets(); + + // invoke the operation + string bucketName = "bucket1"; + NetAppBucketData data = new NetAppBucketData + { + Path = "/path", + FileSystemUser = new NetAppBucketFileSystemUser + { + NfsUser = new NetAppBucketNfsUser + { + UserId = 1001L, + GroupId = 1000L, + }, + }, + Server = new NetAppBucketServerProperties + { + Fqdn = "fullyqualified.domainname.com", + CertificateObject = "", + }, + Permissions = NetAppBucketPermission.ReadOnly, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, bucketName, data); + NetAppBucketResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetAppBucketData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_BucketsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Buckets_Get.json + // this example is just showing the usage of "Buckets_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetAppVolumeResource created on azure + // for more information of creating NetAppVolumeResource, please refer to the document of NetAppVolumeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + ResourceIdentifier netAppVolumeResourceId = NetAppVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + NetAppVolumeResource netAppVolume = client.GetNetAppVolumeResource(netAppVolumeResourceId); + + // get the collection of this NetAppBucketResource + NetAppBucketCollection collection = netAppVolume.GetNetAppBuckets(); + + // invoke the operation + string bucketName = "bucket1"; + NetAppBucketResource result = await collection.GetAsync(bucketName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetAppBucketData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_BucketsList() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Buckets_List.json + // this example is just showing the usage of "Buckets_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetAppVolumeResource created on azure + // for more information of creating NetAppVolumeResource, please refer to the document of NetAppVolumeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + ResourceIdentifier netAppVolumeResourceId = NetAppVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + NetAppVolumeResource netAppVolume = client.GetNetAppVolumeResource(netAppVolumeResourceId); + + // get the collection of this NetAppBucketResource + NetAppBucketCollection collection = netAppVolume.GetNetAppBuckets(); + + // invoke the operation and iterate over the result + await foreach (NetAppBucketResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetAppBucketData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_BucketsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Buckets_Get.json + // this example is just showing the usage of "Buckets_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetAppVolumeResource created on azure + // for more information of creating NetAppVolumeResource, please refer to the document of NetAppVolumeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + ResourceIdentifier netAppVolumeResourceId = NetAppVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + NetAppVolumeResource netAppVolume = client.GetNetAppVolumeResource(netAppVolumeResourceId); + + // get the collection of this NetAppBucketResource + NetAppBucketCollection collection = netAppVolume.GetNetAppBuckets(); + + // invoke the operation + string bucketName = "bucket1"; + bool result = await collection.ExistsAsync(bucketName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_BucketsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Buckets_Get.json + // this example is just showing the usage of "Buckets_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetAppVolumeResource created on azure + // for more information of creating NetAppVolumeResource, please refer to the document of NetAppVolumeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + ResourceIdentifier netAppVolumeResourceId = NetAppVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + NetAppVolumeResource netAppVolume = client.GetNetAppVolumeResource(netAppVolumeResourceId); + + // get the collection of this NetAppBucketResource + NetAppBucketCollection collection = netAppVolume.GetNetAppBuckets(); + + // invoke the operation + string bucketName = "bucket1"; + NullableResponse response = await collection.GetIfExistsAsync(bucketName); + NetAppBucketResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetAppBucketData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppBucketResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppBucketResource.cs new file mode 100644 index 000000000000..6f9fed3b6669 --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppBucketResource.cs @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.NetApp.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.NetApp.Samples +{ + public partial class Sample_NetAppBucketResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_BucketsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Buckets_Get.json + // this example is just showing the usage of "Buckets_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetAppBucketResource created on azure + // for more information of creating NetAppBucketResource, please refer to the document of NetAppBucketResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + string bucketName = "bucket1"; + ResourceIdentifier netAppBucketResourceId = NetAppBucketResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName, bucketName); + NetAppBucketResource netAppBucket = client.GetNetAppBucketResource(netAppBucketResourceId); + + // invoke the operation + NetAppBucketResource result = await netAppBucket.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetAppBucketData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_BucketsDelete() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Buckets_Delete.json + // this example is just showing the usage of "Buckets_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetAppBucketResource created on azure + // for more information of creating NetAppBucketResource, please refer to the document of NetAppBucketResource + string subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + string bucketName = "bucket1"; + ResourceIdentifier netAppBucketResourceId = NetAppBucketResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName, bucketName); + NetAppBucketResource netAppBucket = client.GetNetAppBucketResource(netAppBucketResourceId); + + // invoke the operation + await netAppBucket.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_BucketsUpdate() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Buckets_Update.json + // this example is just showing the usage of "Buckets_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetAppBucketResource created on azure + // for more information of creating NetAppBucketResource, please refer to the document of NetAppBucketResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + string bucketName = "bucket1"; + ResourceIdentifier netAppBucketResourceId = NetAppBucketResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName, bucketName); + NetAppBucketResource netAppBucket = client.GetNetAppBucketResource(netAppBucketResourceId); + + // invoke the operation + NetAppBucketPatch patch = new NetAppBucketPatch + { + Server = new NetAppBucketServerPatchProperties + { + Fqdn = "fullyqualified.domainname.com", + CertificateObject = "", + }, + Permissions = NetAppBucketPatchPermission.ReadWrite, + }; + ArmOperation lro = await netAppBucket.UpdateAsync(WaitUntil.Completed, patch); + NetAppBucketResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetAppBucketData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GenerateCredentials_BucketsGenerateCredentials() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Buckets_GenerateCredentials.json + // this example is just showing the usage of "Buckets_GenerateCredentials" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetAppBucketResource created on azure + // for more information of creating NetAppBucketResource, please refer to the document of NetAppBucketResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + string bucketName = "bucket1"; + ResourceIdentifier netAppBucketResourceId = NetAppBucketResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName, bucketName); + NetAppBucketResource netAppBucket = client.GetNetAppBucketResource(netAppBucketResourceId); + + // invoke the operation + NetAppBucketCredentialsExpiry body = new NetAppBucketCredentialsExpiry + { + KeyPairExpiryDays = 3, + }; + NetAppBucketGenerateCredentials result = await netAppBucket.GenerateCredentialsAsync(body); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppSubvolumeInfoCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppSubvolumeInfoCollection.cs index 25d90b5edb4d..c9ac10fa8bc9 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppSubvolumeInfoCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppSubvolumeInfoCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_NetAppSubvolumeInfoCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_SubvolumesCreate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Subvolumes_Create.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Subvolumes_Create.json // this example is just showing the usage of "Subvolumes_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task CreateOrUpdate_SubvolumesCreate() [Ignore("Only validating compilation of examples")] public async Task Get_SubvolumesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Subvolumes_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Subvolumes_Get.json // this example is just showing the usage of "Subvolumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -96,7 +96,7 @@ public async Task Get_SubvolumesGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_SubvolumesList() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Subvolumes_List.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Subvolumes_List.json // this example is just showing the usage of "Subvolumes_ListByVolume" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -134,7 +134,7 @@ public async Task GetAll_SubvolumesList() [Ignore("Only validating compilation of examples")] public async Task Exists_SubvolumesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Subvolumes_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Subvolumes_Get.json // this example is just showing the usage of "Subvolumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task Exists_SubvolumesGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_SubvolumesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Subvolumes_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Subvolumes_Get.json // this example is just showing the usage of "Subvolumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppSubvolumeInfoResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppSubvolumeInfoResource.cs index ef4d708ac2c5..88087db8d880 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppSubvolumeInfoResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppSubvolumeInfoResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetAppSubvolumeInfoResource [Ignore("Only validating compilation of examples")] public async Task Get_SubvolumesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Subvolumes_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Subvolumes_Get.json // this example is just showing the usage of "Subvolumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_SubvolumesGet() [Ignore("Only validating compilation of examples")] public async Task Delete_SubvolumesDelete() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Subvolumes_Delete.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Subvolumes_Delete.json // this example is just showing the usage of "Subvolumes_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Delete_SubvolumesDelete() [Ignore("Only validating compilation of examples")] public async Task Update_SubvolumesUpdate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Subvolumes_Update.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Subvolumes_Update.json // this example is just showing the usage of "Subvolumes_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Update_SubvolumesUpdate() [Ignore("Only validating compilation of examples")] public async Task GetMetadata_SubvolumesMetadata() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Subvolumes_Metadata.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Subvolumes_Metadata.json // this example is just showing the usage of "Subvolumes_GetMetadata" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeCollection.cs index 2211abb38ce9..7ad2d266e873 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetAppVolumeCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_VolumesCreateOrUpdate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_CreateOrUpdate.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_CreateOrUpdate.json // this example is just showing the usage of "Volumes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -42,7 +42,7 @@ public async Task CreateOrUpdate_VolumesCreateOrUpdate() // invoke the operation string volumeName = "volume1"; - NetAppVolumeData data = new NetAppVolumeData(new AzureLocation("eastus"), "my-unique-file-path", 107374182400L, new ResourceIdentifier("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) + NetAppVolumeData data = new NetAppVolumeData(new AzureLocation("eastus"), "my-unique-file-path", 107374182400L, new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")) { ServiceLevel = NetAppFileServiceLevel.Premium, }; @@ -56,11 +56,46 @@ public async Task CreateOrUpdate_VolumesCreateOrUpdate() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_VolumesExtralargeVolumeGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_ExtraLargeVolumes_Get.json + // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this CapacityPoolResource created on azure + // for more information of creating CapacityPoolResource, please refer to the document of CapacityPoolResource + string subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + ResourceIdentifier capacityPoolResourceId = CapacityPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName); + CapacityPoolResource capacityPool = client.GetCapacityPoolResource(capacityPoolResourceId); + + // get the collection of this NetAppVolumeResource + NetAppVolumeCollection collection = capacityPool.GetNetAppVolumes(); + + // invoke the operation + string volumeName = "volume1"; + NetAppVolumeResource result = await collection.GetAsync(volumeName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetAppVolumeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task Get_VolumesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_Get.json // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,11 +126,48 @@ public async Task Get_VolumesGet() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_VolumesExtralargeVolumeList() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_ExtraLargeVolumes_List.json + // this example is just showing the usage of "Volumes_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this CapacityPoolResource created on azure + // for more information of creating CapacityPoolResource, please refer to the document of CapacityPoolResource + string subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + ResourceIdentifier capacityPoolResourceId = CapacityPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName); + CapacityPoolResource capacityPool = client.GetCapacityPoolResource(capacityPoolResourceId); + + // get the collection of this NetAppVolumeResource + NetAppVolumeCollection collection = capacityPool.GetNetAppVolumes(); + + // invoke the operation and iterate over the result + await foreach (NetAppVolumeResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetAppVolumeData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task GetAll_VolumesList() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_List.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_List.json // this example is just showing the usage of "Volumes_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,11 +200,42 @@ public async Task GetAll_VolumesList() Console.WriteLine("Succeeded"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_VolumesExtralargeVolumeGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_ExtraLargeVolumes_Get.json + // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this CapacityPoolResource created on azure + // for more information of creating CapacityPoolResource, please refer to the document of CapacityPoolResource + string subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + ResourceIdentifier capacityPoolResourceId = CapacityPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName); + CapacityPoolResource capacityPool = client.GetCapacityPoolResource(capacityPoolResourceId); + + // get the collection of this NetAppVolumeResource + NetAppVolumeCollection collection = capacityPool.GetNetAppVolumes(); + + // invoke the operation + string volumeName = "volume1"; + bool result = await collection.ExistsAsync(volumeName); + + Console.WriteLine($"Succeeded: {result}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task Exists_VolumesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_Get.json // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -159,11 +262,54 @@ public async Task Exists_VolumesGet() Console.WriteLine($"Succeeded: {result}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_VolumesExtralargeVolumeGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_ExtraLargeVolumes_Get.json + // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this CapacityPoolResource created on azure + // for more information of creating CapacityPoolResource, please refer to the document of CapacityPoolResource + string subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + ResourceIdentifier capacityPoolResourceId = CapacityPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName); + CapacityPoolResource capacityPool = client.GetCapacityPoolResource(capacityPoolResourceId); + + // get the collection of this NetAppVolumeResource + NetAppVolumeCollection collection = capacityPool.GetNetAppVolumes(); + + // invoke the operation + string volumeName = "volume1"; + NullableResponse response = await collection.GetIfExistsAsync(volumeName); + NetAppVolumeResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetAppVolumeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + [Test] [Ignore("Only validating compilation of examples")] public async Task GetIfExists_VolumesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_Get.json // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeGroupCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeGroupCollection.cs index 533767e9d3ed..bf1480bacf25 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeGroupCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeGroupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetAppVolumeGroupCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_VolumeGroupsCreateOracle() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/VolumeGroups_Create_Oracle.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/VolumeGroups_Create_Oracle.json // this example is just showing the usage of "VolumeGroups_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -378,7 +378,7 @@ public async Task CreateOrUpdate_VolumeGroupsCreateOracle() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_VolumeGroupsCreateSapHana() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/VolumeGroups_Create_SapHana.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/VolumeGroups_Create_SapHana.json // this example is just showing the usage of "VolumeGroups_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -554,7 +554,7 @@ public async Task CreateOrUpdate_VolumeGroupsCreateSapHana() [Ignore("Only validating compilation of examples")] public async Task Get_VolumeGroupsGetOracle() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/VolumeGroups_Get_Oracle.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/VolumeGroups_Get_Oracle.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -588,7 +588,7 @@ public async Task Get_VolumeGroupsGetOracle() [Ignore("Only validating compilation of examples")] public async Task Get_VolumeGroupsGetSapHana() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/VolumeGroups_Get_SapHana.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/VolumeGroups_Get_SapHana.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -622,7 +622,7 @@ public async Task Get_VolumeGroupsGetSapHana() [Ignore("Only validating compilation of examples")] public async Task Exists_VolumeGroupsGetOracle() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/VolumeGroups_Get_Oracle.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/VolumeGroups_Get_Oracle.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -652,7 +652,7 @@ public async Task Exists_VolumeGroupsGetOracle() [Ignore("Only validating compilation of examples")] public async Task Exists_VolumeGroupsGetSapHana() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/VolumeGroups_Get_SapHana.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/VolumeGroups_Get_SapHana.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -682,7 +682,7 @@ public async Task Exists_VolumeGroupsGetSapHana() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_VolumeGroupsGetOracle() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/VolumeGroups_Get_Oracle.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/VolumeGroups_Get_Oracle.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -724,7 +724,7 @@ public async Task GetIfExists_VolumeGroupsGetOracle() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_VolumeGroupsGetSapHana() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/VolumeGroups_Get_SapHana.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/VolumeGroups_Get_SapHana.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeGroupResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeGroupResource.cs index a7b45b158a9e..d94f6bfbfb22 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeGroupResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeGroupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetAppVolumeGroupResource [Ignore("Only validating compilation of examples")] public async Task Get_VolumeGroupsGetOracle() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/VolumeGroups_Get_Oracle.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/VolumeGroups_Get_Oracle.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_VolumeGroupsGetOracle() [Ignore("Only validating compilation of examples")] public async Task Get_VolumeGroupsGetSapHana() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/VolumeGroups_Get_SapHana.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/VolumeGroups_Get_SapHana.json // this example is just showing the usage of "VolumeGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Get_VolumeGroupsGetSapHana() [Ignore("Only validating compilation of examples")] public async Task Delete_VolumeGroupsDelete() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/VolumeGroups_Delete.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/VolumeGroups_Delete.json // this example is just showing the usage of "VolumeGroups_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -109,7 +109,7 @@ public async Task Delete_VolumeGroupsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_VolumeGroupsCreateOracle() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/VolumeGroups_Create_Oracle.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/VolumeGroups_Create_Oracle.json // this example is just showing the usage of "VolumeGroups_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -464,7 +464,7 @@ public async Task Update_VolumeGroupsCreateOracle() [Ignore("Only validating compilation of examples")] public async Task Update_VolumeGroupsCreateSapHana() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/VolumeGroups_Create_SapHana.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/VolumeGroups_Create_SapHana.json // this example is just showing the usage of "VolumeGroups_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeQuotaRuleCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeQuotaRuleCollection.cs index a305a09f5bdf..e83ac37d820e 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeQuotaRuleCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeQuotaRuleCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetAppVolumeQuotaRuleCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_VolumeQuotaRulesCreate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/VolumeQuotaRules_Create.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/VolumeQuotaRules_Create.json // this example is just showing the usage of "VolumeQuotaRules_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -63,7 +63,7 @@ public async Task CreateOrUpdate_VolumeQuotaRulesCreate() [Ignore("Only validating compilation of examples")] public async Task Get_VolumeQuotaRulesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/VolumeQuotaRules_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/VolumeQuotaRules_Get.json // this example is just showing the usage of "VolumeQuotaRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -99,7 +99,7 @@ public async Task Get_VolumeQuotaRulesGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_VolumeQuotaRulesList() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/VolumeQuotaRules_List.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/VolumeQuotaRules_List.json // this example is just showing the usage of "VolumeQuotaRules_ListByVolume" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -137,7 +137,7 @@ public async Task GetAll_VolumeQuotaRulesList() [Ignore("Only validating compilation of examples")] public async Task Exists_VolumeQuotaRulesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/VolumeQuotaRules_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/VolumeQuotaRules_Get.json // this example is just showing the usage of "VolumeQuotaRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,7 +169,7 @@ public async Task Exists_VolumeQuotaRulesGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_VolumeQuotaRulesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/VolumeQuotaRules_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/VolumeQuotaRules_Get.json // this example is just showing the usage of "VolumeQuotaRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeQuotaRuleResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeQuotaRuleResource.cs index afe6f009b703..16bff3364e92 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeQuotaRuleResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeQuotaRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetAppVolumeQuotaRuleResource [Ignore("Only validating compilation of examples")] public async Task Get_VolumeQuotaRulesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/VolumeQuotaRules_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/VolumeQuotaRules_Get.json // this example is just showing the usage of "VolumeQuotaRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_VolumeQuotaRulesGet() [Ignore("Only validating compilation of examples")] public async Task Delete_VolumeQuotaRulesDelete() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/VolumeQuotaRules_Delete.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/VolumeQuotaRules_Delete.json // this example is just showing the usage of "VolumeQuotaRules_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Delete_VolumeQuotaRulesDelete() [Ignore("Only validating compilation of examples")] public async Task Update_VolumeQuotaRulesUpdate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/VolumeQuotaRules_Update.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/VolumeQuotaRules_Update.json // this example is just showing the usage of "VolumeQuotaRules_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeResource.cs index 015ab0ce0242..a0e18e2b26b1 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeResource.cs @@ -17,11 +17,43 @@ namespace Azure.ResourceManager.NetApp.Samples { public partial class Sample_NetAppVolumeResource { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_VolumesExtralargeVolumeGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_ExtraLargeVolumes_Get.json + // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetAppVolumeResource created on azure + // for more information of creating NetAppVolumeResource, please refer to the document of NetAppVolumeResource + string subscriptionId = "D633CC2E-722B-4AE1-B636-BBD9E4C60ED9"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + ResourceIdentifier netAppVolumeResourceId = NetAppVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + NetAppVolumeResource netAppVolume = client.GetNetAppVolumeResource(netAppVolumeResourceId); + + // invoke the operation + NetAppVolumeResource result = await netAppVolume.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetAppVolumeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task Get_VolumesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_Get.json // this example is just showing the usage of "Volumes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +85,7 @@ public async Task Get_VolumesGet() [Ignore("Only validating compilation of examples")] public async Task Delete_VolumesDelete() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_Delete.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_Delete.json // this example is just showing the usage of "Volumes_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -81,7 +113,7 @@ public async Task Delete_VolumesDelete() [Ignore("Only validating compilation of examples")] public async Task Update_VolumesUpdate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_Update.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_Update.json // this example is just showing the usage of "Volumes_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -115,7 +147,7 @@ public async Task Update_VolumesUpdate() [Ignore("Only validating compilation of examples")] public async Task GetLatestStatusBackup_VolumesBackupStatus() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_LatestBackupStatus.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_LatestBackupStatus.json // this example is just showing the usage of "Backups_GetLatestStatus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -143,7 +175,7 @@ public async Task GetLatestStatusBackup_VolumesBackupStatus() [Ignore("Only validating compilation of examples")] public async Task GetVolumeLatestRestoreStatusBackup_VolumesRestoreStatus() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_LatestRestoreStatus.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_LatestRestoreStatus.json // this example is just showing the usage of "Backups_GetVolumeLatestRestoreStatus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -171,7 +203,7 @@ public async Task GetVolumeLatestRestoreStatusBackup_VolumesRestoreStatus() [Ignore("Only validating compilation of examples")] public async Task AuthorizeExternalReplication_VolumesAuthorizeExternalReplication() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_AuthorizeExternalReplication.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_AuthorizeExternalReplication.json // this example is just showing the usage of "Volumes_AuthorizeExternalReplication" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -200,7 +232,7 @@ public async Task AuthorizeExternalReplication_VolumesAuthorizeExternalReplicati [Ignore("Only validating compilation of examples")] public async Task AuthorizeReplication_VolumesAuthorizeReplication() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_AuthorizeReplication.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_AuthorizeReplication.json // this example is just showing the usage of "Volumes_AuthorizeReplication" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -232,7 +264,7 @@ public async Task AuthorizeReplication_VolumesAuthorizeReplication() [Ignore("Only validating compilation of examples")] public async Task BreakFileLocks_VolumesBreakFileLocks() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_BreakFileLocks.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_BreakFileLocks.json // this example is just showing the usage of "Volumes_BreakFileLocks" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -265,7 +297,7 @@ public async Task BreakFileLocks_VolumesBreakFileLocks() [Ignore("Only validating compilation of examples")] public async Task BreakReplication_VolumesBreakReplication() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_BreakReplication.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_BreakReplication.json // this example is just showing the usage of "Volumes_BreakReplication" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -297,7 +329,7 @@ public async Task BreakReplication_VolumesBreakReplication() [Ignore("Only validating compilation of examples")] public async Task DeleteReplication_VolumesDeleteReplication() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_DeleteReplication.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_DeleteReplication.json // this example is just showing the usage of "Volumes_DeleteReplication" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -325,7 +357,7 @@ public async Task DeleteReplication_VolumesDeleteReplication() [Ignore("Only validating compilation of examples")] public async Task FinalizeExternalReplication_VolumesFinalizeExternalReplication() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_FinalizeExternalReplication.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_FinalizeExternalReplication.json // this example is just showing the usage of "Volumes_FinalizeExternalReplication" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -353,7 +385,7 @@ public async Task FinalizeExternalReplication_VolumesFinalizeExternalReplication [Ignore("Only validating compilation of examples")] public async Task FinalizeRelocation_VolumesFinalizeRelocation() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_FinalizeRelocation.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_FinalizeRelocation.json // this example is just showing the usage of "Volumes_FinalizeRelocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -381,7 +413,7 @@ public async Task FinalizeRelocation_VolumesFinalizeRelocation() [Ignore("Only validating compilation of examples")] public async Task GetGetGroupIdListForLdapUser_GetGroupIdListForUser() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/GroupIdListForLDAPUser.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/GroupIdListForLDAPUser.json // this example is just showing the usage of "Volumes_ListGetGroupIdListForLdapUser" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -407,11 +439,40 @@ public async Task GetGetGroupIdListForLdapUser_GetGroupIdListForUser() Console.WriteLine($"Succeeded: {result}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetQuotaReport_ListQuotaReport() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_ListQuotaReport.json + // this example is just showing the usage of "Volumes_ListQuotaReport" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetAppVolumeResource created on azure + // for more information of creating NetAppVolumeResource, please refer to the document of NetAppVolumeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + ResourceIdentifier netAppVolumeResourceId = NetAppVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + NetAppVolumeResource netAppVolume = client.GetNetAppVolumeResource(netAppVolumeResourceId); + + // invoke the operation + ArmOperation lro = await netAppVolume.GetQuotaReportAsync(WaitUntil.Completed); + NetAppVolumeQuotaReportListResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task GetReplications_VolumesListReplications() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_ListReplications.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_ListReplications.json // this example is just showing the usage of "Volumes_ListReplications" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -446,7 +507,7 @@ public async Task GetReplications_VolumesListReplications() [Ignore("Only validating compilation of examples")] public async Task PeerExternalCluster_VolumesPeerExternalCluster() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_PeerExternalCluster.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_PeerExternalCluster.json // this example is just showing the usage of "Volumes_PeerExternalCluster" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -476,7 +537,7 @@ public async Task PeerExternalCluster_VolumesPeerExternalCluster() [Ignore("Only validating compilation of examples")] public async Task PerformReplicationTransfer_VolumesPerformReplicationTransfer() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_PerformReplicationTransfer.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_PerformReplicationTransfer.json // this example is just showing the usage of "Volumes_PerformReplicationTransfer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -504,7 +565,7 @@ public async Task PerformReplicationTransfer_VolumesPerformReplicationTransfer() [Ignore("Only validating compilation of examples")] public async Task PoolChange_VolumesAuthorizeReplication() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_PoolChange.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_PoolChange.json // this example is just showing the usage of "Volumes_PoolChange" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -533,7 +594,7 @@ public async Task PoolChange_VolumesAuthorizeReplication() [Ignore("Only validating compilation of examples")] public async Task PopulateAvailabilityZone_VolumesPopulateAvailabilityZones() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_PopulateAvailabilityZones.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_PopulateAvailabilityZones.json // this example is just showing the usage of "Volumes_PopulateAvailabilityZone" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -566,7 +627,7 @@ public async Task PopulateAvailabilityZone_VolumesPopulateAvailabilityZones() [Ignore("Only validating compilation of examples")] public async Task ReestablishReplication_VolumesReestablishReplication() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_ReestablishReplication.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_ReestablishReplication.json // this example is just showing the usage of "Volumes_ReestablishReplication" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -598,7 +659,7 @@ public async Task ReestablishReplication_VolumesReestablishReplication() [Ignore("Only validating compilation of examples")] public async Task ReInitializeReplication_VolumesReInitializeReplication() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_ReInitializeReplication.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_ReInitializeReplication.json // this example is just showing the usage of "Volumes_ReInitializeReplication" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -626,7 +687,7 @@ public async Task ReInitializeReplication_VolumesReInitializeReplication() [Ignore("Only validating compilation of examples")] public async Task Relocate_VolumesRelocate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_Relocate.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_Relocate.json // this example is just showing the usage of "Volumes_Relocate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -655,7 +716,7 @@ public async Task Relocate_VolumesRelocate() [Ignore("Only validating compilation of examples")] public async Task GetReplicationStatus_VolumesReplicationStatus() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_ReplicationStatus.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_ReplicationStatus.json // this example is just showing the usage of "Volumes_ReplicationStatus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -683,7 +744,7 @@ public async Task GetReplicationStatus_VolumesReplicationStatus() [Ignore("Only validating compilation of examples")] public async Task ResetCifsPassword_VolumesResetCifsPassword() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_ResetCifsPassword.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_ResetCifsPassword.json // this example is just showing the usage of "Volumes_ResetCifsPassword" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -711,7 +772,7 @@ public async Task ResetCifsPassword_VolumesResetCifsPassword() [Ignore("Only validating compilation of examples")] public async Task ResyncReplication_VolumesResyncReplication() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_ResyncReplication.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_ResyncReplication.json // this example is just showing the usage of "Volumes_ResyncReplication" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -739,7 +800,7 @@ public async Task ResyncReplication_VolumesResyncReplication() [Ignore("Only validating compilation of examples")] public async Task Revert_VolumesRevert() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_Revert.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_Revert.json // this example is just showing the usage of "Volumes_Revert" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -771,7 +832,7 @@ public async Task Revert_VolumesRevert() [Ignore("Only validating compilation of examples")] public async Task RevertRelocation_VolumesRevertRelocation() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_RevertRelocation.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_RevertRelocation.json // this example is just showing the usage of "Volumes_RevertRelocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -799,7 +860,7 @@ public async Task RevertRelocation_VolumesRevertRelocation() [Ignore("Only validating compilation of examples")] public async Task SplitCloneFromParent_VolumesSplitClone() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Volumes_SplitClone.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Volumes_SplitClone.json // this example is just showing the usage of "Volumes_SplitCloneFromParent" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -832,7 +893,7 @@ public async Task SplitCloneFromParent_VolumesSplitClone() [Ignore("Only validating compilation of examples")] public async Task MigrateBackupsBackupsUnderVolume_BackupsUnderVolumeMigrate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/BackupsUnderVolume_Migrate.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/BackupsUnderVolume_Migrate.json // this example is just showing the usage of "BackupsUnderVolume_MigrateBackups" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeSnapshotCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeSnapshotCollection.cs index e27fa99bcacf..d498155dcdad 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeSnapshotCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeSnapshotCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_NetAppVolumeSnapshotCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_SnapshotsCreate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Snapshots_Create.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Snapshots_Create.json // this example is just showing the usage of "Snapshots_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task CreateOrUpdate_SnapshotsCreate() [Ignore("Only validating compilation of examples")] public async Task Get_SnapshotsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Snapshots_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Snapshots_Get.json // this example is just showing the usage of "Snapshots_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_SnapshotsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_SnapshotsList() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Snapshots_List.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Snapshots_List.json // this example is just showing the usage of "Snapshots_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,7 +131,7 @@ public async Task GetAll_SnapshotsList() [Ignore("Only validating compilation of examples")] public async Task Exists_SnapshotsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Snapshots_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Snapshots_Get.json // this example is just showing the usage of "Snapshots_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task Exists_SnapshotsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_SnapshotsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Snapshots_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Snapshots_Get.json // this example is just showing the usage of "Snapshots_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeSnapshotResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeSnapshotResource.cs index 9acffdf7c7f2..dee694192003 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeSnapshotResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_NetAppVolumeSnapshotResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetAppVolumeSnapshotResource [Ignore("Only validating compilation of examples")] public async Task Get_SnapshotsGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Snapshots_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Snapshots_Get.json // this example is just showing the usage of "Snapshots_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_SnapshotsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_SnapshotsDelete() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Snapshots_Delete.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Snapshots_Delete.json // this example is just showing the usage of "Snapshots_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Delete_SnapshotsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_SnapshotsCreate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Snapshots_Create.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Snapshots_Create.json // this example is just showing the usage of "Snapshots_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -117,7 +117,7 @@ public async Task Update_SnapshotsCreate() [Ignore("Only validating compilation of examples")] public async Task RestoreFiles_SnapshotsSingleFileRestore() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Snapshots_SingleFileRestore.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Snapshots_SingleFileRestore.json // this example is just showing the usage of "Snapshots_RestoreFiles" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_RansomwareReportCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_RansomwareReportCollection.cs new file mode 100644 index 000000000000..5e933c096b4b --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_RansomwareReportCollection.cs @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.NetApp.Samples +{ + public partial class Sample_RansomwareReportCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_RansomwareReportsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/RansomwareReports_Get.json + // this example is just showing the usage of "RansomwareReports_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetAppVolumeResource created on azure + // for more information of creating NetAppVolumeResource, please refer to the document of NetAppVolumeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + ResourceIdentifier netAppVolumeResourceId = NetAppVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + NetAppVolumeResource netAppVolume = client.GetNetAppVolumeResource(netAppVolumeResourceId); + + // get the collection of this RansomwareReportResource + RansomwareReportCollection collection = netAppVolume.GetRansomwareReports(); + + // invoke the operation + string ransomwareReportName = "ransomwareReport1"; + RansomwareReportResource result = await collection.GetAsync(ransomwareReportName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RansomwareReportData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_RansomwareReportsList() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/RansomwareReports_List.json + // this example is just showing the usage of "RansomwareReports_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetAppVolumeResource created on azure + // for more information of creating NetAppVolumeResource, please refer to the document of NetAppVolumeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + ResourceIdentifier netAppVolumeResourceId = NetAppVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + NetAppVolumeResource netAppVolume = client.GetNetAppVolumeResource(netAppVolumeResourceId); + + // get the collection of this RansomwareReportResource + RansomwareReportCollection collection = netAppVolume.GetRansomwareReports(); + + // invoke the operation and iterate over the result + await foreach (RansomwareReportResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RansomwareReportData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_RansomwareReportsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/RansomwareReports_Get.json + // this example is just showing the usage of "RansomwareReports_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetAppVolumeResource created on azure + // for more information of creating NetAppVolumeResource, please refer to the document of NetAppVolumeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + ResourceIdentifier netAppVolumeResourceId = NetAppVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + NetAppVolumeResource netAppVolume = client.GetNetAppVolumeResource(netAppVolumeResourceId); + + // get the collection of this RansomwareReportResource + RansomwareReportCollection collection = netAppVolume.GetRansomwareReports(); + + // invoke the operation + string ransomwareReportName = "ransomwareReport1"; + bool result = await collection.ExistsAsync(ransomwareReportName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_RansomwareReportsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/RansomwareReports_Get.json + // this example is just showing the usage of "RansomwareReports_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetAppVolumeResource created on azure + // for more information of creating NetAppVolumeResource, please refer to the document of NetAppVolumeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + ResourceIdentifier netAppVolumeResourceId = NetAppVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName); + NetAppVolumeResource netAppVolume = client.GetNetAppVolumeResource(netAppVolumeResourceId); + + // get the collection of this RansomwareReportResource + RansomwareReportCollection collection = netAppVolume.GetRansomwareReports(); + + // invoke the operation + string ransomwareReportName = "ransomwareReport1"; + NullableResponse response = await collection.GetIfExistsAsync(ransomwareReportName); + RansomwareReportResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RansomwareReportData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_RansomwareReportResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_RansomwareReportResource.cs new file mode 100644 index 000000000000..53bbecf20a0c --- /dev/null +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_RansomwareReportResource.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.NetApp.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.NetApp.Samples +{ + public partial class Sample_RansomwareReportResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_RansomwareReportsGet() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/RansomwareReports_Get.json + // this example is just showing the usage of "RansomwareReports_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this RansomwareReportResource created on azure + // for more information of creating RansomwareReportResource, please refer to the document of RansomwareReportResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + string ransomwareReportName = "ransomwareReport1"; + ResourceIdentifier ransomwareReportResourceId = RansomwareReportResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName, ransomwareReportName); + RansomwareReportResource ransomwareReport = client.GetRansomwareReportResource(ransomwareReportResourceId); + + // invoke the operation + RansomwareReportResource result = await ransomwareReport.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RansomwareReportData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task ClearSuspects_RansomwareReportsClearSuspects() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/RansomwareReports_ClearSuspects.json + // this example is just showing the usage of "RansomwareReports_ClearSuspects" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this RansomwareReportResource created on azure + // for more information of creating RansomwareReportResource, please refer to the document of RansomwareReportResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myRG"; + string accountName = "account1"; + string poolName = "pool1"; + string volumeName = "volume1"; + string ransomwareReportName = "ransomwareReport1"; + ResourceIdentifier ransomwareReportResourceId = RansomwareReportResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, poolName, volumeName, ransomwareReportName); + RansomwareReportResource ransomwareReport = client.GetRansomwareReportResource(ransomwareReportResourceId); + + // invoke the operation + RansomwareSuspectsClearContent content = new RansomwareSuspectsClearContent(RansomwareSuspectResolution.PotentialThreat, new string[] { ".threat" }); + await ransomwareReport.ClearSuspectsAsync(WaitUntil.Completed, content); + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_RegionInfoResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_RegionInfoResource.cs index 264364cca1e0..716d23aa4854 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_RegionInfoResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_RegionInfoResource.cs @@ -19,7 +19,7 @@ public partial class Sample_RegionInfoResource [Ignore("Only validating compilation of examples")] public async Task Get_RegionInfosGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/RegionInfos_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/RegionInfos_Get.json // this example is just showing the usage of "NetAppResourceRegionInfos_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_RegionInfoResourceCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_RegionInfoResourceCollection.cs index dd7671752403..0f854657207b 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_RegionInfoResourceCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_RegionInfoResourceCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_RegionInfoResourceCollection [Ignore("Only validating compilation of examples")] public async Task Get_RegionInfosGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/RegionInfos_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/RegionInfos_Get.json // this example is just showing the usage of "NetAppResourceRegionInfos_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_RegionInfosGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_RegionInfosList() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/RegionInfos_List.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/RegionInfos_List.json // this example is just showing the usage of "NetAppResourceRegionInfos_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -87,7 +87,7 @@ public async Task GetAll_RegionInfosList() [Ignore("Only validating compilation of examples")] public async Task Exists_RegionInfosGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/RegionInfos_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/RegionInfos_Get.json // this example is just showing the usage of "NetAppResourceRegionInfos_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -115,7 +115,7 @@ public async Task Exists_RegionInfosGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RegionInfosGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/RegionInfos_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/RegionInfos_Get.json // this example is just showing the usage of "NetAppResourceRegionInfos_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_SnapshotPolicyCollection.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_SnapshotPolicyCollection.cs index 53d90cf4099e..2b94edc77ec2 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_SnapshotPolicyCollection.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_SnapshotPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SnapshotPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_SnapshotPoliciesCreate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/SnapshotPolicies_Create.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/SnapshotPolicies_Create.json // this example is just showing the usage of "SnapshotPolicies_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task CreateOrUpdate_SnapshotPoliciesCreate() [Ignore("Only validating compilation of examples")] public async Task Get_SnapshotPoliciesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/SnapshotPolicies_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/SnapshotPolicies_Get.json // this example is just showing the usage of "SnapshotPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Get_SnapshotPoliciesGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_SnapshotPoliciesList() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/SnapshotPolicies_List.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/SnapshotPolicies_List.json // this example is just showing the usage of "SnapshotPolicies_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -154,7 +154,7 @@ public async Task GetAll_SnapshotPoliciesList() [Ignore("Only validating compilation of examples")] public async Task Exists_SnapshotPoliciesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/SnapshotPolicies_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/SnapshotPolicies_Get.json // this example is just showing the usage of "SnapshotPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -184,7 +184,7 @@ public async Task Exists_SnapshotPoliciesGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_SnapshotPoliciesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/SnapshotPolicies_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/SnapshotPolicies_Get.json // this example is just showing the usage of "SnapshotPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_SnapshotPolicyResource.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_SnapshotPolicyResource.cs index 013055471b04..0866be399592 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_SnapshotPolicyResource.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_SnapshotPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SnapshotPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_SnapshotPoliciesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/SnapshotPolicies_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/SnapshotPolicies_Get.json // this example is just showing the usage of "SnapshotPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_SnapshotPoliciesGet() [Ignore("Only validating compilation of examples")] public async Task Delete_SnapshotPoliciesDelete() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/SnapshotPolicies_Delete.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/SnapshotPolicies_Delete.json // this example is just showing the usage of "SnapshotPolicies_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_SnapshotPoliciesDelete() [Ignore("Only validating compilation of examples")] public async Task Update_SnapshotPoliciesUpdate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/SnapshotPolicies_Update.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/SnapshotPolicies_Update.json // this example is just showing the usage of "SnapshotPolicies_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -139,7 +139,7 @@ public async Task Update_SnapshotPoliciesUpdate() [Ignore("Only validating compilation of examples")] public async Task GetVolumes_SnapshotPoliciesListVolumes() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/SnapshotPolicies_ListVolumes.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/SnapshotPolicies_ListVolumes.json // this example is just showing the usage of "SnapshotPolicies_ListVolumes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 35e371bda610..f18a2e748ff3 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -17,11 +17,73 @@ namespace Azure.ResourceManager.NetApp.Samples { public partial class Sample_SubscriptionResourceExtensions { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetActiveDirectoryConfigs_ActiveDirectoryConfigsListBySubscription() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ActiveDirectoryConfigs_ListBySubscription.json + // this example is just showing the usage of "ActiveDirectoryConfigs_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (ActiveDirectoryConfigResource item in subscriptionResource.GetActiveDirectoryConfigsAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ActiveDirectoryConfigData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetElasticAccounts_ElasticAccountsListBySubscription() + { + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/ElasticAccounts_ListBySubscription.json + // this example is just showing the usage of "ElasticAccounts_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (ElasticAccountResource item in subscriptionResource.GetElasticAccountsAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ElasticAccountData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task CheckNetAppFilePathAvailability_CheckFilePathAvailability() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/CheckFilePathAvailability.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/CheckFilePathAvailability.json // this example is just showing the usage of "NetAppResource_CheckFilePathAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -37,7 +99,7 @@ public async Task CheckNetAppFilePathAvailability_CheckFilePathAvailability() // invoke the operation AzureLocation location = new AzureLocation("eastus"); - NetAppFilePathAvailabilityContent content = new NetAppFilePathAvailabilityContent("my-exact-filepth", new ResourceIdentifier("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")); + NetAppFilePathAvailabilityContent content = new NetAppFilePathAvailabilityContent("my-exact-filepth", new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testvnet3/subnets/testsubnet3")); NetAppCheckAvailabilityResult result = await subscriptionResource.CheckNetAppFilePathAvailabilityAsync(location, content); Console.WriteLine($"Succeeded: {result}"); @@ -47,7 +109,7 @@ public async Task CheckNetAppFilePathAvailability_CheckFilePathAvailability() [Ignore("Only validating compilation of examples")] public async Task CheckNetAppNameAvailability_CheckNameAvailability() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/CheckNameAvailability.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/CheckNameAvailability.json // this example is just showing the usage of "NetAppResource_CheckNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -73,7 +135,7 @@ public async Task CheckNetAppNameAvailability_CheckNameAvailability() [Ignore("Only validating compilation of examples")] public async Task CheckNetAppQuotaAvailability_CheckQuotaAvailability() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/CheckQuotaAvailability.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/CheckQuotaAvailability.json // this example is just showing the usage of "NetAppResource_CheckQuotaAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -99,7 +161,7 @@ public async Task CheckNetAppQuotaAvailability_CheckQuotaAvailability() [Ignore("Only validating compilation of examples")] public async Task QueryNetworkSiblingSetNetAppResource_NetworkSiblingSetQuery() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/NetworkSiblingSet_Query.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/NetworkSiblingSet_Query.json // this example is just showing the usage of "NetAppResource_QueryNetworkSiblingSet" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -115,7 +177,7 @@ public async Task QueryNetworkSiblingSetNetAppResource_NetworkSiblingSetQuery() // invoke the operation AzureLocation location = new AzureLocation("eastus"); - QueryNetworkSiblingSetContent content = new QueryNetworkSiblingSetContent("9760acf5-4638-11e7-9bdb-020073ca3333", new ResourceIdentifier("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet")); + QueryNetworkSiblingSetContent content = new QueryNetworkSiblingSetContent("9760acf5-4638-11e7-9bdb-020073ca3333", new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet")); NetworkSiblingSet result = await subscriptionResource.QueryNetworkSiblingSetNetAppResourceAsync(location, content); Console.WriteLine($"Succeeded: {result}"); @@ -125,7 +187,7 @@ public async Task QueryNetworkSiblingSetNetAppResource_NetworkSiblingSetQuery() [Ignore("Only validating compilation of examples")] public async Task QueryRegionInfoNetAppResource_RegionInfoQuery() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/RegionInfo.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/RegionInfo.json // this example is just showing the usage of "NetAppResource_QueryRegionInfo" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -150,7 +212,7 @@ public async Task QueryRegionInfoNetAppResource_RegionInfoQuery() [Ignore("Only validating compilation of examples")] public async Task UpdateNetworkSiblingSetNetAppResource_NetworkFeaturesUpdate() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/NetworkSiblingSet_Update.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/NetworkSiblingSet_Update.json // this example is just showing the usage of "NetAppResource_UpdateNetworkSiblingSet" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +228,7 @@ public async Task UpdateNetworkSiblingSetNetAppResource_NetworkFeaturesUpdate() // invoke the operation AzureLocation location = new AzureLocation("eastus"); - UpdateNetworkSiblingSetContent content = new UpdateNetworkSiblingSetContent("9760acf5-4638-11e7-9bdb-020073ca3333", new ResourceIdentifier("/subscriptions/9760acf5-4638-11e7-9bdb-020073ca7778/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet"), "12345_44420.8001578125", NetAppNetworkFeature.Standard); + UpdateNetworkSiblingSetContent content = new UpdateNetworkSiblingSetContent("9760acf5-4638-11e7-9bdb-020073ca3333", new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRP/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/testSubnet"), "12345_44420.8001578125", NetAppNetworkFeature.Standard); ArmOperation lro = await subscriptionResource.UpdateNetworkSiblingSetNetAppResourceAsync(WaitUntil.Completed, location, content); NetworkSiblingSet result = lro.Value; @@ -177,7 +239,7 @@ public async Task UpdateNetworkSiblingSetNetAppResource_NetworkFeaturesUpdate() [Ignore("Only validating compilation of examples")] public async Task GetNetAppQuotaLimits_QuotaLimits() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/NetAppResourceQuotaLimits_List.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/NetAppResourceQuotaLimits_List.json // this example is just showing the usage of "NetAppResourceQuotaLimits_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -205,7 +267,7 @@ public async Task GetNetAppQuotaLimits_QuotaLimits() [Ignore("Only validating compilation of examples")] public async Task GetNetAppQuotaLimit_QuotaLimits() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/NetAppResourceQuotaLimits_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/NetAppResourceQuotaLimits_Get.json // this example is just showing the usage of "NetAppResourceQuotaLimits_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -231,7 +293,7 @@ public async Task GetNetAppQuotaLimit_QuotaLimits() [Ignore("Only validating compilation of examples")] public async Task GetNetAppResourceUsages_UsagesList() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Usages_List.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Usages_List.json // this example is just showing the usage of "NetAppResourceUsages_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -259,7 +321,7 @@ public async Task GetNetAppResourceUsages_UsagesList() [Ignore("Only validating compilation of examples")] public async Task GetNetAppResourceUsage_UsagesGet() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Usages_Get.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Usages_Get.json // this example is just showing the usage of "NetAppResourceUsages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -285,7 +347,7 @@ public async Task GetNetAppResourceUsage_UsagesGet() [Ignore("Only validating compilation of examples")] public async Task GetNetAppAccounts_AccountsListBySubscription() { - // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/stable/2025-09-01/examples/Accounts_ListBySubscription.json + // Generated from example definition: specification/netapp/resource-manager/Microsoft.NetApp/NetApp/preview/2025-09-01-preview/examples/Accounts_ListBySubscription.json // this example is just showing the usage of "Accounts_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/tests/ResourceTests/ANFBucketTests.cs b/sdk/netapp/Azure.ResourceManager.NetApp/tests/ResourceTests/ANFBucketTests.cs index a88755032162..b4c7ecf634e2 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/tests/ResourceTests/ANFBucketTests.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/tests/ResourceTests/ANFBucketTests.cs @@ -1,378 +1,377 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// using System; -// using System.Collections.Generic; -// using System.Linq; -// using System.Security.Cryptography; -// using System.Security.Cryptography.X509Certificates; - -// using System.Text; -// using System.Threading.Tasks; -// using Azure.Core; -// using Azure.Core.TestFramework; -// using Azure.ResourceManager.NetApp.Models; -// using Azure.ResourceManager.NetApp.Tests.Helpers; -// using Azure.ResourceManager.Resources; -// using FluentAssertions; -// using NUnit.Framework; - -// namespace Azure.ResourceManager.NetApp.Tests -// { -// public class ANFBucketTests : NetAppTestBase -// { -// private string _pool1Name = "pool1"; -// private NetAppAccountCollection _netAppAccountCollection { get => _resourceGroup.GetNetAppAccounts(); } -// internal NetAppBucketCollection _bucketCollection; -// internal NetAppVolumeResource _volumeResource; -// internal string _selfSignedCertificate; - -// //private NetAppBucketCollection _netAppBucketCollection { get => _resourceGroup.GetNetAppBuckets(); } -// public ANFBucketTests(bool isAsync) : base(isAsync) -// { -// } - -// [SetUp] -// public async Task SetUp() -// { -// Console.WriteLine("ANFBucketTests Setup"); -// string volumeName = Recording.GenerateAssetName("volumeName-"); -// _resourceGroup = await CreateResourceGroupAsync(); -// string accountName = await CreateValidAccountNameAsync(_accountNamePrefix, _resourceGroup, DefaultLocation); -// _selfSignedCertificate = CreateSelfSignedCertificate(); -// _netAppAccount = (await _netAppAccountCollection.CreateOrUpdateAsync(WaitUntil.Completed, accountName, GetDefaultNetAppAccountParameters())).Value; - -// CapacityPoolData capactiyPoolData = new(DefaultLocation, _poolSize.Value, NetAppFileServiceLevel.Premium); -// capactiyPoolData.Tags.InitializeFrom(DefaultTags); -// _capacityPool = (await _capacityPoolCollection.CreateOrUpdateAsync(WaitUntil.Completed, _pool1Name, capactiyPoolData)).Value; - -// _volumeCollection = _capacityPool.GetNetAppVolumes(); - -// await CreateVirtualNetwork(); -// _volumeResource = await CreateVolume(DefaultLocation, NetAppFileServiceLevel.Premium, _defaultUsageThreshold, subnetId: DefaultSubnetId, volumeName: volumeName); -// Console.WriteLine("VolumeTEST Setup create vnet"); -// _bucketCollection = _volumeResource.GetNetAppBuckets(); -// Console.WriteLine("ANFBucketTests Setup complete"); -// } - -// [TearDown] -// public async Task ClearBuckets() -// { -// //remove all buckets under current netAppAccount and remove netAppAccount -// if (_resourceGroup != null) -// { -// await foreach (NetAppBucketResource bucket in _bucketCollection.GetAllAsync()) -// { -// // invoke the operation -// await bucket.DeleteAsync(WaitUntil.Completed); -// } -// //remove volumes -// await foreach (NetAppVolumeResource volume in _volumeCollection.GetAllAsync()) -// { -// // invoke the operation -// await volume.DeleteAsync(WaitUntil.Completed); -// } -// //remove capacityPools -// await LiveDelay(40000); -// await foreach (CapacityPoolResource capacityPool in _capacityPoolCollection.GetAllAsync()) -// { -// // invoke the operation -// await capacityPool.DeleteAsync(WaitUntil.Completed); -// } -// //remove account -// await LiveDelay(40000); -// await _netAppAccount.DeleteAsync(WaitUntil.Completed); -// } -// _resourceGroup = null; -// } - -// [RecordedTest] -// public async Task CreateGetDeleteBucket() -// { -// //create snapshot -// var bucketName = Recording.GenerateAssetName("bucket-"); -// //await SetUp(); - -// NetAppBucketData data = new NetAppBucketData -// { -// Path = "/", -// FileSystemUser = new NetAppBucketFileSystemUser -// { -// NfsUser = new NetAppBucketNfsUser -// { -// UserId = 1001L, -// GroupId = 1000L, -// }, -// }, -// Server = new NetAppBucketServerProperties -// { -// Fqdn = "www.acme.com", -// CertificateObject = _selfSignedCertificate, -// }, -// Permissions = NetAppBucketPermission.ReadOnly, -// }; -// ArmOperation lro = await _bucketCollection.CreateOrUpdateAsync(WaitUntil.Completed, bucketName, data); -// NetAppBucketResource result = lro.Value; - -// // the variable result is a resource -// Assert.IsNotNull(result.Data); -// Assert.AreEqual($"{_volumeResource.Data.Name}/{bucketName}", result.Data.Name); -// Console.WriteLine($"Create Succeeded on id: {result.Data.Id}"); - -// // get the created resource -// NetAppBucketResource netAppBucket = Client.GetNetAppBucketResource(result.Data.Id); -// // invoke the operation -// NetAppBucketResource bucketResult = await netAppBucket.GetAsync(); -// string bucketResourceName = bucketResult.Data.Name; - -// Assert.IsNotNull(bucketResult.Data); -// Assert.AreEqual($"{_volumeResource.Data.Name}/{bucketName}", bucketResult.Data.Name); -// Console.WriteLine($"GET Succeeded on id: {bucketResult.Data.Id}"); - -// // invoke the delete operation -// await netAppBucket.DeleteAsync(WaitUntil.Completed); -// Console.WriteLine($"Delete Succeeded on id: {bucketResult.Data.Id}"); - -// Console.WriteLine($"Check if exists: {bucketResourceName}"); -// //check if the bucket exists -// await LiveDelay(30000); -// bool existsResult = await _bucketCollection.ExistsAsync(bucketName); -// existsResult.Should().BeFalse(); -// Console.WriteLine($"Succeeded: {existsResult}"); -// } - -// [RecordedTest] -// public async Task ListBuckets() -// { -// //create bucket -// var bucketName = Recording.GenerateAssetName("bucket-"); -// var bucket2Name = Recording.GenerateAssetName("bucket-2"); -// await SetUp(); - -// NetAppBucketData data = new NetAppBucketData -// { -// Path = "/", -// FileSystemUser = new NetAppBucketFileSystemUser -// { -// NfsUser = new NetAppBucketNfsUser -// { -// UserId = 1001L, -// GroupId = 1000L, -// }, -// }, -// Server = new NetAppBucketServerProperties -// { -// Fqdn = "www.acme.com", -// CertificateObject = _selfSignedCertificate, -// }, -// Permissions = NetAppBucketPermission.ReadOnly, -// }; - -// NetAppBucketData data2 = new NetAppBucketData -// { -// Path = "/", -// FileSystemUser = new NetAppBucketFileSystemUser -// { -// NfsUser = new NetAppBucketNfsUser -// { -// UserId = 1001L, -// GroupId = 1000L, -// }, -// }, -// Server = new NetAppBucketServerProperties -// { -// Fqdn = "www.acme.com", -// CertificateObject = _selfSignedCertificate, -// }, -// Permissions = NetAppBucketPermission.ReadOnly, -// }; -// ArmOperation lro = await _bucketCollection.CreateOrUpdateAsync(WaitUntil.Completed, bucketName, data); -// NetAppBucketResource result = lro.Value; - -// ArmOperation lro2 = await _bucketCollection.CreateOrUpdateAsync(WaitUntil.Completed, bucket2Name, data2); -// NetAppBucketResource result2 = lro2.Value; - -// // Define a list to store results -// List buckets = []; -// // invoke the List operation and iterate over the result -// await foreach (NetAppBucketResource item in _bucketCollection.GetAllAsync()) -// { -// buckets.Add(item); -// // for demo we just print out the id -// Console.WriteLine($"Succeeded on id: {item.Id}"); -// } -// Assert.GreaterOrEqual(buckets.Count, 2); -// Assert.IsTrue(buckets.Any(r => r.Data.Name.Split('/').Last() == bucketName)); -// Assert.IsTrue(buckets.Any(r => r.Data.Name.Split('/').Last() == bucket2Name)); -// } - -// [RecordedTest] -// public async Task PatchBucket() -// { -// //create snapshot -// var bucketName = Recording.GenerateAssetName("bucket-"); -// await SetUp(); - -// NetAppBucketData data = new NetAppBucketData -// { -// Path = "/", -// FileSystemUser = new NetAppBucketFileSystemUser -// { -// NfsUser = new NetAppBucketNfsUser -// { -// UserId = 1001L, -// GroupId = 1000L, -// }, -// }, -// Server = new NetAppBucketServerProperties -// { -// Fqdn = "www.acme.com", -// CertificateObject = _selfSignedCertificate, -// }, -// Permissions = NetAppBucketPermission.ReadOnly, -// }; -// ArmOperation lro = await _bucketCollection.CreateOrUpdateAsync(WaitUntil.Completed, bucketName, data); -// NetAppBucketResource result = lro.Value; - -// // the variable result is a resource -// Assert.IsNotNull(result.Data); -// Assert.AreEqual(bucketName, result.Data.Name.Split('/').Last()); -// Console.WriteLine($"Create Succeeded on id: {result.Data.Id}"); - -// // get the created resource -// NetAppBucketResource netAppBucket = Client.GetNetAppBucketResource(result.Data.Id); -// // invoke the operation -// NetAppBucketResource bucketResult = await netAppBucket.GetAsync(); -// Assert.IsNotNull(bucketResult.Data); -// Assert.AreEqual(bucketName, bucketResult.Data.Name.Split('/').Last()); -// Console.WriteLine($"GET Succeeded on id: {bucketResult.Data.Id}"); - -// // invoke the operation -// NetAppBucketPatch patch = new NetAppBucketPatch -// { -// Permissions = NetAppBucketPatchPermission.ReadWrite -// }; -// ArmOperation lroUpdate = await netAppBucket.UpdateAsync(WaitUntil.Completed, patch); -// NetAppBucketResource updateResult = lroUpdate.Value; -// Assert.IsNotNull(updateResult.Data); -// await LiveDelay(30000); -// NetAppBucketResource updateResultData = await netAppBucket.GetAsync(); - -// updateResultData.Id.Should().Be(bucketResult.Data.Id); -// updateResult.Data.Name.Should().Be(bucketResult.Data.Name); -// updateResult.Data.ProvisioningState.Should().Be(NetAppProvisioningState.Succeeded); -// //updateResultData.Data.Permissions.Should().Be(NetAppBucketPatchPermission.ReadWrite); -// } - -// [RecordedTest] -// public async Task GenerateCredentialsForBucket() -// { -// //create snapshot -// var bucketName = Recording.GenerateAssetName("bucket-"); -// await SetUp(); - -// NetAppBucketData data = new NetAppBucketData -// { -// Path = "/", -// FileSystemUser = new NetAppBucketFileSystemUser -// { -// NfsUser = new NetAppBucketNfsUser -// { -// UserId = 1001L, -// GroupId = 1000L, -// }, -// }, -// Server = new NetAppBucketServerProperties -// { -// Fqdn = "www.acme.com", -// CertificateObject = _selfSignedCertificate, -// }, -// Permissions = NetAppBucketPermission.ReadOnly, -// }; -// ArmOperation lro = await _bucketCollection.CreateOrUpdateAsync(WaitUntil.Completed, bucketName, data); -// NetAppBucketResource result = lro.Value; - -// // the variable result is a resource -// Assert.IsNotNull(result.Data); -// Assert.AreEqual(bucketName, result.Data.Name.Split('/').Last()); -// Console.WriteLine($"Create Succeeded on id: {result.Data.Id}"); - -// // get the created resource -// NetAppBucketResource netAppBucket = Client.GetNetAppBucketResource(result.Data.Id); -// NetAppBucketResource resultData = await netAppBucket.GetAsync(); -// Assert.IsNotNull(resultData.Data); -// Assert.AreEqual(bucketName, resultData.Data.Name.Split('/').Last()); -// Console.WriteLine($"GET Succeeded on id: {resultData.Data.Id}"); - -// // invoke the operation -// NetAppBucketCredentialsExpiry body = new NetAppBucketCredentialsExpiry -// { -// KeyPairExpiryDays = 3, -// }; -// NetAppBucketGenerateCredentials GenerateCredentialsResult = await netAppBucket.GenerateCredentialsAsync(body); - -// NetAppBucketGenerateCredentials credentials = GenerateCredentialsResult; -// credentials.Should().NotBeNull(); -// credentials.AccessKey.Should().NotBeNullOrEmpty(); -// credentials.SecretKey.Should().NotBeNullOrEmpty(); -// } - -// private string CreateSelfSignedCertificate(string subjectName = "CN=TestCertificate", int validityPeriodInYears = 1) -// { -// return @"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZEekNDQXZlZ0F3SUJBZ0lVTTF2bUZFNHZNU1k4MUFDaTBMNVBqbFlmWXgwd0RRWUpLb1pJaHZjTkFRRUwKQlFBd0Z6RVZNQk1HQTFVRUF3d01kM2QzTG1GamJXVXVZMjl0TUI0WERUSTFNRFl4TWpFMU5ESTBObG9YRFRJMgpNRFl4TWpFMU5ESTBObG93RnpFVk1CTUdBMVVFQXd3TWQzZDNMbUZqYldVdVkyOXRNSUlDSWpBTkJna3Foa2lHCjl3MEJBUUVGQUFPQ0FnOEFNSUlDQ2dLQ0FnRUFzanQ1ZHdvWkx0YWpWT2VtTWtBSFVyMys3U0llVFBORzJvVU4KbERBVXRHRVRzOUgwY2VMMGhzZlA4bmxHbUNEZzFiM3NjcjdHekpTMmEyMm9FR0g3VVFhbmhNeFBhdGVrd2FJRwovSmh1VjVWMURkZjdLa1dibUFwQVNDUWZPMTNUOFlXTDY0UnZaQ3F1K0VMMi9WeWRmSEx4ejNXNXBNMHB2K3JhClFLK0lXVDJQTzZYRjBqNTlQcE9wV1l1bGVSQXpjOE9HVDNEUmtEY25oU2ZIRWQ5bG1jWGhhSHVnc1JualFUVWYKdmpDZHVHZEFtcHFheEx4cERReWtGbmI1VlpsNUFNN3lNTW9mUkVVVEo0a1FVUVlWdjliQ1p5V2s1MTNqR0pvTQpZZEs3d2xQRTNtaTZObEtuV0REYkhmU1FUdzhtUjFiaTBodnNnd3o2Vm80SWI2YTFHTFdZT3lJcHI1V2o0MVRJCm9aWXA2UDdDVDY3Unhud2s1aWY2ejU1R1hxTDhHQkNhR0IxNHoxcUtZR0x4QkZ1S2MzYjBCbEYreUE0TDRRRlEKVkJsRThSR3FvMWlOeDdJeEQydk9xQzc5TnlJdXNCYThMbFovdExjQUp4V1VEOTVQVFlhbnpVZHBVZ3BIODkvVQpYc2lBdUVDb2NIYUNwNkxhdFU3SCtRQXQ3bTh6NEtTTHpnWk5tR0dwK24vWlhGYjB0c3gzRkxkUjZXMk9FRmFtClpXdHN6QkY0NjVBa0wwcVhxMEZOZzFwekNsUitwalNTOGhHWGRDS3NIWldMakFmNU5CUE5PVDJRTW1zL1dFZVYKMUwrOGIrTDBlVGZXV3dJa0lLV1dkT0ZmRUxFbmFqYVBuZXJzSlRoZTRIT1dJMGtlRDJmaG1YTVQ3Ynp6ZGZKTgpKcWxHWjlrQ0F3RUFBYU5UTUZFd0hRWURWUjBPQkJZRUZOa3A5a05ISzZmaEtKNnRaK2kzUlpCWmxoTUFNQjhHCkExVWRJd1FZTUJhQUZOa3A5a05ISzZmaEtKNnRaK2kzUlpCWmxoTUFNQThHQTFVZEV3RUIvd1FGTUFNQkFmOHcKRFFZSktvWklodmNOQVFFTEJRQURnZ0lCQUZFSGUxRHFpNXNRS0wvSmR2MTNIcEhyVkNoR0x6dGtxTHFwT0MyVgpyMWJUSzVUSWJCbW5CcEdQS3poQkU3bVF5MlFlWkZkT2c3RTRGblRVNzQ4eEtsWE04WkwrOFNWbDFLdlZaRkxjCkV0QWpqLzIwZE12N3JUVyt0UVhvVnBkZ1Q3OVVzMHpyVTJ2cVFJVFBWRE9GNjhickFtVkpsSzQyV1NELzh5YWcKL2VWSGpPUGkrQ3hodWJFOFR3NlBtVzkxOFM0QmNFQVF6Z0h3OVF0UWJxTzBlVWJ1OGdyV1lYbmlDcllhVmlVVApRY0VBTzF4cStpeFhtQ2o1VkFVQzlab211Z1VHNWlNZmM4dGdPQ0NpV092MldOM2NNNzNYV3IyekhLblBQOEZWCmJRVTZUM1Vwa3FDVGR4UnVkY3AyN1UvZ1ZkZ0szcVdIUTlOSnBhSmVRVDhKSTdMMDVFVFlObjRMeXYzSzVaWDUKRWJuZmxPNUljY1QzSG5Gby8vSk5aU2s1NTJmUHc0Q0d1blcrU3JNRE1iYk4rSzRTS3FMOXV6VEc5ZXBmN1NLZwpwRktyVmtQTDFPa3dmNDdmdy9LK1lTY0tWaGpWL1RTWVFjOUlNTUxpUXNsTExrMkFCQm41NDJwdjdqWGRqcllvCk50YTlnMjY5SzZjaG0zcXN1RG1lRkczSFYrRE9wUGh4dmRkdzRHUVdQNmZXLzZFeW45Y1RIZjZuZFdieEVGSWMKZ2VHYWF3SjlQR2ZKZnpPRDFPVkpDMTZsMEVrK3NiWVY3M0ZJM3VaR2pFYUVxTGZLanNMYjludUU5Q2JwbE1QMQp4c3F0WWpKWFJvSkdLVFpkOGNIVE5CbysxYzN6NzNjWEp6UDFwN1VWQUtmaDdGZ1NOWkJrbnB5YnZEeGVkOExuCkxCRFoKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQotLS0tLUJFR0lOIFBSSVZBVEUgS0VZLS0tLS0KTUlJSlF3SUJBREFOQmdrcWhraUc5dzBCQVFFRkFBU0NDUzB3Z2drcEFnRUFBb0lDQVFDeU8zbDNDaGt1MXFOVQo1Nll5UUFkU3ZmN3RJaDVNODBiYWhRMlVNQlMwWVJPejBmUng0dlNHeDgveWVVYVlJT0RWdmV4eXZzYk1sTFpyCmJhZ1FZZnRSQnFlRXpFOXExNlRCb2diOG1HNVhsWFVOMS9zcVJadVlDa0JJSkI4N1hkUHhoWXZyaEc5a0txNzQKUXZiOVhKMThjdkhQZGJta3pTbS82dHBBcjRoWlBZODdwY1hTUG4wK2s2bFppNlY1RUROenc0WlBjTkdRTnllRgpKOGNSMzJXWnhlRm9lNkN4R2VOQk5SKytNSjI0WjBDYW1wckV2R2tOREtRV2R2bFZtWGtBenZJd3loOUVSUk1uCmlSQlJCaFcvMXNKbkphVG5YZU1ZbWd4aDBydkNVOFRlYUxvMlVxZFlNTnNkOUpCUER5WkhWdUxTRyt5RERQcFcKamdodnByVVl0Wmc3SWltdmxhUGpWTWlobGluby9zSlBydEhHZkNUbUovclBua1plb3Z3WUVKb1lIWGpQV29wZwpZdkVFVzRwemR2UUdVWDdJRGd2aEFWQlVHVVR4RWFxaldJM0hzakVQYTg2b0x2MDNJaTZ3RnJ3dVZuKzB0d0FuCkZaUVAzazlOaHFmTlIybFNDa2Z6MzlSZXlJQzRRS2h3ZG9Lbm90cTFUc2Y1QUMzdWJ6UGdwSXZPQmsyWVlhbjYKZjlsY1Z2UzJ6SGNVdDFIcGJZNFFWcVpsYTJ6TUVYanJrQ1F2U3BlclFVMkRXbk1LVkg2bU5KTHlFWmQwSXF3ZApsWXVNQi9rMEU4MDVQWkF5YXo5WVI1WFV2N3h2NHZSNU45WmJBaVFncFpaMDRWOFFzU2RxTm8rZDZ1d2xPRjdnCmM1WWpTUjRQWitHWmN4UHR2UE4xOGswbXFVWm4yUUlEQVFBQkFvSUNBQnZtTGhWRzEyVDY1RER6aHozR2JWOEoKQS92MVRlNURCb3hJMTRuNEhNV1U0ZWltck5wRzZjLzU1eFhRTmc5ZmdOSkp4ZGE3QU9qS2srT0NhV204YkswNgpSVzZ4Z2ZKUGlkSzY4aTBJRDFNQkZObWQ2QXNEUDdVdnBacjZvZDVCSHdsbmNOemxBTlZ2emxrVGpSQzJpL3NNCll4MnBFcGpoZWUrT0ZsYVp6aXRwOU1uT3k5c2xQUHNCVWprRXl3VGJBYkxWU3hPVVdBN052ZzlITXJvY0pnMzAKRTdJRWtzVjdoVDg5SkVMajNxSEc4b05BNnQ1dzZtRElqSEdYeUxVYTJQNGFFWDgyK2IzNHNnN2c2RlR4TVpFSQpwUUJRWnQwYlYrTzUrWERoU1NnYUdobXIwR1RySmV3cXp2Y3V3OTF4bWFSV2VCcm1Qc0lrMDBCSlFMak96UG9BCktsMHZNNXNKdVB6STJTeWF6RnlVM1ovaWw2MzJHM2pMa2l0c1hBdHlmTTN5VEF2KzhCT1RSSTY4aXpOQmptbHYKQVNkRlZLQTF4cndmUFF2VXlYWnUwd2JUU0MwU2oxcmlUcERJMUl6NnQ1bndlUlVRNm1qSHg0OTAyS0liM2NjYQpoVEE0dnRtUjdackN0blE3YUpNa3o2REcxbUk1N0NiS0JKV2h6S0JtNTEwQVV5UGZsTFdGSGhXM1Z0N3BnVFo2CjRibjRaM1p1K1NBOFh4cUtDMmEyTENPRlkvZWY2UXhmUTlyekFHSWRzbzJzKzJsTENCV09kNXAvVyt2aC9oTU8KTWZYS0piRWYwSGpBTVVId3FvbUNUZmdSRU0xVkZ4U3JOeXRGUGs1NFdiOE5rOUh1Q1hQczlSazA1bUE0c2k5UQorOXR4U0psYzU0L3BQYnJqOXVFaEFvSUJBUUMyalBqUzFtYzJWVUhjaFVCdWVVZUFuMFRLdCswR3JlWTlwd0doCnduVFE5TEhvYU9xUUt0Vkc2VTUyYVQ4UUdpVHBpR3dNakJsSkQzNGlsN0o0cnBjNk9xRytkeTZYM29lcnl4TVIKRnlBN3VxWncvbTBzaEZORzNnK2t5R1hybE1KOU5yUnE4OHN5QlM1eVBvb2JHRkNORW9VQS9QT2lVaWROSm9mYQpVaDJzMmNuMnZWUzlDV1lwMGY0SWxTRXdYRm5VdStuc1dpYlVLSXFSam85SlRtRHcrdU5OZFFtNXhIb3ZpSlRkCnlYR3NONTFDdDFpVS9US3Q2ZnZBUHNrRXF2Q3VtcElQMjFEeXI0ejhsZ2Jyd3l4bXJoUW5yVVJkRUc1SmREcDUKVHdGL24xaktHK202bDJ4ejZEYmE2eVVValFDKzk4TzFjRjZ5bHVxQkJHcENidGN2QW9JQkFRRDU4YlNIZUVybQpzV3ZhM2lrNWJ2ZE9QRmdsRDJOVVd5VUJSeStsSjQyZ0RBdmdteWttN0RtK1lab3ViYkNkREZqL2V5YVZ0QTd2CklxdEJZUHNtejI3YzI1b3FoRUdIQTNpOFltWW1uYjRsbjZSTUIzdE8zSFlVT2J2MnY4Yy91WGlIbzBVN1lEMngKSnhxN05xRjFINlA5ZzlBbHNGVUl3a3hmTFA4UUc4YjBtWG0weWs5TGNxYVBkZVRvRkZ5dUpSdGlpQUY3UnZwbgpPM3hRL09tclFPL0hjeldzUE9WenkxMlVsMzROeUFOUGxzNGhXQlVacm9tUGxKZFB5R09CZmxEdU9RSXRPRzBECklzZFpwOWdwUFZvT2ZQZ25COG9KaEZCcUZEbVFlNk1YUFo1aU11YW1mMlVYMGI0SzNzVkVBdnVNZkdQeitON1MKK1FGNVZCUWgvVzkzQW9JQkFRQ2c4T3BTWDRwQllhc2VNekNaOVR5dnpqc0ZDbURqT1orNmpTbW9KbHQ4K2E1NworenVKZk9ucGlibU9OYjNPZ1c0M29mbTRtaStVdFI3OGVvZHpWR0dwaVpXZDZVOWZ2MllYZElOTDF2cXBEaWE5CmllSlFsQjBqWnBXZUxydUVsZk5lRjBPNjQxTXF0MXk2aGg2V1FycUpsV0ZEZkwrRFJUQzNHUmcreDVTNEZvNnoKaFRwWEt4a3lGNXdDancvaXBoamdzQWROUkRIbGJCUzJ2VnZnUWtTL1VFSGp3U0tnNy9MVlEzSVRrdzB2eXh4UApmSHVSWnlVdUpSSzU2K0NueDlsSDVxaU5hRXNXbXVVT3IycE1veGJiTS9BN0JzdzF6RTJmWHVSS25QZnlQMWMxCllLU1F4LzFxdHJqZUN0LzNIVlVpQ0NnNEoyaWx4TjNjZnpyN2RPTXJBb0lCQVFDWXJHdjUxQ0RzaWJPNEhieFEKdU5lWGtvVEZIb0V1SmY2VXFVY1JPdmZucTNRVjNyRmtkU2RRZzQ0S2pqWXp1RGNrMTdUWi9RS2lVQ3NMNUpHRgpRM0FVdUkrVEtQWmQ0bUQ5c1oxME9TYk5GSmJuV2lxWUlWSi9TRVRvbEh6QkVDbnZzR3U1dVMvMTVrME56bkVSCmVpSlIyUkpyOHluK0Q3Rlc4Y1Zic1p2MkRVbXFoV21xVEg0eFkzSlAwU0JMdjU3YXNQazJ0RVNBaW5XRmd2ZTUKQkJGelk0eUZpUzBmYmpuYmFpNDFmTmVJNWpWRGFPcDZwWUtoa2NKYm1hd3VqVm9pS2ZDS2JzMG4vVGFJTFY1OAowbDBRUElYWVVZbTRCbnFZVVlKWUh5MmdKS042bUYwTGx3WEpadlVPN3NUUXBvSEJicm9mYlFXdkdTc3RVWTU2CnRMUkJBb0lCQURUblFPWEszdHhYbkdMMERMU1k4QXE1TDdkT3lUUDdzSllzMHRGcFhnTDRkRXpyVEV0bHYrd1MKMEtKSnZKWWt5RjlzcmpCWGI4TjBmNFhvWi9jL3d4c2d4TUtKRXVrOHFNZHFzeUxBelZpaHNhNU4vcW90MUR4SgpMcTc5aVBIVk1FOFV1bXFiWldUSDVyVWFBTE5RQnY4azdJQkIydUNzRTl0dFlFWk5WcThtWHZGZklteXhkN1k2CkxnNVVIeEg3a2RkQjNkZzlDdExBM3ZsQUNMcEVyTlk4SDNrakIzaGVxM0RzdXJVNlVxTGdad1Qvc0JPSWl3b1QKVmdZbEFFUE1GbmsrNE10Z1BVcG9UUEVMQ21YQjkwM3VpQ0p1NlEyd0VrN3ZvU0VtWlBZR1JwSkRobjVrSnFQVwozM3BlT3Q3K2lTQVV0eHZHNFVzc1hZdFh6ZS9hQmNBPQotLS0tLUVORCBQUklWQVRFIEtFWS0tLS0t"; -// } - -// // // Generate RSA key pair -// // using (RSA rsa = RSA.Create()) -// // { -// // rsa.KeySize = 2048; -// // var certificateRequest = new CertificateRequest( -// // subjectName, -// // rsa, -// // HashAlgorithmName.SHA256, -// // RSASignaturePadding.Pkcs1); - -// // // Add basic constraints (self-signed, no CA) -// // certificateRequest.CertificateExtensions.Add( -// // new X509BasicConstraintsExtension(false, false, 0, false)); - -// // // Add key usage (digital signature, key encipherment) -// // certificateRequest.CertificateExtensions.Add( -// // new X509KeyUsageExtension( -// // X509KeyUsageFlags.DigitalSignature | X509KeyUsageFlags.KeyEncipherment, -// // false)); - -// // // Add subject key identifier -// // certificateRequest.CertificateExtensions.Add( -// // new X509SubjectKeyIdentifierExtension(certificateRequest.PublicKey, false)); - -// // // Create the self-signed certificate -// // var certificate = certificateRequest.CreateSelfSigned( -// // DateTimeOffset.Now, -// // DateTimeOffset.Now.AddYears(validityPeriodInYears)); - -// // // Export certificate as PEM -// // certificateString = ExportToPem(certificate); -// // } -// // return certificateString; -// // } - -// // private static string ExportToPem(X509Certificate2 certificate) -// // { -// // // Export the certificate as Base64 -// // byte[] certBytes = certificate.Export(X509ContentType.Cert); -// // string base64Cert = Convert.ToBase64String(certBytes); - -// // // Format as PEM -// // StringBuilder pem = new StringBuilder(); -// // pem.AppendLine("-----BEGIN CERTIFICATE-----"); -// // for (int i = 0; i < base64Cert.Length; i += 64) -// // { -// // pem.AppendLine(base64Cert.Substring(i, Math.Min(64, base64Cert.Length - i))); -// // } -// // pem.AppendLine("-----END CERTIFICATE-----"); - -// // return pem.ToString(); -// // } -// } -// } +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security.Cryptography; +using System.Security.Cryptography.X509Certificates; + +using System.Text; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager.NetApp.Models; +using Azure.ResourceManager.NetApp.Tests.Helpers; +using Azure.ResourceManager.Resources; +using FluentAssertions; +using NUnit.Framework; + +namespace Azure.ResourceManager.NetApp.Tests +{ + public class ANFBucketTests : NetAppTestBase + { + private string _pool1Name = "pool1"; + private NetAppAccountCollection _netAppAccountCollection { get => _resourceGroup.GetNetAppAccounts(); } + internal NetAppBucketCollection _bucketCollection; + internal NetAppVolumeResource _volumeResource; + internal string _selfSignedCertificate; + + //private NetAppBucketCollection _netAppBucketCollection { get => _resourceGroup.GetNetAppBuckets(); } + public ANFBucketTests(bool isAsync) : base(isAsync) + { + } + + [SetUp] + public async Task SetUp() + { + Console.WriteLine("ANFBucketTests Setup"); + string volumeName = Recording.GenerateAssetName("volumeName-"); + _resourceGroup = await CreateResourceGroupAsync(); + string accountName = await CreateValidAccountNameAsync(_accountNamePrefix, _resourceGroup, DefaultLocation); + _selfSignedCertificate = CreateSelfSignedCertificate(); + _netAppAccount = (await _netAppAccountCollection.CreateOrUpdateAsync(WaitUntil.Completed, accountName, GetDefaultNetAppAccountParameters())).Value; + + CapacityPoolData capactiyPoolData = new(DefaultLocation, _poolSize.Value, NetAppFileServiceLevel.Premium); + capactiyPoolData.Tags.InitializeFrom(DefaultTags); + _capacityPool = (await _capacityPoolCollection.CreateOrUpdateAsync(WaitUntil.Completed, _pool1Name, capactiyPoolData)).Value; + + _volumeCollection = _capacityPool.GetNetAppVolumes(); + + await CreateVirtualNetwork(); + _volumeResource = await CreateVolume(DefaultLocation, NetAppFileServiceLevel.Premium, _defaultUsageThreshold, subnetId: DefaultSubnetId, volumeName: volumeName); + Console.WriteLine("VolumeTEST Setup create vnet"); + _bucketCollection = _volumeResource.GetNetAppBuckets(); + Console.WriteLine("ANFBucketTests Setup complete"); + } + + [TearDown] + public async Task ClearBuckets() + { + //remove all buckets under current netAppAccount and remove netAppAccount + if (_resourceGroup != null) + { + await foreach (NetAppBucketResource bucket in _bucketCollection.GetAllAsync()) + { + // invoke the operation + await bucket.DeleteAsync(WaitUntil.Completed); + } + //remove volumes + await foreach (NetAppVolumeResource volume in _volumeCollection.GetAllAsync()) + { + // invoke the operation + await volume.DeleteAsync(WaitUntil.Completed); + } + //remove capacityPools + await LiveDelay(40000); + await foreach (CapacityPoolResource capacityPool in _capacityPoolCollection.GetAllAsync()) + { + // invoke the operation + await capacityPool.DeleteAsync(WaitUntil.Completed); + } + //remove account + await LiveDelay(40000); + await _netAppAccount.DeleteAsync(WaitUntil.Completed); + } + _resourceGroup = null; + } + + [RecordedTest] + public async Task CreateGetDeleteBucket() + { + //create snapshot + var bucketName = Recording.GenerateAssetName("bucket-"); + //await SetUp(); + + NetAppBucketData data = new NetAppBucketData + { + Path = "/", + FileSystemUser = new NetAppBucketFileSystemUser + { + NfsUser = new NetAppBucketNfsUser + { + UserId = 1001L, + GroupId = 1000L, + }, + }, + Server = new NetAppBucketServerProperties + { + Fqdn = "www.acme.com", + CertificateObject = _selfSignedCertificate, + }, + Permissions = NetAppBucketPermission.ReadOnly, + }; + ArmOperation lro = await _bucketCollection.CreateOrUpdateAsync(WaitUntil.Completed, bucketName, data); + NetAppBucketResource result = lro.Value; + + // the variable result is a resource + Assert.IsNotNull(result.Data); + Assert.AreEqual($"{_volumeResource.Data.Name}/{bucketName}", result.Data.Name); + Console.WriteLine($"Create Succeeded on id: {result.Data.Id}"); + + // get the created resource + NetAppBucketResource netAppBucket = Client.GetNetAppBucketResource(result.Data.Id); + // invoke the operation + NetAppBucketResource bucketResult = await netAppBucket.GetAsync(); + string bucketResourceName = bucketResult.Data.Name; + + Assert.IsNotNull(bucketResult.Data); + Assert.AreEqual($"{_volumeResource.Data.Name}/{bucketName}", bucketResult.Data.Name); + Console.WriteLine($"GET Succeeded on id: {bucketResult.Data.Id}"); + + // invoke the delete operation + await netAppBucket.DeleteAsync(WaitUntil.Completed); + Console.WriteLine($"Delete Succeeded on id: {bucketResult.Data.Id}"); + + Console.WriteLine($"Check if exists: {bucketResourceName}"); + //check if the bucket exists + await LiveDelay(30000); + bool existsResult = await _bucketCollection.ExistsAsync(bucketName); + existsResult.Should().BeFalse(); + Console.WriteLine($"Succeeded: {existsResult}"); + } + + [RecordedTest] + public async Task ListBuckets() + { + //create bucket + var bucketName = Recording.GenerateAssetName("bucket-"); + var bucket2Name = Recording.GenerateAssetName("bucket-2"); + await SetUp(); + + NetAppBucketData data = new NetAppBucketData + { + Path = "/", + FileSystemUser = new NetAppBucketFileSystemUser + { + NfsUser = new NetAppBucketNfsUser + { + UserId = 1001L, + GroupId = 1000L, + }, + }, + Server = new NetAppBucketServerProperties + { + Fqdn = "www.acme.com", + CertificateObject = _selfSignedCertificate, + }, + Permissions = NetAppBucketPermission.ReadOnly, + }; + + NetAppBucketData data2 = new NetAppBucketData + { + Path = "/", + FileSystemUser = new NetAppBucketFileSystemUser + { + NfsUser = new NetAppBucketNfsUser + { + UserId = 1001L, + GroupId = 1000L, + }, + }, + Server = new NetAppBucketServerProperties + { + Fqdn = "www.acme.com", + CertificateObject = _selfSignedCertificate, + }, + Permissions = NetAppBucketPermission.ReadOnly, + }; + ArmOperation lro = await _bucketCollection.CreateOrUpdateAsync(WaitUntil.Completed, bucketName, data); + NetAppBucketResource result = lro.Value; + + //ArmOperation lro2 = await _bucketCollection.CreateOrUpdateAsync(WaitUntil.Completed, bucket2Name, data2); + //NetAppBucketResource result2 = lro2.Value; + + // Define a list to store results + List buckets = []; + // invoke the List operation and iterate over the result + await foreach (NetAppBucketResource item in _bucketCollection.GetAllAsync()) + { + buckets.Add(item); + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {item.Id}"); + } + Assert.GreaterOrEqual(buckets.Count, 1); + Assert.IsTrue(buckets.Any(r => r.Data.Name.Split('/').Last() == bucketName)); + } + + [RecordedTest] + public async Task PatchBucket() + { + //create snapshot + var bucketName = Recording.GenerateAssetName("bucket-"); + await SetUp(); + + NetAppBucketData data = new NetAppBucketData + { + Path = "/", + FileSystemUser = new NetAppBucketFileSystemUser + { + NfsUser = new NetAppBucketNfsUser + { + UserId = 1001L, + GroupId = 1000L, + }, + }, + Server = new NetAppBucketServerProperties + { + Fqdn = "www.acme.com", + CertificateObject = _selfSignedCertificate, + }, + Permissions = NetAppBucketPermission.ReadOnly, + }; + ArmOperation lro = await _bucketCollection.CreateOrUpdateAsync(WaitUntil.Completed, bucketName, data); + NetAppBucketResource result = lro.Value; + + // the variable result is a resource + Assert.IsNotNull(result.Data); + Assert.AreEqual(bucketName, result.Data.Name.Split('/').Last()); + Console.WriteLine($"Create Succeeded on id: {result.Data.Id}"); + + // get the created resource + NetAppBucketResource netAppBucket = Client.GetNetAppBucketResource(result.Data.Id); + // invoke the operation + NetAppBucketResource bucketResult = await netAppBucket.GetAsync(); + Assert.IsNotNull(bucketResult.Data); + Assert.AreEqual(bucketName, bucketResult.Data.Name.Split('/').Last()); + Console.WriteLine($"GET Succeeded on id: {bucketResult.Data.Id}"); + + // invoke the operation + NetAppBucketPatch patch = new NetAppBucketPatch + { + Permissions = NetAppBucketPatchPermission.ReadWrite + }; + ArmOperation lroUpdate = await netAppBucket.UpdateAsync(WaitUntil.Completed, patch); + NetAppBucketResource updateResult = lroUpdate.Value; + Assert.IsNotNull(updateResult.Data); + await LiveDelay(30000); + NetAppBucketResource updateResultData = await netAppBucket.GetAsync(); + + updateResultData.Id.Should().Be(bucketResult.Data.Id); + updateResult.Data.Name.Should().Be(bucketResult.Data.Name); + updateResult.Data.ProvisioningState.Should().Be(NetAppProvisioningState.Succeeded); + //updateResultData.Data.Permissions.Should().Be(NetAppBucketPatchPermission.ReadWrite); + } + + [RecordedTest] + public async Task GenerateCredentialsForBucket() + { + //create snapshot + var bucketName = Recording.GenerateAssetName("bucket-"); + await SetUp(); + + NetAppBucketData data = new NetAppBucketData + { + Path = "/", + FileSystemUser = new NetAppBucketFileSystemUser + { + NfsUser = new NetAppBucketNfsUser + { + UserId = 1001L, + GroupId = 1000L, + }, + }, + Server = new NetAppBucketServerProperties + { + Fqdn = "www.acme.com", + CertificateObject = _selfSignedCertificate, + }, + Permissions = NetAppBucketPermission.ReadOnly, + }; + ArmOperation lro = await _bucketCollection.CreateOrUpdateAsync(WaitUntil.Completed, bucketName, data); + NetAppBucketResource result = lro.Value; + + // the variable result is a resource + Assert.IsNotNull(result.Data); + Assert.AreEqual(bucketName, result.Data.Name.Split('/').Last()); + Console.WriteLine($"Create Succeeded on id: {result.Data.Id}"); + + // get the created resource + NetAppBucketResource netAppBucket = Client.GetNetAppBucketResource(result.Data.Id); + NetAppBucketResource resultData = await netAppBucket.GetAsync(); + Assert.IsNotNull(resultData.Data); + Assert.AreEqual(bucketName, resultData.Data.Name.Split('/').Last()); + Console.WriteLine($"GET Succeeded on id: {resultData.Data.Id}"); + + // invoke the operation + NetAppBucketCredentialsExpiry body = new NetAppBucketCredentialsExpiry + { + KeyPairExpiryDays = 3, + }; + NetAppBucketGenerateCredentials GenerateCredentialsResult = await netAppBucket.GenerateCredentialsAsync(body); + + NetAppBucketGenerateCredentials credentials = GenerateCredentialsResult; + credentials.Should().NotBeNull(); + credentials.AccessKey.Should().NotBeNullOrEmpty(); + credentials.SecretKey.Should().NotBeNullOrEmpty(); + } + + private string CreateSelfSignedCertificate(string subjectName = "CN=TestCertificate", int validityPeriodInYears = 1) + { + return @"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZEekNDQXZlZ0F3SUJBZ0lVTTF2bUZFNHZNU1k4MUFDaTBMNVBqbFlmWXgwd0RRWUpLb1pJaHZjTkFRRUwKQlFBd0Z6RVZNQk1HQTFVRUF3d01kM2QzTG1GamJXVXVZMjl0TUI0WERUSTFNRFl4TWpFMU5ESTBObG9YRFRJMgpNRFl4TWpFMU5ESTBObG93RnpFVk1CTUdBMVVFQXd3TWQzZDNMbUZqYldVdVkyOXRNSUlDSWpBTkJna3Foa2lHCjl3MEJBUUVGQUFPQ0FnOEFNSUlDQ2dLQ0FnRUFzanQ1ZHdvWkx0YWpWT2VtTWtBSFVyMys3U0llVFBORzJvVU4KbERBVXRHRVRzOUgwY2VMMGhzZlA4bmxHbUNEZzFiM3NjcjdHekpTMmEyMm9FR0g3VVFhbmhNeFBhdGVrd2FJRwovSmh1VjVWMURkZjdLa1dibUFwQVNDUWZPMTNUOFlXTDY0UnZaQ3F1K0VMMi9WeWRmSEx4ejNXNXBNMHB2K3JhClFLK0lXVDJQTzZYRjBqNTlQcE9wV1l1bGVSQXpjOE9HVDNEUmtEY25oU2ZIRWQ5bG1jWGhhSHVnc1JualFUVWYKdmpDZHVHZEFtcHFheEx4cERReWtGbmI1VlpsNUFNN3lNTW9mUkVVVEo0a1FVUVlWdjliQ1p5V2s1MTNqR0pvTQpZZEs3d2xQRTNtaTZObEtuV0REYkhmU1FUdzhtUjFiaTBodnNnd3o2Vm80SWI2YTFHTFdZT3lJcHI1V2o0MVRJCm9aWXA2UDdDVDY3Unhud2s1aWY2ejU1R1hxTDhHQkNhR0IxNHoxcUtZR0x4QkZ1S2MzYjBCbEYreUE0TDRRRlEKVkJsRThSR3FvMWlOeDdJeEQydk9xQzc5TnlJdXNCYThMbFovdExjQUp4V1VEOTVQVFlhbnpVZHBVZ3BIODkvVQpYc2lBdUVDb2NIYUNwNkxhdFU3SCtRQXQ3bTh6NEtTTHpnWk5tR0dwK24vWlhGYjB0c3gzRkxkUjZXMk9FRmFtClpXdHN6QkY0NjVBa0wwcVhxMEZOZzFwekNsUitwalNTOGhHWGRDS3NIWldMakFmNU5CUE5PVDJRTW1zL1dFZVYKMUwrOGIrTDBlVGZXV3dJa0lLV1dkT0ZmRUxFbmFqYVBuZXJzSlRoZTRIT1dJMGtlRDJmaG1YTVQ3Ynp6ZGZKTgpKcWxHWjlrQ0F3RUFBYU5UTUZFd0hRWURWUjBPQkJZRUZOa3A5a05ISzZmaEtKNnRaK2kzUlpCWmxoTUFNQjhHCkExVWRJd1FZTUJhQUZOa3A5a05ISzZmaEtKNnRaK2kzUlpCWmxoTUFNQThHQTFVZEV3RUIvd1FGTUFNQkFmOHcKRFFZSktvWklodmNOQVFFTEJRQURnZ0lCQUZFSGUxRHFpNXNRS0wvSmR2MTNIcEhyVkNoR0x6dGtxTHFwT0MyVgpyMWJUSzVUSWJCbW5CcEdQS3poQkU3bVF5MlFlWkZkT2c3RTRGblRVNzQ4eEtsWE04WkwrOFNWbDFLdlZaRkxjCkV0QWpqLzIwZE12N3JUVyt0UVhvVnBkZ1Q3OVVzMHpyVTJ2cVFJVFBWRE9GNjhickFtVkpsSzQyV1NELzh5YWcKL2VWSGpPUGkrQ3hodWJFOFR3NlBtVzkxOFM0QmNFQVF6Z0h3OVF0UWJxTzBlVWJ1OGdyV1lYbmlDcllhVmlVVApRY0VBTzF4cStpeFhtQ2o1VkFVQzlab211Z1VHNWlNZmM4dGdPQ0NpV092MldOM2NNNzNYV3IyekhLblBQOEZWCmJRVTZUM1Vwa3FDVGR4UnVkY3AyN1UvZ1ZkZ0szcVdIUTlOSnBhSmVRVDhKSTdMMDVFVFlObjRMeXYzSzVaWDUKRWJuZmxPNUljY1QzSG5Gby8vSk5aU2s1NTJmUHc0Q0d1blcrU3JNRE1iYk4rSzRTS3FMOXV6VEc5ZXBmN1NLZwpwRktyVmtQTDFPa3dmNDdmdy9LK1lTY0tWaGpWL1RTWVFjOUlNTUxpUXNsTExrMkFCQm41NDJwdjdqWGRqcllvCk50YTlnMjY5SzZjaG0zcXN1RG1lRkczSFYrRE9wUGh4dmRkdzRHUVdQNmZXLzZFeW45Y1RIZjZuZFdieEVGSWMKZ2VHYWF3SjlQR2ZKZnpPRDFPVkpDMTZsMEVrK3NiWVY3M0ZJM3VaR2pFYUVxTGZLanNMYjludUU5Q2JwbE1QMQp4c3F0WWpKWFJvSkdLVFpkOGNIVE5CbysxYzN6NzNjWEp6UDFwN1VWQUtmaDdGZ1NOWkJrbnB5YnZEeGVkOExuCkxCRFoKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQotLS0tLUJFR0lOIFBSSVZBVEUgS0VZLS0tLS0KTUlJSlF3SUJBREFOQmdrcWhraUc5dzBCQVFFRkFBU0NDUzB3Z2drcEFnRUFBb0lDQVFDeU8zbDNDaGt1MXFOVQo1Nll5UUFkU3ZmN3RJaDVNODBiYWhRMlVNQlMwWVJPejBmUng0dlNHeDgveWVVYVlJT0RWdmV4eXZzYk1sTFpyCmJhZ1FZZnRSQnFlRXpFOXExNlRCb2diOG1HNVhsWFVOMS9zcVJadVlDa0JJSkI4N1hkUHhoWXZyaEc5a0txNzQKUXZiOVhKMThjdkhQZGJta3pTbS82dHBBcjRoWlBZODdwY1hTUG4wK2s2bFppNlY1RUROenc0WlBjTkdRTnllRgpKOGNSMzJXWnhlRm9lNkN4R2VOQk5SKytNSjI0WjBDYW1wckV2R2tOREtRV2R2bFZtWGtBenZJd3loOUVSUk1uCmlSQlJCaFcvMXNKbkphVG5YZU1ZbWd4aDBydkNVOFRlYUxvMlVxZFlNTnNkOUpCUER5WkhWdUxTRyt5RERQcFcKamdodnByVVl0Wmc3SWltdmxhUGpWTWlobGluby9zSlBydEhHZkNUbUovclBua1plb3Z3WUVKb1lIWGpQV29wZwpZdkVFVzRwemR2UUdVWDdJRGd2aEFWQlVHVVR4RWFxaldJM0hzakVQYTg2b0x2MDNJaTZ3RnJ3dVZuKzB0d0FuCkZaUVAzazlOaHFmTlIybFNDa2Z6MzlSZXlJQzRRS2h3ZG9Lbm90cTFUc2Y1QUMzdWJ6UGdwSXZPQmsyWVlhbjYKZjlsY1Z2UzJ6SGNVdDFIcGJZNFFWcVpsYTJ6TUVYanJrQ1F2U3BlclFVMkRXbk1LVkg2bU5KTHlFWmQwSXF3ZApsWXVNQi9rMEU4MDVQWkF5YXo5WVI1WFV2N3h2NHZSNU45WmJBaVFncFpaMDRWOFFzU2RxTm8rZDZ1d2xPRjdnCmM1WWpTUjRQWitHWmN4UHR2UE4xOGswbXFVWm4yUUlEQVFBQkFvSUNBQnZtTGhWRzEyVDY1RER6aHozR2JWOEoKQS92MVRlNURCb3hJMTRuNEhNV1U0ZWltck5wRzZjLzU1eFhRTmc5ZmdOSkp4ZGE3QU9qS2srT0NhV204YkswNgpSVzZ4Z2ZKUGlkSzY4aTBJRDFNQkZObWQ2QXNEUDdVdnBacjZvZDVCSHdsbmNOemxBTlZ2emxrVGpSQzJpL3NNCll4MnBFcGpoZWUrT0ZsYVp6aXRwOU1uT3k5c2xQUHNCVWprRXl3VGJBYkxWU3hPVVdBN052ZzlITXJvY0pnMzAKRTdJRWtzVjdoVDg5SkVMajNxSEc4b05BNnQ1dzZtRElqSEdYeUxVYTJQNGFFWDgyK2IzNHNnN2c2RlR4TVpFSQpwUUJRWnQwYlYrTzUrWERoU1NnYUdobXIwR1RySmV3cXp2Y3V3OTF4bWFSV2VCcm1Qc0lrMDBCSlFMak96UG9BCktsMHZNNXNKdVB6STJTeWF6RnlVM1ovaWw2MzJHM2pMa2l0c1hBdHlmTTN5VEF2KzhCT1RSSTY4aXpOQmptbHYKQVNkRlZLQTF4cndmUFF2VXlYWnUwd2JUU0MwU2oxcmlUcERJMUl6NnQ1bndlUlVRNm1qSHg0OTAyS0liM2NjYQpoVEE0dnRtUjdackN0blE3YUpNa3o2REcxbUk1N0NiS0JKV2h6S0JtNTEwQVV5UGZsTFdGSGhXM1Z0N3BnVFo2CjRibjRaM1p1K1NBOFh4cUtDMmEyTENPRlkvZWY2UXhmUTlyekFHSWRzbzJzKzJsTENCV09kNXAvVyt2aC9oTU8KTWZYS0piRWYwSGpBTVVId3FvbUNUZmdSRU0xVkZ4U3JOeXRGUGs1NFdiOE5rOUh1Q1hQczlSazA1bUE0c2k5UQorOXR4U0psYzU0L3BQYnJqOXVFaEFvSUJBUUMyalBqUzFtYzJWVUhjaFVCdWVVZUFuMFRLdCswR3JlWTlwd0doCnduVFE5TEhvYU9xUUt0Vkc2VTUyYVQ4UUdpVHBpR3dNakJsSkQzNGlsN0o0cnBjNk9xRytkeTZYM29lcnl4TVIKRnlBN3VxWncvbTBzaEZORzNnK2t5R1hybE1KOU5yUnE4OHN5QlM1eVBvb2JHRkNORW9VQS9QT2lVaWROSm9mYQpVaDJzMmNuMnZWUzlDV1lwMGY0SWxTRXdYRm5VdStuc1dpYlVLSXFSam85SlRtRHcrdU5OZFFtNXhIb3ZpSlRkCnlYR3NONTFDdDFpVS9US3Q2ZnZBUHNrRXF2Q3VtcElQMjFEeXI0ejhsZ2Jyd3l4bXJoUW5yVVJkRUc1SmREcDUKVHdGL24xaktHK202bDJ4ejZEYmE2eVVValFDKzk4TzFjRjZ5bHVxQkJHcENidGN2QW9JQkFRRDU4YlNIZUVybQpzV3ZhM2lrNWJ2ZE9QRmdsRDJOVVd5VUJSeStsSjQyZ0RBdmdteWttN0RtK1lab3ViYkNkREZqL2V5YVZ0QTd2CklxdEJZUHNtejI3YzI1b3FoRUdIQTNpOFltWW1uYjRsbjZSTUIzdE8zSFlVT2J2MnY4Yy91WGlIbzBVN1lEMngKSnhxN05xRjFINlA5ZzlBbHNGVUl3a3hmTFA4UUc4YjBtWG0weWs5TGNxYVBkZVRvRkZ5dUpSdGlpQUY3UnZwbgpPM3hRL09tclFPL0hjeldzUE9WenkxMlVsMzROeUFOUGxzNGhXQlVacm9tUGxKZFB5R09CZmxEdU9RSXRPRzBECklzZFpwOWdwUFZvT2ZQZ25COG9KaEZCcUZEbVFlNk1YUFo1aU11YW1mMlVYMGI0SzNzVkVBdnVNZkdQeitON1MKK1FGNVZCUWgvVzkzQW9JQkFRQ2c4T3BTWDRwQllhc2VNekNaOVR5dnpqc0ZDbURqT1orNmpTbW9KbHQ4K2E1NworenVKZk9ucGlibU9OYjNPZ1c0M29mbTRtaStVdFI3OGVvZHpWR0dwaVpXZDZVOWZ2MllYZElOTDF2cXBEaWE5CmllSlFsQjBqWnBXZUxydUVsZk5lRjBPNjQxTXF0MXk2aGg2V1FycUpsV0ZEZkwrRFJUQzNHUmcreDVTNEZvNnoKaFRwWEt4a3lGNXdDancvaXBoamdzQWROUkRIbGJCUzJ2VnZnUWtTL1VFSGp3U0tnNy9MVlEzSVRrdzB2eXh4UApmSHVSWnlVdUpSSzU2K0NueDlsSDVxaU5hRXNXbXVVT3IycE1veGJiTS9BN0JzdzF6RTJmWHVSS25QZnlQMWMxCllLU1F4LzFxdHJqZUN0LzNIVlVpQ0NnNEoyaWx4TjNjZnpyN2RPTXJBb0lCQVFDWXJHdjUxQ0RzaWJPNEhieFEKdU5lWGtvVEZIb0V1SmY2VXFVY1JPdmZucTNRVjNyRmtkU2RRZzQ0S2pqWXp1RGNrMTdUWi9RS2lVQ3NMNUpHRgpRM0FVdUkrVEtQWmQ0bUQ5c1oxME9TYk5GSmJuV2lxWUlWSi9TRVRvbEh6QkVDbnZzR3U1dVMvMTVrME56bkVSCmVpSlIyUkpyOHluK0Q3Rlc4Y1Zic1p2MkRVbXFoV21xVEg0eFkzSlAwU0JMdjU3YXNQazJ0RVNBaW5XRmd2ZTUKQkJGelk0eUZpUzBmYmpuYmFpNDFmTmVJNWpWRGFPcDZwWUtoa2NKYm1hd3VqVm9pS2ZDS2JzMG4vVGFJTFY1OAowbDBRUElYWVVZbTRCbnFZVVlKWUh5MmdKS042bUYwTGx3WEpadlVPN3NUUXBvSEJicm9mYlFXdkdTc3RVWTU2CnRMUkJBb0lCQURUblFPWEszdHhYbkdMMERMU1k4QXE1TDdkT3lUUDdzSllzMHRGcFhnTDRkRXpyVEV0bHYrd1MKMEtKSnZKWWt5RjlzcmpCWGI4TjBmNFhvWi9jL3d4c2d4TUtKRXVrOHFNZHFzeUxBelZpaHNhNU4vcW90MUR4SgpMcTc5aVBIVk1FOFV1bXFiWldUSDVyVWFBTE5RQnY4azdJQkIydUNzRTl0dFlFWk5WcThtWHZGZklteXhkN1k2CkxnNVVIeEg3a2RkQjNkZzlDdExBM3ZsQUNMcEVyTlk4SDNrakIzaGVxM0RzdXJVNlVxTGdad1Qvc0JPSWl3b1QKVmdZbEFFUE1GbmsrNE10Z1BVcG9UUEVMQ21YQjkwM3VpQ0p1NlEyd0VrN3ZvU0VtWlBZR1JwSkRobjVrSnFQVwozM3BlT3Q3K2lTQVV0eHZHNFVzc1hZdFh6ZS9hQmNBPQotLS0tLUVORCBQUklWQVRFIEtFWS0tLS0t"; + } + + // // Generate RSA key pair + // using (RSA rsa = RSA.Create()) + // { + // rsa.KeySize = 2048; + // var certificateRequest = new CertificateRequest( + // subjectName, + // rsa, + // HashAlgorithmName.SHA256, + // RSASignaturePadding.Pkcs1); + + // // Add basic constraints (self-signed, no CA) + // certificateRequest.CertificateExtensions.Add( + // new X509BasicConstraintsExtension(false, false, 0, false)); + + // // Add key usage (digital signature, key encipherment) + // certificateRequest.CertificateExtensions.Add( + // new X509KeyUsageExtension( + // X509KeyUsageFlags.DigitalSignature | X509KeyUsageFlags.KeyEncipherment, + // false)); + + // // Add subject key identifier + // certificateRequest.CertificateExtensions.Add( + // new X509SubjectKeyIdentifierExtension(certificateRequest.PublicKey, false)); + + // // Create the self-signed certificate + // var certificate = certificateRequest.CreateSelfSigned( + // DateTimeOffset.Now, + // DateTimeOffset.Now.AddYears(validityPeriodInYears)); + + // // Export certificate as PEM + // certificateString = ExportToPem(certificate); + // } + // return certificateString; + // } + + // private static string ExportToPem(X509Certificate2 certificate) + // { + // // Export the certificate as Base64 + // byte[] certBytes = certificate.Export(X509ContentType.Cert); + // string base64Cert = Convert.ToBase64String(certBytes); + + // // Format as PEM + // StringBuilder pem = new StringBuilder(); + // pem.AppendLine("-----BEGIN CERTIFICATE-----"); + // for (int i = 0; i < base64Cert.Length; i += 64) + // { + // pem.AppendLine(base64Cert.Substring(i, Math.Min(64, base64Cert.Length - i))); + // } + // pem.AppendLine("-----END CERTIFICATE-----"); + + // return pem.ToString(); + // } + } +} diff --git a/sdk/netapp/cspell.yaml b/sdk/netapp/cspell.yaml new file mode 100644 index 000000000000..2a8e6f6aa150 --- /dev/null +++ b/sdk/netapp/cspell.yaml @@ -0,0 +1,12 @@ +import: + - ../../.vscode/cspell.json +words: + - vserver + - Vserver + +# Optional overrides example for words in a specific file +# overrides: +# - filename: '**/sdk/contosowidgetmanager/somefile.yaml' +# words: +# - aardwolf +# - zoo \ No newline at end of file