diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/Azure.ResourceManager.PureStorageBlock.sln b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/Azure.ResourceManager.PureStorageBlock.sln
new file mode 100644
index 000000000000..70e40fe181ae
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/Azure.ResourceManager.PureStorageBlock.sln
@@ -0,0 +1,56 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29709.97
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.PureStorageBlock.Samples", "samples\Azure.ResourceManager.PureStorageBlock.Samples.csproj", "{7A2DFF15-5746-49F4-BD0F-C6C35337088A}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.PureStorageBlock", "src\Azure.ResourceManager.PureStorageBlock.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.PureStorageBlock.Tests", "tests\Azure.ResourceManager.PureStorageBlock.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE}
+ EndGlobalSection
+EndGlobal
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/CHANGELOG.md b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/CHANGELOG.md
new file mode 100644
index 000000000000..8b33f0fedccc
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/CHANGELOG.md
@@ -0,0 +1,11 @@
+# Release History
+
+## 1.0.0-beta.1 (Unreleased)
+
+### Features Added
+
+### Breaking Changes
+
+### Bugs Fixed
+
+### Other Changes
\ No newline at end of file
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/Directory.Build.props b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/Directory.Build.props
new file mode 100644
index 000000000000..63bd836ad44b
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/Directory.Build.props
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/README.md b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/README.md
new file mode 100644
index 000000000000..d258df3e7bf9
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/README.md
@@ -0,0 +1,80 @@
+# Microsoft Azure PureStorageBlock management client library for .NET
+
+**[Describe the service briefly first.]**
+
+This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities:
+
+ - Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET.
+ - Support [OpenTelemetry](https://opentelemetry.io/) for distributed tracing.
+ - HTTP pipeline with custom policies.
+ - Better error-handling.
+ - Support uniform telemetry across all languages.
+
+## Getting started
+
+### Install the package
+
+Install the Microsoft Azure PureStorageBlock management library for .NET with [NuGet](https://www.nuget.org/):
+
+```dotnetcli
+dotnet add package Azure.ResourceManager.PureStorageBlock --prerelease
+```
+
+### Prerequisites
+
+* You must have an [Microsoft Azure subscription](https://azure.microsoft.com/free/dotnet/).
+
+### Authenticate the Client
+
+To create an authenticated client and start interacting with Microsoft Azure resources, see the [quickstart guide here](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md).
+
+## Key concepts
+
+Key concepts of the Microsoft Azure SDK for .NET can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html)
+
+## Documentation
+
+Documentation is available to help you learn how to use this package:
+
+- [Quickstart](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md).
+- [API References](https://learn.microsoft.com/dotnet/api/?view=azure-dotnet).
+- [Authentication](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/README.md).
+
+## Examples
+
+Code samples for using the management library for .NET can be found in the following locations
+- [.NET Management Library Code Samples](https://aka.ms/azuresdk-net-mgmt-samples)
+
+## Troubleshooting
+
+- File an issue via [GitHub Issues](https://github.com/Azure/azure-sdk-for-net/issues).
+- Check [previous questions](https://stackoverflow.com/questions/tagged/azure+.net) or ask new ones on Stack Overflow using Azure and .NET tags.
+
+## Next steps
+
+For more information about Microsoft Azure SDK, see [this website](https://azure.github.io/azure-sdk/).
+
+## Contributing
+
+For details on contributing to this repository, see the [contributing
+guide][cg].
+
+This project welcomes contributions and suggestions. Most contributions
+require you to agree to a Contributor License Agreement (CLA) declaring
+that you have the right to, and actually do, grant us the rights to use
+your contribution. For details, visit .
+
+When you submit a pull request, a CLA-bot will automatically determine
+whether you need to provide a CLA and decorate the PR appropriately
+(for example, label, comment). Follow the instructions provided by the
+bot. You'll only need to do this action once across all repositories
+using our CLA.
+
+This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For
+more information, see the [Code of Conduct FAQ][coc_faq] or contact
+ with any other questions or comments.
+
+
+[cg]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/resourcemanager/Azure.ResourceManager/docs/CONTRIBUTING.md
+[coc]: https://opensource.microsoft.com/codeofconduct/
+[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
\ No newline at end of file
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/assets.json b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/assets.json
new file mode 100644
index 000000000000..6514a64c2411
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/assets.json
@@ -0,0 +1,7 @@
+
+{
+ "AssetsRepo": "Azure/azure-sdk-assets",
+ "AssetsRepoPrefixPath": "net",
+ "TagPrefix": "net/purestorageblock/Azure.ResourceManager.PureStorageBlock",
+ "Tag": ""
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Azure.ResourceManager.PureStorageBlock.Samples.csproj b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Azure.ResourceManager.PureStorageBlock.Samples.csproj
new file mode 100644
index 000000000000..70d5c9f46c03
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Azure.ResourceManager.PureStorageBlock.Samples.csproj
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_AvsStorageContainerCollection.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_AvsStorageContainerCollection.cs
new file mode 100644
index 000000000000..1d3003e34048
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_AvsStorageContainerCollection.cs
@@ -0,0 +1,160 @@
+// 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.PureStorageBlock.Samples
+{
+ public partial class Sample_AvsStorageContainerCollection
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_AvsStorageContainersGet()
+ {
+ // Generated from example definition: 2024-11-01-preview/AvsStorageContainers_Get_MaximumSet_Gen.json
+ // this example is just showing the usage of "AvsStorageContainer_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 StoragePoolResource created on azure
+ // for more information of creating StoragePoolResource, please refer to the document of StoragePoolResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolName";
+ ResourceIdentifier storagePoolResourceId = StoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName);
+ StoragePoolResource storagePool = client.GetStoragePoolResource(storagePoolResourceId);
+
+ // get the collection of this AvsStorageContainerResource
+ AvsStorageContainerCollection collection = storagePool.GetAvsStorageContainers();
+
+ // invoke the operation
+ string storageContainerName = "storageContainerName";
+ AvsStorageContainerResource result = await collection.GetAsync(storageContainerName);
+
+ // 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
+ AvsStorageContainerData 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_AvsStorageContainersListByStoragePool()
+ {
+ // Generated from example definition: 2024-11-01-preview/AvsStorageContainers_ListByStoragePool_MaximumSet_Gen.json
+ // this example is just showing the usage of "AvsStorageContainer_ListByStoragePool" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details 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 StoragePoolResource created on azure
+ // for more information of creating StoragePoolResource, please refer to the document of StoragePoolResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "spName";
+ ResourceIdentifier storagePoolResourceId = StoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName);
+ StoragePoolResource storagePool = client.GetStoragePoolResource(storagePoolResourceId);
+
+ // get the collection of this AvsStorageContainerResource
+ AvsStorageContainerCollection collection = storagePool.GetAvsStorageContainers();
+
+ // invoke the operation and iterate over the result
+ await foreach (AvsStorageContainerResource 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
+ AvsStorageContainerData 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_AvsStorageContainersGet()
+ {
+ // Generated from example definition: 2024-11-01-preview/AvsStorageContainers_Get_MaximumSet_Gen.json
+ // this example is just showing the usage of "AvsStorageContainer_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 StoragePoolResource created on azure
+ // for more information of creating StoragePoolResource, please refer to the document of StoragePoolResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolName";
+ ResourceIdentifier storagePoolResourceId = StoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName);
+ StoragePoolResource storagePool = client.GetStoragePoolResource(storagePoolResourceId);
+
+ // get the collection of this AvsStorageContainerResource
+ AvsStorageContainerCollection collection = storagePool.GetAvsStorageContainers();
+
+ // invoke the operation
+ string storageContainerName = "storageContainerName";
+ bool result = await collection.ExistsAsync(storageContainerName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_AvsStorageContainersGet()
+ {
+ // Generated from example definition: 2024-11-01-preview/AvsStorageContainers_Get_MaximumSet_Gen.json
+ // this example is just showing the usage of "AvsStorageContainer_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 StoragePoolResource created on azure
+ // for more information of creating StoragePoolResource, please refer to the document of StoragePoolResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolName";
+ ResourceIdentifier storagePoolResourceId = StoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName);
+ StoragePoolResource storagePool = client.GetStoragePoolResource(storagePoolResourceId);
+
+ // get the collection of this AvsStorageContainerResource
+ AvsStorageContainerCollection collection = storagePool.GetAvsStorageContainers();
+
+ // invoke the operation
+ string storageContainerName = "storageContainerName";
+ NullableResponse response = await collection.GetIfExistsAsync(storageContainerName);
+ AvsStorageContainerResource 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
+ AvsStorageContainerData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_AvsStorageContainerResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_AvsStorageContainerResource.cs
new file mode 100644
index 000000000000..351f7a75dd51
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_AvsStorageContainerResource.cs
@@ -0,0 +1,76 @@
+// 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.PureStorageBlock.Samples
+{
+ public partial class Sample_AvsStorageContainerResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_AvsStorageContainersGet()
+ {
+ // Generated from example definition: 2024-11-01-preview/AvsStorageContainers_Get_MaximumSet_Gen.json
+ // this example is just showing the usage of "AvsStorageContainer_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 AvsStorageContainerResource created on azure
+ // for more information of creating AvsStorageContainerResource, please refer to the document of AvsStorageContainerResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolName";
+ string storageContainerName = "storageContainerName";
+ ResourceIdentifier avsStorageContainerResourceId = AvsStorageContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, storageContainerName);
+ AvsStorageContainerResource avsStorageContainer = client.GetAvsStorageContainerResource(avsStorageContainerResourceId);
+
+ // invoke the operation
+ AvsStorageContainerResource result = await avsStorageContainer.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
+ AvsStorageContainerData 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_AvsStorageContainersDelete()
+ {
+ // Generated from example definition: 2024-11-01-preview/AvsStorageContainers_Delete_MaximumSet_Gen.json
+ // this example is just showing the usage of "AvsStorageContainer_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 AvsStorageContainerResource created on azure
+ // for more information of creating AvsStorageContainerResource, please refer to the document of AvsStorageContainerResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolName";
+ string storageContainerName = "storageContainerName";
+ ResourceIdentifier avsStorageContainerResourceId = AvsStorageContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, storageContainerName);
+ AvsStorageContainerResource avsStorageContainer = client.GetAvsStorageContainerResource(avsStorageContainerResourceId);
+
+ // invoke the operation
+ await avsStorageContainer.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine("Succeeded");
+ }
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_AvsStorageContainerVolumeCollection.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_AvsStorageContainerVolumeCollection.cs
new file mode 100644
index 000000000000..3968e321b309
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_AvsStorageContainerVolumeCollection.cs
@@ -0,0 +1,164 @@
+// 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.PureStorageBlock.Samples
+{
+ public partial class Sample_AvsStorageContainerVolumeCollection
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_AvsStorageContainerVolumesGet()
+ {
+ // Generated from example definition: 2024-11-01-preview/AvsStorageContainerVolumes_Get_MaximumSet_Gen.json
+ // this example is just showing the usage of "AvsStorageContainerVolume_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 AvsStorageContainerResource created on azure
+ // for more information of creating AvsStorageContainerResource, please refer to the document of AvsStorageContainerResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ string storageContainerName = "name";
+ ResourceIdentifier avsStorageContainerResourceId = AvsStorageContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, storageContainerName);
+ AvsStorageContainerResource avsStorageContainer = client.GetAvsStorageContainerResource(avsStorageContainerResourceId);
+
+ // get the collection of this AvsStorageContainerVolumeResource
+ AvsStorageContainerVolumeCollection collection = avsStorageContainer.GetAvsStorageContainerVolumes();
+
+ // invoke the operation
+ string volumeId = "cbdec-ddbb";
+ AvsStorageContainerVolumeResource result = await collection.GetAsync(volumeId);
+
+ // 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
+ AvsStorageContainerVolumeData 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_AvsStorageContainerVolumesListByAvsStorageContainer()
+ {
+ // Generated from example definition: 2024-11-01-preview/AvsStorageContainerVolumes_ListByAvsStorageContainer_MaximumSet_Gen.json
+ // this example is just showing the usage of "AvsStorageContainerVolume_ListByAvsStorageContainer" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details 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 AvsStorageContainerResource created on azure
+ // for more information of creating AvsStorageContainerResource, please refer to the document of AvsStorageContainerResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ string storageContainerName = "name";
+ ResourceIdentifier avsStorageContainerResourceId = AvsStorageContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, storageContainerName);
+ AvsStorageContainerResource avsStorageContainer = client.GetAvsStorageContainerResource(avsStorageContainerResourceId);
+
+ // get the collection of this AvsStorageContainerVolumeResource
+ AvsStorageContainerVolumeCollection collection = avsStorageContainer.GetAvsStorageContainerVolumes();
+
+ // invoke the operation and iterate over the result
+ await foreach (AvsStorageContainerVolumeResource 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
+ AvsStorageContainerVolumeData 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_AvsStorageContainerVolumesGet()
+ {
+ // Generated from example definition: 2024-11-01-preview/AvsStorageContainerVolumes_Get_MaximumSet_Gen.json
+ // this example is just showing the usage of "AvsStorageContainerVolume_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 AvsStorageContainerResource created on azure
+ // for more information of creating AvsStorageContainerResource, please refer to the document of AvsStorageContainerResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ string storageContainerName = "name";
+ ResourceIdentifier avsStorageContainerResourceId = AvsStorageContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, storageContainerName);
+ AvsStorageContainerResource avsStorageContainer = client.GetAvsStorageContainerResource(avsStorageContainerResourceId);
+
+ // get the collection of this AvsStorageContainerVolumeResource
+ AvsStorageContainerVolumeCollection collection = avsStorageContainer.GetAvsStorageContainerVolumes();
+
+ // invoke the operation
+ string volumeId = "cbdec-ddbb";
+ bool result = await collection.ExistsAsync(volumeId);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_AvsStorageContainerVolumesGet()
+ {
+ // Generated from example definition: 2024-11-01-preview/AvsStorageContainerVolumes_Get_MaximumSet_Gen.json
+ // this example is just showing the usage of "AvsStorageContainerVolume_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 AvsStorageContainerResource created on azure
+ // for more information of creating AvsStorageContainerResource, please refer to the document of AvsStorageContainerResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ string storageContainerName = "name";
+ ResourceIdentifier avsStorageContainerResourceId = AvsStorageContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, storageContainerName);
+ AvsStorageContainerResource avsStorageContainer = client.GetAvsStorageContainerResource(avsStorageContainerResourceId);
+
+ // get the collection of this AvsStorageContainerVolumeResource
+ AvsStorageContainerVolumeCollection collection = avsStorageContainer.GetAvsStorageContainerVolumes();
+
+ // invoke the operation
+ string volumeId = "cbdec-ddbb";
+ NullableResponse response = await collection.GetIfExistsAsync(volumeId);
+ AvsStorageContainerVolumeResource 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
+ AvsStorageContainerVolumeData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_AvsStorageContainerVolumeResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_AvsStorageContainerVolumeResource.cs
new file mode 100644
index 000000000000..d9ca5c2dffcb
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_AvsStorageContainerVolumeResource.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.PureStorageBlock.Models;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.PureStorageBlock.Samples
+{
+ public partial class Sample_AvsStorageContainerVolumeResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_AvsStorageContainerVolumesGet()
+ {
+ // Generated from example definition: 2024-11-01-preview/AvsStorageContainerVolumes_Get_MaximumSet_Gen.json
+ // this example is just showing the usage of "AvsStorageContainerVolume_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 AvsStorageContainerVolumeResource created on azure
+ // for more information of creating AvsStorageContainerVolumeResource, please refer to the document of AvsStorageContainerVolumeResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ string storageContainerName = "name";
+ string volumeId = "cbdec-ddbb";
+ ResourceIdentifier avsStorageContainerVolumeResourceId = AvsStorageContainerVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, storageContainerName, volumeId);
+ AvsStorageContainerVolumeResource avsStorageContainerVolume = client.GetAvsStorageContainerVolumeResource(avsStorageContainerVolumeResourceId);
+
+ // invoke the operation
+ AvsStorageContainerVolumeResource result = await avsStorageContainerVolume.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
+ AvsStorageContainerVolumeData 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_AvsStorageContainerVolumesDelete()
+ {
+ // Generated from example definition: 2024-11-01-preview/AvsStorageContainerVolumes_Delete_MaximumSet_Gen.json
+ // this example is just showing the usage of "AvsStorageContainerVolume_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 AvsStorageContainerVolumeResource created on azure
+ // for more information of creating AvsStorageContainerVolumeResource, please refer to the document of AvsStorageContainerVolumeResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ string storageContainerName = "name";
+ string volumeId = "cbdec-ddbb";
+ ResourceIdentifier avsStorageContainerVolumeResourceId = AvsStorageContainerVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, storageContainerName, volumeId);
+ AvsStorageContainerVolumeResource avsStorageContainerVolume = client.GetAvsStorageContainerVolumeResource(avsStorageContainerVolumeResourceId);
+
+ // invoke the operation
+ await avsStorageContainerVolume.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Update_AvsStorageContainerVolumesUpdate()
+ {
+ // Generated from example definition: 2024-11-01-preview/AvsStorageContainerVolumes_Update_MaximumSet_Gen.json
+ // this example is just showing the usage of "AvsStorageContainerVolume_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 AvsStorageContainerVolumeResource created on azure
+ // for more information of creating AvsStorageContainerVolumeResource, please refer to the document of AvsStorageContainerVolumeResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ string storageContainerName = "name";
+ string volumeId = "cbdec-ddbb";
+ ResourceIdentifier avsStorageContainerVolumeResourceId = AvsStorageContainerVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, storageContainerName, volumeId);
+ AvsStorageContainerVolumeResource avsStorageContainerVolume = client.GetAvsStorageContainerVolumeResource(avsStorageContainerVolumeResourceId);
+
+ // invoke the operation
+ AvsStorageContainerVolumePatch patch = new AvsStorageContainerVolumePatch
+ {
+ AvsStorageContainerVolumeUpdateSoftDeletion = new SoftDeletion(true),
+ };
+ ArmOperation lro = await avsStorageContainerVolume.UpdateAsync(WaitUntil.Completed, patch);
+ AvsStorageContainerVolumeResource 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
+ AvsStorageContainerVolumeData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_AvsVmCollection.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_AvsVmCollection.cs
new file mode 100644
index 000000000000..77f69e6d790f
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_AvsVmCollection.cs
@@ -0,0 +1,160 @@
+// 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.PureStorageBlock.Samples
+{
+ public partial class Sample_AvsVmCollection
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_AvsVmsGet()
+ {
+ // Generated from example definition: 2024-11-01-preview/AvsVms_Get_MaximumSet_Gen.json
+ // this example is just showing the usage of "AvsVm_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 StoragePoolResource created on azure
+ // for more information of creating StoragePoolResource, please refer to the document of StoragePoolResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ ResourceIdentifier storagePoolResourceId = StoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName);
+ StoragePoolResource storagePool = client.GetStoragePoolResource(storagePoolResourceId);
+
+ // get the collection of this AvsVmResource
+ AvsVmCollection collection = storagePool.GetAvsVms();
+
+ // invoke the operation
+ string avsVmId = "cbdec-ddbb";
+ AvsVmResource result = await collection.GetAsync(avsVmId);
+
+ // 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
+ AvsVmData 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_AvsVmsListByStoragePool()
+ {
+ // Generated from example definition: 2024-11-01-preview/AvsVms_ListByStoragePool_MaximumSet_Gen.json
+ // this example is just showing the usage of "AvsVm_ListByStoragePool" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details 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 StoragePoolResource created on azure
+ // for more information of creating StoragePoolResource, please refer to the document of StoragePoolResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ ResourceIdentifier storagePoolResourceId = StoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName);
+ StoragePoolResource storagePool = client.GetStoragePoolResource(storagePoolResourceId);
+
+ // get the collection of this AvsVmResource
+ AvsVmCollection collection = storagePool.GetAvsVms();
+
+ // invoke the operation and iterate over the result
+ await foreach (AvsVmResource 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
+ AvsVmData 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_AvsVmsGet()
+ {
+ // Generated from example definition: 2024-11-01-preview/AvsVms_Get_MaximumSet_Gen.json
+ // this example is just showing the usage of "AvsVm_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 StoragePoolResource created on azure
+ // for more information of creating StoragePoolResource, please refer to the document of StoragePoolResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ ResourceIdentifier storagePoolResourceId = StoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName);
+ StoragePoolResource storagePool = client.GetStoragePoolResource(storagePoolResourceId);
+
+ // get the collection of this AvsVmResource
+ AvsVmCollection collection = storagePool.GetAvsVms();
+
+ // invoke the operation
+ string avsVmId = "cbdec-ddbb";
+ bool result = await collection.ExistsAsync(avsVmId);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_AvsVmsGet()
+ {
+ // Generated from example definition: 2024-11-01-preview/AvsVms_Get_MaximumSet_Gen.json
+ // this example is just showing the usage of "AvsVm_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 StoragePoolResource created on azure
+ // for more information of creating StoragePoolResource, please refer to the document of StoragePoolResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ ResourceIdentifier storagePoolResourceId = StoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName);
+ StoragePoolResource storagePool = client.GetStoragePoolResource(storagePoolResourceId);
+
+ // get the collection of this AvsVmResource
+ AvsVmCollection collection = storagePool.GetAvsVms();
+
+ // invoke the operation
+ string avsVmId = "cbdec-ddbb";
+ NullableResponse response = await collection.GetIfExistsAsync(avsVmId);
+ AvsVmResource 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
+ AvsVmData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_AvsVmResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_AvsVmResource.cs
new file mode 100644
index 000000000000..8800faf72dfa
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_AvsVmResource.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.PureStorageBlock.Models;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.PureStorageBlock.Samples
+{
+ public partial class Sample_AvsVmResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_AvsVmsGet()
+ {
+ // Generated from example definition: 2024-11-01-preview/AvsVms_Get_MaximumSet_Gen.json
+ // this example is just showing the usage of "AvsVm_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 AvsVmResource created on azure
+ // for more information of creating AvsVmResource, please refer to the document of AvsVmResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ string avsVmId = "cbdec-ddbb";
+ ResourceIdentifier avsVmResourceId = AvsVmResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, avsVmId);
+ AvsVmResource avsVm = client.GetAvsVmResource(avsVmResourceId);
+
+ // invoke the operation
+ AvsVmResource result = await avsVm.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
+ AvsVmData 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_AvsVmsDelete()
+ {
+ // Generated from example definition: 2024-11-01-preview/AvsVms_Delete_MaximumSet_Gen.json
+ // this example is just showing the usage of "AvsVm_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 AvsVmResource created on azure
+ // for more information of creating AvsVmResource, please refer to the document of AvsVmResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ string avsVmId = "cbdec-ddbb";
+ ResourceIdentifier avsVmResourceId = AvsVmResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, avsVmId);
+ AvsVmResource avsVm = client.GetAvsVmResource(avsVmResourceId);
+
+ // invoke the operation
+ await avsVm.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Update_AvsVmsUpdate()
+ {
+ // Generated from example definition: 2024-11-01-preview/AvsVms_Update_MaximumSet_Gen.json
+ // this example is just showing the usage of "AvsVm_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 AvsVmResource created on azure
+ // for more information of creating AvsVmResource, please refer to the document of AvsVmResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ string avsVmId = "cbdec-ddbb";
+ ResourceIdentifier avsVmResourceId = AvsVmResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, avsVmId);
+ AvsVmResource avsVm = client.GetAvsVmResource(avsVmResourceId);
+
+ // invoke the operation
+ AvsVmPatch patch = new AvsVmPatch
+ {
+ AvsVmUpdateSoftDeletion = new SoftDeletion(true),
+ };
+ ArmOperation lro = await avsVm.UpdateAsync(WaitUntil.Completed, patch);
+ AvsVmResource 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
+ AvsVmData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_AvsVmVolumeCollection.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_AvsVmVolumeCollection.cs
new file mode 100644
index 000000000000..57e5246ce3f5
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_AvsVmVolumeCollection.cs
@@ -0,0 +1,164 @@
+// 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.PureStorageBlock.Samples
+{
+ public partial class Sample_AvsVmVolumeCollection
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_AvsVmVolumesGet()
+ {
+ // Generated from example definition: 2024-11-01-preview/AvsVmVolumes_Get_MaximumSet_Gen.json
+ // this example is just showing the usage of "AvsVmVolume_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 AvsVmResource created on azure
+ // for more information of creating AvsVmResource, please refer to the document of AvsVmResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ string avsVmId = "cbdec-ddbb";
+ ResourceIdentifier avsVmResourceId = AvsVmResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, avsVmId);
+ AvsVmResource avsVm = client.GetAvsVmResource(avsVmResourceId);
+
+ // get the collection of this AvsVmVolumeResource
+ AvsVmVolumeCollection collection = avsVm.GetAvsVmVolumes();
+
+ // invoke the operation
+ string volumeId = "cbdec-ddbb";
+ AvsVmVolumeResource result = await collection.GetAsync(volumeId);
+
+ // 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
+ AvsVmVolumeData 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_AvsVmVolumesListByAvsVm()
+ {
+ // Generated from example definition: 2024-11-01-preview/AvsVmVolumes_ListByAvsVm_MaximumSet_Gen.json
+ // this example is just showing the usage of "AvsVmVolume_ListByAvsVm" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details 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 AvsVmResource created on azure
+ // for more information of creating AvsVmResource, please refer to the document of AvsVmResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ string avsVmId = "cbdec-ddbb";
+ ResourceIdentifier avsVmResourceId = AvsVmResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, avsVmId);
+ AvsVmResource avsVm = client.GetAvsVmResource(avsVmResourceId);
+
+ // get the collection of this AvsVmVolumeResource
+ AvsVmVolumeCollection collection = avsVm.GetAvsVmVolumes();
+
+ // invoke the operation and iterate over the result
+ await foreach (AvsVmVolumeResource 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
+ AvsVmVolumeData 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_AvsVmVolumesGet()
+ {
+ // Generated from example definition: 2024-11-01-preview/AvsVmVolumes_Get_MaximumSet_Gen.json
+ // this example is just showing the usage of "AvsVmVolume_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 AvsVmResource created on azure
+ // for more information of creating AvsVmResource, please refer to the document of AvsVmResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ string avsVmId = "cbdec-ddbb";
+ ResourceIdentifier avsVmResourceId = AvsVmResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, avsVmId);
+ AvsVmResource avsVm = client.GetAvsVmResource(avsVmResourceId);
+
+ // get the collection of this AvsVmVolumeResource
+ AvsVmVolumeCollection collection = avsVm.GetAvsVmVolumes();
+
+ // invoke the operation
+ string volumeId = "cbdec-ddbb";
+ bool result = await collection.ExistsAsync(volumeId);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_AvsVmVolumesGet()
+ {
+ // Generated from example definition: 2024-11-01-preview/AvsVmVolumes_Get_MaximumSet_Gen.json
+ // this example is just showing the usage of "AvsVmVolume_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 AvsVmResource created on azure
+ // for more information of creating AvsVmResource, please refer to the document of AvsVmResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ string avsVmId = "cbdec-ddbb";
+ ResourceIdentifier avsVmResourceId = AvsVmResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, avsVmId);
+ AvsVmResource avsVm = client.GetAvsVmResource(avsVmResourceId);
+
+ // get the collection of this AvsVmVolumeResource
+ AvsVmVolumeCollection collection = avsVm.GetAvsVmVolumes();
+
+ // invoke the operation
+ string volumeId = "cbdec-ddbb";
+ NullableResponse response = await collection.GetIfExistsAsync(volumeId);
+ AvsVmVolumeResource 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
+ AvsVmVolumeData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_AvsVmVolumeResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_AvsVmVolumeResource.cs
new file mode 100644
index 000000000000..91b6ffa2fe27
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_AvsVmVolumeResource.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.PureStorageBlock.Models;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.PureStorageBlock.Samples
+{
+ public partial class Sample_AvsVmVolumeResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_AvsVmVolumesGet()
+ {
+ // Generated from example definition: 2024-11-01-preview/AvsVmVolumes_Get_MaximumSet_Gen.json
+ // this example is just showing the usage of "AvsVmVolume_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 AvsVmVolumeResource created on azure
+ // for more information of creating AvsVmVolumeResource, please refer to the document of AvsVmVolumeResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ string avsVmId = "cbdec-ddbb";
+ string volumeId = "cbdec-ddbb";
+ ResourceIdentifier avsVmVolumeResourceId = AvsVmVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, avsVmId, volumeId);
+ AvsVmVolumeResource avsVmVolume = client.GetAvsVmVolumeResource(avsVmVolumeResourceId);
+
+ // invoke the operation
+ AvsVmVolumeResource result = await avsVmVolume.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
+ AvsVmVolumeData 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_AvsVmVolumesDelete()
+ {
+ // Generated from example definition: 2024-11-01-preview/AvsVmVolumes_Delete_MaximumSet_Gen.json
+ // this example is just showing the usage of "AvsVmVolume_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 AvsVmVolumeResource created on azure
+ // for more information of creating AvsVmVolumeResource, please refer to the document of AvsVmVolumeResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ string avsVmId = "cbdec-ddbb";
+ string volumeId = "cbdec-ddbb";
+ ResourceIdentifier avsVmVolumeResourceId = AvsVmVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, avsVmId, volumeId);
+ AvsVmVolumeResource avsVmVolume = client.GetAvsVmVolumeResource(avsVmVolumeResourceId);
+
+ // invoke the operation
+ await avsVmVolume.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Update_AvsVmVolumesUpdate()
+ {
+ // Generated from example definition: 2024-11-01-preview/AvsVmVolumes_Update_MaximumSet_Gen.json
+ // this example is just showing the usage of "AvsVmVolume_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 AvsVmVolumeResource created on azure
+ // for more information of creating AvsVmVolumeResource, please refer to the document of AvsVmVolumeResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ string avsVmId = "cbdec-ddbb";
+ string volumeId = "cbdec-ddbb";
+ ResourceIdentifier avsVmVolumeResourceId = AvsVmVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, avsVmId, volumeId);
+ AvsVmVolumeResource avsVmVolume = client.GetAvsVmVolumeResource(avsVmVolumeResourceId);
+
+ // invoke the operation
+ AvsVmVolumePatch patch = new AvsVmVolumePatch
+ {
+ AvsVmVolumeUpdateSoftDeletion = new SoftDeletion(true),
+ };
+ ArmOperation lro = await avsVmVolume.UpdateAsync(WaitUntil.Completed, patch);
+ AvsVmVolumeResource 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
+ AvsVmVolumeData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_ReservationResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_ReservationResource.cs
new file mode 100644
index 000000000000..d6abb91ed7f1
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_ReservationResource.cs
@@ -0,0 +1,97 @@
+// 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.PureStorageBlock.Models;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.PureStorageBlock.Samples
+{
+ public partial class Sample_ReservationResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetResourceLimits_ReservationsGetResourceLimits()
+ {
+ // Generated from example definition: 2024-11-01-preview/Reservations_GetResourceLimits_MaximumSet_Gen.json
+ // this example is just showing the usage of "Reservations_GetResourceLimits" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details 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 ReservationResource created on azure
+ // for more information of creating ReservationResource, please refer to the document of ReservationResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string reservationName = "storagePoolname";
+ ResourceIdentifier reservationResourceId = ReservationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, reservationName);
+ ReservationResource reservation = client.GetReservationResource(reservationResourceId);
+
+ // invoke the operation
+ LimitDetails result = await reservation.GetResourceLimitsAsync();
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetBillingStatus_ReservationsGetBillingStatusMaximumSet()
+ {
+ // Generated from example definition: 2024-11-01-preview/Reservations_GetBillingStatus_MaximumSet_Gen.json
+ // this example is just showing the usage of "Reservations_GetBillingStatus" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details 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 ReservationResource created on azure
+ // for more information of creating ReservationResource, please refer to the document of ReservationResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string reservationName = "reservationname";
+ ResourceIdentifier reservationResourceId = ReservationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, reservationName);
+ ReservationResource reservation = client.GetReservationResource(reservationResourceId);
+
+ // invoke the operation
+ ReservationBillingStatus result = await reservation.GetBillingStatusAsync();
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetBillingReport_ReservationsGetBillingReportMaximumSet()
+ {
+ // Generated from example definition: 2024-11-01-preview/Reservations_GetBillingReport_MaximumSet_Gen.json
+ // this example is just showing the usage of "Reservations_GetBillingReport" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details 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 ReservationResource created on azure
+ // for more information of creating ReservationResource, please refer to the document of ReservationResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string reservationName = "reservationname";
+ ResourceIdentifier reservationResourceId = ReservationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, reservationName);
+ ReservationResource reservation = client.GetReservationResource(reservationResourceId);
+
+ // invoke the operation
+ ReservationBillingUsageReport result = await reservation.GetBillingReportAsync();
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_StoragePoolCollection.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_StoragePoolCollection.cs
new file mode 100644
index 000000000000..dea1efd9a6b4
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_StoragePoolCollection.cs
@@ -0,0 +1,208 @@
+// 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.PureStorageBlock.Models;
+using Azure.ResourceManager.Resources;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.PureStorageBlock.Samples
+{
+ public partial class Sample_StoragePoolCollection
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateOrUpdate_StoragePoolsCreate()
+ {
+ // Generated from example definition: 2024-11-01-preview/StoragePools_Create_MaximumSet_Gen.json
+ // this example is just showing the usage of "StoragePool_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
+ 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 = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this StoragePoolResource
+ StoragePoolCollection collection = resourceGroupResource.GetStoragePools();
+
+ // invoke the operation
+ string storagePoolName = "storagePoolname";
+ StoragePoolData data = new StoragePoolData(new AzureLocation("lonlc"))
+ {
+ Properties = new StoragePoolProperties("vknyl", new VnetInjection("tnlctolrxdvnkjiphlrdxq", "zbumtytyqwewjcyckwqchiypshv"), 17L, "xiowoxnbtcotutcmmrofvgdi"),
+ Identity = new ManagedServiceIdentity("None")
+ {
+ UserAssignedIdentities =
+{
+[new ResourceIdentifier("key4211")] = new UserAssignedIdentity()
+},
+ },
+ Tags =
+{
+["key7593"] = "vsyiygyurvwlfaezpuqu"
+},
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, storagePoolName, data);
+ StoragePoolResource 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
+ StoragePoolData 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_StoragePoolsGet()
+ {
+ // Generated from example definition: 2024-11-01-preview/StoragePools_Get_MaximumSet_Gen.json
+ // this example is just showing the usage of "StoragePool_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 = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this StoragePoolResource
+ StoragePoolCollection collection = resourceGroupResource.GetStoragePools();
+
+ // invoke the operation
+ string storagePoolName = "storagePoolname";
+ StoragePoolResource result = await collection.GetAsync(storagePoolName);
+
+ // 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
+ StoragePoolData 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_StoragePoolsListByResourceGroup()
+ {
+ // Generated from example definition: 2024-11-01-preview/StoragePools_ListByResourceGroup_MaximumSet_Gen.json
+ // this example is just showing the usage of "StoragePool_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 = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this StoragePoolResource
+ StoragePoolCollection collection = resourceGroupResource.GetStoragePools();
+
+ // invoke the operation and iterate over the result
+ await foreach (StoragePoolResource 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
+ StoragePoolData 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_StoragePoolsGet()
+ {
+ // Generated from example definition: 2024-11-01-preview/StoragePools_Get_MaximumSet_Gen.json
+ // this example is just showing the usage of "StoragePool_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 = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this StoragePoolResource
+ StoragePoolCollection collection = resourceGroupResource.GetStoragePools();
+
+ // invoke the operation
+ string storagePoolName = "storagePoolname";
+ bool result = await collection.ExistsAsync(storagePoolName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_StoragePoolsGet()
+ {
+ // Generated from example definition: 2024-11-01-preview/StoragePools_Get_MaximumSet_Gen.json
+ // this example is just showing the usage of "StoragePool_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 = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this StoragePoolResource
+ StoragePoolCollection collection = resourceGroupResource.GetStoragePools();
+
+ // invoke the operation
+ string storagePoolName = "storagePoolname";
+ NullableResponse response = await collection.GetIfExistsAsync(storagePoolName);
+ StoragePoolResource 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
+ StoragePoolData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_StoragePoolResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_StoragePoolResource.cs
new file mode 100644
index 000000000000..c02caa3b0ec6
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_StoragePoolResource.cs
@@ -0,0 +1,316 @@
+// 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.PureStorageBlock.Models;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.PureStorageBlock.Samples
+{
+ public partial class Sample_StoragePoolResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_StoragePoolsGet()
+ {
+ // Generated from example definition: 2024-11-01-preview/StoragePools_Get_MaximumSet_Gen.json
+ // this example is just showing the usage of "StoragePool_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 StoragePoolResource created on azure
+ // for more information of creating StoragePoolResource, please refer to the document of StoragePoolResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ ResourceIdentifier storagePoolResourceId = StoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName);
+ StoragePoolResource storagePool = client.GetStoragePoolResource(storagePoolResourceId);
+
+ // invoke the operation
+ StoragePoolResource result = await storagePool.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
+ StoragePoolData 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_StoragePoolsDelete()
+ {
+ // Generated from example definition: 2024-11-01-preview/StoragePools_Delete_MaximumSet_Gen.json
+ // this example is just showing the usage of "StoragePool_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 StoragePoolResource created on azure
+ // for more information of creating StoragePoolResource, please refer to the document of StoragePoolResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ ResourceIdentifier storagePoolResourceId = StoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName);
+ StoragePoolResource storagePool = client.GetStoragePoolResource(storagePoolResourceId);
+
+ // invoke the operation
+ await storagePool.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Update_StoragePoolsUpdate()
+ {
+ // Generated from example definition: 2024-11-01-preview/StoragePools_Update_MaximumSet_Gen.json
+ // this example is just showing the usage of "StoragePool_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 StoragePoolResource created on azure
+ // for more information of creating StoragePoolResource, please refer to the document of StoragePoolResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ ResourceIdentifier storagePoolResourceId = StoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName);
+ StoragePoolResource storagePool = client.GetStoragePoolResource(storagePoolResourceId);
+
+ // invoke the operation
+ StoragePoolPatch patch = new StoragePoolPatch
+ {
+ Identity = new ManagedServiceIdentity("None")
+ {
+ UserAssignedIdentities =
+{
+[new ResourceIdentifier("key4211")] = new UserAssignedIdentity()
+},
+ },
+ Tags =
+{
+["key9065"] = "ebgmkwxqewe"
+},
+ StoragePoolUpdateProvisionedBandwidthMbPerSec = 23L,
+ };
+ ArmOperation lro = await storagePool.UpdateAsync(WaitUntil.Completed, patch);
+ StoragePoolResource 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
+ StoragePoolData 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 GetHealthStatus_StoragePoolsGetHealthStatus()
+ {
+ // Generated from example definition: 2024-11-01-preview/StoragePools_GetHealthStatus_MaximumSet_Gen.json
+ // this example is just showing the usage of "StoragePools_GetHealthStatus" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details 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 StoragePoolResource created on azure
+ // for more information of creating StoragePoolResource, please refer to the document of StoragePoolResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ ResourceIdentifier storagePoolResourceId = StoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName);
+ StoragePoolResource storagePool = client.GetStoragePoolResource(storagePoolResourceId);
+
+ // invoke the operation
+ HealthResponse result = await storagePool.GetHealthStatusAsync();
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetAvsConnection_StoragePoolsGetAvsConnection()
+ {
+ // Generated from example definition: 2024-11-01-preview/StoragePools_GetAvsConnection_MaximumSet_Gen.json
+ // this example is just showing the usage of "StoragePools_GetAvsConnection" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details 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 StoragePoolResource created on azure
+ // for more information of creating StoragePoolResource, please refer to the document of StoragePoolResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ ResourceIdentifier storagePoolResourceId = StoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName);
+ StoragePoolResource storagePool = client.GetStoragePoolResource(storagePoolResourceId);
+
+ // invoke the operation
+ AvsConnection result = await storagePool.GetAvsConnectionAsync();
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetAvsStatus_StoragePoolsGetAvsStatus()
+ {
+ // Generated from example definition: 2024-11-01-preview/StoragePools_GetAvsStatus_MaximumSet_Gen.json
+ // this example is just showing the usage of "StoragePools_GetAvsStatus" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details 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 StoragePoolResource created on azure
+ // for more information of creating StoragePoolResource, please refer to the document of StoragePoolResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ ResourceIdentifier storagePoolResourceId = StoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName);
+ StoragePoolResource storagePool = client.GetStoragePoolResource(storagePoolResourceId);
+
+ // invoke the operation
+ AvsStatus result = await storagePool.GetAvsStatusAsync();
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task EnableAvsConnection_StoragePoolsEnableAvsConnection()
+ {
+ // Generated from example definition: 2024-11-01-preview/StoragePools_EnableAvsConnection_MaximumSet_Gen.json
+ // this example is just showing the usage of "StoragePools_EnableAvsConnection" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details 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 StoragePoolResource created on azure
+ // for more information of creating StoragePoolResource, please refer to the document of StoragePoolResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ ResourceIdentifier storagePoolResourceId = StoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName);
+ StoragePoolResource storagePool = client.GetStoragePoolResource(storagePoolResourceId);
+
+ // invoke the operation
+ StoragePoolEnableAvsConnectionPost properties = new StoragePoolEnableAvsConnectionPost("tghkgktlddwlszbeh");
+ await storagePool.EnableAvsConnectionAsync(WaitUntil.Completed, properties);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task DisableAvsConnection_StoragePoolsDisableAvsConnection()
+ {
+ // Generated from example definition: 2024-11-01-preview/StoragePools_DisableAvsConnection_MaximumSet_Gen.json
+ // this example is just showing the usage of "StoragePools_DisableAvsConnection" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details 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 StoragePoolResource created on azure
+ // for more information of creating StoragePoolResource, please refer to the document of StoragePoolResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ ResourceIdentifier storagePoolResourceId = StoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName);
+ StoragePoolResource storagePool = client.GetStoragePoolResource(storagePoolResourceId);
+
+ // invoke the operation
+ await storagePool.DisableAvsConnectionAsync(WaitUntil.Completed);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task FinalizeAvsConnection_StoragePoolsFinalizeAvsConnection()
+ {
+ // Generated from example definition: 2024-11-01-preview/StoragePools_FinalizeAvsConnection_MaximumSet_Gen.json
+ // this example is just showing the usage of "StoragePools_FinalizeAvsConnection" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details 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 StoragePoolResource created on azure
+ // for more information of creating StoragePoolResource, please refer to the document of StoragePoolResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ ResourceIdentifier storagePoolResourceId = StoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName);
+ StoragePoolResource storagePool = client.GetStoragePoolResource(storagePoolResourceId);
+
+ // invoke the operation
+ StoragePoolFinalizeAvsConnectionPost properties = new StoragePoolFinalizeAvsConnectionPost
+ {
+ ServiceInitializationDataEnc = "hlgzaxrohv",
+ ServiceInitializationData = new ServiceInitializationData
+ {
+ ServiceAccountUsername = "axchgm",
+ ServiceAccountPassword = "i",
+ VSphereIP = "lhbajnykbznxnxpxozyfdjaciennks",
+ VSphereCertificate = "s",
+ },
+ };
+ await storagePool.FinalizeAvsConnectionAsync(WaitUntil.Completed, properties);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task RepairAvsConnection_StoragePoolsRepairAvsConnection()
+ {
+ // Generated from example definition: 2024-11-01-preview/StoragePools_RepairAvsConnection_MaximumSet_Gen.json
+ // this example is just showing the usage of "StoragePools_RepairAvsConnection" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details 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 StoragePoolResource created on azure
+ // for more information of creating StoragePoolResource, please refer to the document of StoragePoolResource
+ string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ string resourceGroupName = "rgpurestorage";
+ string storagePoolName = "storagePoolname";
+ ResourceIdentifier storagePoolResourceId = StoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName);
+ StoragePoolResource storagePool = client.GetStoragePoolResource(storagePoolResourceId);
+
+ // invoke the operation
+ await storagePool.RepairAvsConnectionAsync(WaitUntil.Completed);
+
+ Console.WriteLine("Succeeded");
+ }
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs
new file mode 100644
index 000000000000..b4feb81b5265
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs
@@ -0,0 +1,50 @@
+// 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.Resources;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.PureStorageBlock.Samples
+{
+ public partial class Sample_SubscriptionResourceExtensions
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetStoragePools_StoragePoolsListBySubscription()
+ {
+ // Generated from example definition: 2024-11-01-preview/StoragePools_ListBySubscription_MaximumSet_Gen.json
+ // this example is just showing the usage of "StoragePool_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 = "BC47D6CC-AA80-4374-86F8-19D94EC70666";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (StoragePoolResource item in subscriptionResource.GetStoragePoolsAsync())
+ {
+ // 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
+ StoragePoolData 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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Azure.ResourceManager.PureStorageBlock.csproj b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Azure.ResourceManager.PureStorageBlock.csproj
new file mode 100644
index 000000000000..fd783d26fdf9
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Azure.ResourceManager.PureStorageBlock.csproj
@@ -0,0 +1,8 @@
+
+
+ Azure Resource Manager client SDK for Azure resource provider PureStorageBlock.
+ 1.0.0-beta.1
+ azure;management;arm;resource manager;purestorageblock
+ Azure.ResourceManager.PureStorageBlock
+
+
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/ArmPureStorageBlockModelFactory.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/ArmPureStorageBlockModelFactory.cs
new file mode 100644
index 000000000000..5ff68525ad13
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/ArmPureStorageBlockModelFactory.cs
@@ -0,0 +1,535 @@
+// 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;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.PureStorageBlock.Models
+{
+ /// Model factory for models.
+ public static partial class ArmPureStorageBlockModelFactory
+ {
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The tags.
+ /// The location.
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static ReservationData ReservationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ReservationPropertiesBaseResourceProperties properties = null)
+ {
+ tags ??= new Dictionary();
+
+ return new ReservationData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ tags,
+ location,
+ properties,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Pure Storage's internal ID for the reservation.
+ /// Marketplace details.
+ /// User details.
+ /// Provisioning state of the resource.
+ /// A new instance for mocking.
+ public static ReservationPropertiesBaseResourceProperties ReservationPropertiesBaseResourceProperties(string reservationInternalId = null, MarketplaceDetails marketplace = null, UserDetails user = null, ProvisioningState? provisioningState = null)
+ {
+ return new ReservationPropertiesBaseResourceProperties(reservationInternalId, marketplace, user, provisioningState, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Marketplace subscription ID.
+ /// Marketplace subscription status.
+ /// Offer details of the marketplace subscription.
+ /// A new instance for mocking.
+ public static MarketplaceDetails MarketplaceDetails(string subscriptionId = null, MarketplaceSubscriptionStatus? subscriptionStatus = null, OfferDetails offerDetails = null)
+ {
+ return new MarketplaceDetails(subscriptionId, subscriptionStatus, offerDetails, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Limits used for storage pool resources.
+ /// Limits used for volume resources.
+ /// internal.
+ /// internal.
+ /// A new instance for mocking.
+ public static LimitDetails LimitDetails(StoragePoolLimits storagePool = null, RangeLimits volumeProvisionedSize = null, ProtectionPolicyLimits protectionPolicy = null, PerformancePolicyLimits performancePolicy = null)
+ {
+ return new LimitDetails(storagePool, volumeProvisionedSize != null ? new VolumeLimits(volumeProvisionedSize, serializedAdditionalRawData: null) : null, protectionPolicy, performancePolicy, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Allowed provisioned bandwidth range for a storage pool, in MB/s.
+ /// Allowed provisioned IOPS range for a storage pool, as a number of operations.
+ /// List of physical availability zones in the region in which storage pools can be deployed; some Azure regions do not support the necessary resources in all availability zones.
+ /// A new instance for mocking.
+ public static StoragePoolLimits StoragePoolLimits(RangeLimits provisionedBandwidthMbPerSec = null, RangeLimits provisionedIops = null, IEnumerable physicalAvailabilityZones = null)
+ {
+ physicalAvailabilityZones ??= new List();
+
+ return new StoragePoolLimits(provisionedBandwidthMbPerSec, provisionedIops, physicalAvailabilityZones?.ToList(), serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Minimum value of the property.
+ /// Maximum value of the property.
+ /// A new instance for mocking.
+ public static RangeLimits RangeLimits(long min = default, long max = default)
+ {
+ return new RangeLimits(min, max, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// internal.
+ /// internal.
+ /// A new instance for mocking.
+ public static ProtectionPolicyLimits ProtectionPolicyLimits(RangeLimits frequency = null, RangeLimits retention = null)
+ {
+ return new ProtectionPolicyLimits(frequency, retention, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// internal.
+ /// internal.
+ /// A new instance for mocking.
+ public static PerformancePolicyLimits PerformancePolicyLimits(RangeLimits iopsLimit = null, RangeLimits bandwidthLimit = null)
+ {
+ return new PerformancePolicyLimits(iopsLimit, bandwidthLimit, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Timestamp for the latest update of this billing status, in RFC 3339 format.
+ /// Total used capacity as reported by associated storage pools. In bytes.
+ /// How many associated storage pools reported low data reduction ratio (DRR).
+ /// Weighted average of the data-reduction ratio for all associated pools.
+ /// The sum of total used capacity for all pools with low DRR, if the DRR penalty applies. In bytes.
+ /// Extra capacity added because of low DRR storage pools; In bytes.
+ /// Extra capacity added when rounding up low-usage pools to 30TiB. In bytes.
+ /// Extra capacity discounted due to plan forgiving some low-DRR usage. In bytes.
+ /// Total used capacity actually billed. In bytes.
+ /// Total used capacity included in plan. In bytes.
+ /// Total used capacity reported at on-demand price. In bytes.
+ /// The sum of all performance settings across the pools under this reservation. In MB per second.
+ /// Total performance amount included in plan. In bytes per second.
+ /// Total performance amount reported at on-demand price. In MB per second.
+ /// A new instance for mocking.
+ public static ReservationBillingStatus ReservationBillingStatus(string timestamp = null, long totalUsedCapacityReported = default, int lowDrrPoolCount = default, double drrWeightedAverage = default, long totalNonReducibleReported = default, long extraUsedCapacityNonReducible = default, long extraUsedCapacityLowUsageRounding = default, long extraUsedCapacityNonReduciblePlanDiscount = default, long totalUsedCapacityBilled = default, long totalUsedCapacityIncludedPlan = default, long totalUsedCapacityOverage = default, long totalPerformanceReported = default, long totalPerformanceIncludedPlan = default, long totalPerformanceOverage = default)
+ {
+ return new ReservationBillingStatus(
+ timestamp,
+ totalUsedCapacityReported,
+ lowDrrPoolCount,
+ drrWeightedAverage,
+ totalNonReducibleReported,
+ extraUsedCapacityNonReducible,
+ extraUsedCapacityLowUsageRounding,
+ extraUsedCapacityNonReduciblePlanDiscount,
+ totalUsedCapacityBilled,
+ totalUsedCapacityIncludedPlan,
+ totalUsedCapacityOverage,
+ totalPerformanceReported,
+ totalPerformanceIncludedPlan,
+ totalPerformanceOverage,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Latest formatted billing report for this reservation.
+ /// A list of detailed billing usage properties.
+ /// Overall status message of the billing usage report.
+ /// A new instance for mocking.
+ public static ReservationBillingUsageReport ReservationBillingUsageReport(string timestamp = null, IEnumerable billingUsageProperties = null, string overallStatusMessage = null)
+ {
+ billingUsageProperties ??= new List();
+
+ return new ReservationBillingUsageReport(timestamp, billingUsageProperties?.ToList(), overallStatusMessage, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Unique identifier for the billing usage property.
+ /// Name of the billing usage property.
+ /// Current value of the billing usage property.
+ /// Previous value of the billing usage property.
+ /// Severity level of the usage.
+ /// Status message for the billing usage against a property.
+ /// Optional list of sub-properties providing additional details.
+ /// A new instance for mocking.
+ public static BillingUsageProperty BillingUsageProperty(string propertyId = null, string propertyName = null, string currentValue = null, string previousValue = null, UsageSeverity severity = default, string statusMessage = null, IEnumerable subProperties = null)
+ {
+ subProperties ??= new List();
+
+ return new BillingUsageProperty(
+ propertyId,
+ propertyName,
+ currentValue,
+ previousValue,
+ severity,
+ statusMessage,
+ subProperties?.ToList(),
+ 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.
+ /// The managed service identities assigned to this resource.
+ /// A new instance for mocking.
+ public static StoragePoolData StoragePoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, StoragePoolProperties properties = null, ManagedServiceIdentity identity = null)
+ {
+ tags ??= new Dictionary();
+
+ return new StoragePoolData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ tags,
+ location,
+ properties,
+ identity,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Pure Storage's internal ID of the storage pool.
+ /// Azure Availability Zone the Pool is located in.
+ /// Network properties of the storage pool.
+ /// How long a destroyed object is kept before being eradicated, in seconds.
+ /// Total bandwidth provisioned for the pool, in MB/s.
+ /// Total I/O operations per second (IOPS) provisioned for the pool.
+ /// AVS connection state summary.
+ /// Provisioning state of the resource.
+ /// Azure resource ID of the Pure Storage Cloud service (reservation resource) this storage pool belongs to.
+ /// A new instance for mocking.
+ public static StoragePoolProperties StoragePoolProperties(string storagePoolInternalId = null, string availabilityZone = null, VnetInjection vnetInjection = null, long? dataRetentionPeriod = null, long provisionedBandwidthMbPerSec = default, long? provisionedIops = null, AzureVmwareService avs = null, ProvisioningState? provisioningState = null, string reservationResourceId = null)
+ {
+ return new StoragePoolProperties(
+ storagePoolInternalId,
+ availabilityZone,
+ vnetInjection,
+ dataRetentionPeriod,
+ provisionedBandwidthMbPerSec,
+ provisionedIops,
+ avs,
+ provisioningState,
+ reservationResourceId,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// If true, an AVS SDDC is successfully connected to the storage pool.
+ /// Azure resource ID of the AVS SDDC the storage pool is connected to.
+ /// A new instance for mocking.
+ public static AzureVmwareService AzureVmwareService(bool avsEnabled = default, string sddcResourceId = null)
+ {
+ return new AzureVmwareService(avsEnabled, sddcResourceId, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Health metrics.
+ /// List of health alerts.
+ /// A new instance for mocking.
+ public static HealthResponse HealthResponse(HealthDetails health = null, IEnumerable alerts = null)
+ {
+ alerts ??= new List();
+
+ return new HealthResponse(health, alerts?.ToList(), serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// How full the pool is right now, in %, compared to the maximum size it can grow to; estimated based on current usage and data reduction ratio.
+ /// Bandwidth usage metrics.
+ /// IOPS usage metrics.
+ /// Storage space usage.
+ /// Data reduction ratio achieved on this pool.
+ /// Estimated maximum capacity of the pool, in bytes, based on current usage and data reduction ratio.
+ /// A new instance for mocking.
+ public static HealthDetails HealthDetails(double usedCapacityPercentage = default, BandwidthUsage bandwidthUsage = null, IopsUsage iopsUsage = null, Space space = null, double dataReductionRatio = default, long estimatedMaxCapacity = default)
+ {
+ return new HealthDetails(
+ usedCapacityPercentage,
+ bandwidthUsage,
+ iopsUsage,
+ space,
+ dataReductionRatio,
+ estimatedMaxCapacity,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Number of bytes written and read per second (maximum value over the last 10 minutes).
+ /// Bandwidth value currently provisioned for the storage pool, in MB/s.
+ /// Maximum bandwidth value that can be provisioned for the storage pool.
+ /// A new instance for mocking.
+ public static BandwidthUsage BandwidthUsage(long current = default, long provisioned = default, long max = default)
+ {
+ return new BandwidthUsage(current, provisioned, max, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Current number of IOPS (maximum value over the last 10 minutes).
+ /// IOPS value currently provisioned for the storage pool.
+ /// Maximum IOPS value that can be provisioned for the storage pool.
+ /// A new instance for mocking.
+ public static IopsUsage IopsUsage(long current = default, long provisioned = default, long max = default)
+ {
+ return new IopsUsage(current, provisioned, max, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Total space occupied by customer data (i.e., being billed for), in bytes.
+ /// Unique space occupied by customer data, in bytes; for a volume, this is the amount of storage that would be freed by deleting the volume, since snapshot and shared data would be kept.
+ /// Space occupied by data unique to one or more snapshots, in bytes.
+ /// Space occupied by duplicated data, meaning data shared with other volumes and snapshots as a result of data deduplication, in bytes.
+ /// A new instance for mocking.
+ public static Space Space(long totalUsed = default, long unique = default, long snapshots = default, long shared = default)
+ {
+ return new Space(totalUsed, unique, snapshots, shared, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Severity level.
+ /// A short description of the alert.
+ /// A new instance for mocking.
+ public static Alert Alert(AlertLevel level = default, string message = null)
+ {
+ return new Alert(level, message, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Indicates whether service initialization is complete.
+ /// Encoded service account credentials alongside connection information.
+ /// Explicit service account credentials.
+ /// A new instance for mocking.
+ public static AvsConnection AvsConnection(bool serviceInitializationCompleted = default, string serviceInitializationHandleEnc = null, ServiceInitializationHandle serviceInitializationHandle = null)
+ {
+ return new AvsConnection(serviceInitializationCompleted, serviceInitializationHandleEnc, serviceInitializationHandle, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Azure resource ID of the AVS SDDC the pool is connecting to.
+ /// Requested service account username.
+ /// A new instance for mocking.
+ public static ServiceInitializationHandle ServiceInitializationHandle(string sddcResourceId = null, string serviceAccountUsername = null)
+ {
+ return new ServiceInitializationHandle(sddcResourceId, serviceAccountUsername, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// If true, an AVS connection has been successfully completed.
+ /// Human-readable current AVS connection status.
+ /// Azure resource ID of the AVS SDDC the pool is connected to.
+ /// A new instance for mocking.
+ public static AvsStatus AvsStatus(bool avsEnabled = default, string currentConnectionStatus = null, string sddcResourceId = null)
+ {
+ return new AvsStatus(avsEnabled, currentConnectionStatus, sddcResourceId, 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 AvsStorageContainerData AvsStorageContainerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AvsStorageContainerProperties properties = null)
+ {
+ return new AvsStorageContainerData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ properties,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Storage space usage.
+ /// Name of the storage container.
+ /// Maximum amount of bytes that can be provisioned in this storage container; it must be a multiple of 512; each time a volume is provisioned in this container, its provisionedSize will be counted against the provisionLimit and the provisioning will fail if it goes over (minimum: 1048576 (1MiB), maximum: 4503599627370496 (4PiB)); by default it is unrestricted.
+ /// VMware datastore associated with this storage container (if any).
+ /// Whether the datastore is mounted in VMware or not.
+ /// A new instance for mocking.
+ public static AvsStorageContainerProperties AvsStorageContainerProperties(Space space = null, string resourceName = null, long? provisionedLimit = null, string datastore = null, bool? mounted = null)
+ {
+ return new AvsStorageContainerProperties(
+ space,
+ resourceName,
+ provisionedLimit,
+ datastore,
+ mounted,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// If false, the resource is active; if true, the resource has been destroyed; resources can be soft-deleted by setting destroyed to true, and recovered by setting it to false.
+ /// Date at which the resource will be eradicated and impossible to recover, as an RFC 3339 timestamp; invalid if destroyed is false;.
+ /// A new instance for mocking.
+ public static SoftDeletion SoftDeletion(bool destroyed = default, string eradicationTimestamp = null)
+ {
+ return new SoftDeletion(destroyed, eradicationTimestamp, 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 AvsStorageContainerVolumeData AvsStorageContainerVolumeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, VolumeProperties properties = null)
+ {
+ return new AvsStorageContainerVolumeData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ properties,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Pure Storage's internal ID for the storage pool containing the volume.
+ /// Azure Resource ID of the storage pool containing this volume.
+ /// Pure Storage's internal ID for the volume.
+ /// Human-readable name of the volume.
+ /// Storage space usage.
+ /// Volume's soft-deletion state.
+ /// Volume creation date, as an RFC 3339 timestamp.
+ /// Currently provisioned size of the volume, in bytes.
+ /// Specify which control plane handles the lifecycle of the volume.
+ /// AVS-specific volume information.
+ /// Provisioning state of the resource.
+ /// A new instance for mocking.
+ public static VolumeProperties VolumeProperties(string storagePoolInternalId = null, string storagePoolResourceId = null, string volumeInternalId = null, string displayName = null, Space space = null, SoftDeletion softDeletion = null, string createdTimestamp = null, long? provisionedSize = null, VolumeType? volumeType = null, AvsDiskDetails avs = null, ResourceProvisioningState? provisioningState = null)
+ {
+ return new VolumeProperties(
+ storagePoolInternalId,
+ storagePoolResourceId,
+ volumeInternalId,
+ displayName,
+ space,
+ softDeletion,
+ createdTimestamp,
+ provisionedSize,
+ volumeType,
+ avs,
+ provisioningState,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// VMware ID of the disk/volume.
+ /// VMware name of the disk/volume.
+ /// Name of the top-level folder in the datastore that contains the disk/volume.
+ /// VMware ID assigned to the disk/volume.
+ /// Azure resource ID of the AVS VM connected to this disk/volume.
+ /// Name of the AVS VM connected to this disk/volume.
+ /// Azure resource ID of the AVS storage container containing this disk/volume.
+ /// A new instance for mocking.
+ public static AvsDiskDetails AvsDiskDetails(string diskId = null, string diskName = null, string folder = null, string avsVmInternalId = null, string avsVmResourceId = null, string avsVmName = null, string avsStorageContainerResourceId = null)
+ {
+ return new AvsDiskDetails(
+ diskId,
+ diskName,
+ folder,
+ avsVmInternalId,
+ avsVmResourceId,
+ avsVmName,
+ avsStorageContainerResourceId,
+ 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 AvsVmData AvsVmData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AvsVmProperties properties = null)
+ {
+ return new AvsVmData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ properties,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Pure Storage's internal ID for the storage pool.
+ /// Azure resource ID of the storage pool.
+ /// Human-readable name of the AVS VM.
+ /// Date at which the AVS VM was created, as an RFC 3339 timestamp.
+ /// AVS VM's soft-deletion state.
+ /// Specify which control plane handles the lifecycle of the volume container.
+ /// AVS VM details.
+ /// Contains properties related to used Flash space.
+ /// Provisioning state of the resource.
+ /// A new instance for mocking.
+ public static AvsVmProperties AvsVmProperties(string storagePoolInternalId = null, string storagePoolResourceId = null, string displayName = null, string createdTimestamp = null, SoftDeletion softDeletion = null, VolumeContainerType? volumeContainerType = null, AvsVmDetails avs = null, Space space = null, ResourceProvisioningState? provisioningState = null)
+ {
+ return new AvsVmProperties(
+ storagePoolInternalId,
+ storagePoolResourceId,
+ displayName,
+ createdTimestamp,
+ softDeletion,
+ volumeContainerType,
+ avs,
+ space,
+ provisioningState,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// ID of the AVS VM using this set of volumes.
+ /// Name of the VMware VM using this set of volumes.
+ /// Type of the VMware VM using this set of volumes.
+ /// Pure Storage's internal ID for this AVS VM.
+ /// A new instance for mocking.
+ public static AvsVmDetails AvsVmDetails(string vmId = null, string vmName = null, VmType vmType = default, string avsVmInternalId = null)
+ {
+ return new AvsVmDetails(vmId, vmName, vmType, avsVmInternalId, 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 AvsVmVolumeData AvsVmVolumeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, VolumeProperties properties = null)
+ {
+ return new AvsVmVolumeData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ properties,
+ serializedAdditionalRawData: null);
+ }
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsStorageContainerCollection.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsStorageContainerCollection.cs
new file mode 100644
index 000000000000..f78c35d233a2
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsStorageContainerCollection.cs
@@ -0,0 +1,395 @@
+// 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.PureStorageBlock
+{
+ ///
+ /// 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 GetAvsStorageContainers method from an instance of .
+ ///
+ public partial class AvsStorageContainerCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _avsStorageContainerClientDiagnostics;
+ private readonly AvsStorageContainersRestOperations _avsStorageContainerRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected AvsStorageContainerCollection()
+ {
+ }
+
+ /// 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 AvsStorageContainerCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _avsStorageContainerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PureStorageBlock", AvsStorageContainerResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(AvsStorageContainerResource.ResourceType, out string avsStorageContainerApiVersion);
+ _avsStorageContainerRestClient = new AvsStorageContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, avsStorageContainerApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != StoragePoolResource.ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, StoragePoolResource.ResourceType), nameof(id));
+ }
+
+ ///
+ /// Get an AVS storage container
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsStorageContainer_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Name of the storage container.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetAsync(string storageContainerName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(storageContainerName, nameof(storageContainerName));
+
+ using var scope = _avsStorageContainerClientDiagnostics.CreateScope("AvsStorageContainerCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = await _avsStorageContainerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, storageContainerName, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new AvsStorageContainerResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get an AVS storage container
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsStorageContainer_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Name of the storage container.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Get(string storageContainerName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(storageContainerName, nameof(storageContainerName));
+
+ using var scope = _avsStorageContainerClientDiagnostics.CreateScope("AvsStorageContainerCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = _avsStorageContainerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, storageContainerName, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new AvsStorageContainerResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// List AVS storage containers by storage pool
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers
+ ///
+ /// -
+ /// Operation Id
+ /// AvsStorageContainer_ListByStoragePool
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-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) => _avsStorageContainerRestClient.CreateListByStoragePoolRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _avsStorageContainerRestClient.CreateListByStoragePoolNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AvsStorageContainerResource(Client, AvsStorageContainerData.DeserializeAvsStorageContainerData(e)), _avsStorageContainerClientDiagnostics, Pipeline, "AvsStorageContainerCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// List AVS storage containers by storage pool
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers
+ ///
+ /// -
+ /// Operation Id
+ /// AvsStorageContainer_ListByStoragePool
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-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) => _avsStorageContainerRestClient.CreateListByStoragePoolRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _avsStorageContainerRestClient.CreateListByStoragePoolNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AvsStorageContainerResource(Client, AvsStorageContainerData.DeserializeAvsStorageContainerData(e)), _avsStorageContainerClientDiagnostics, Pipeline, "AvsStorageContainerCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsStorageContainer_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Name of the storage container.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> ExistsAsync(string storageContainerName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(storageContainerName, nameof(storageContainerName));
+
+ using var scope = _avsStorageContainerClientDiagnostics.CreateScope("AvsStorageContainerCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = await _avsStorageContainerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, storageContainerName, 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/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsStorageContainer_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Name of the storage container.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Exists(string storageContainerName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(storageContainerName, nameof(storageContainerName));
+
+ using var scope = _avsStorageContainerClientDiagnostics.CreateScope("AvsStorageContainerCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = _avsStorageContainerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, storageContainerName, 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/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsStorageContainer_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Name of the storage container.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetIfExistsAsync(string storageContainerName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(storageContainerName, nameof(storageContainerName));
+
+ using var scope = _avsStorageContainerClientDiagnostics.CreateScope("AvsStorageContainerCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = await _avsStorageContainerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, storageContainerName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new AvsStorageContainerResource(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/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsStorageContainer_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Name of the storage container.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual NullableResponse GetIfExists(string storageContainerName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(storageContainerName, nameof(storageContainerName));
+
+ using var scope = _avsStorageContainerClientDiagnostics.CreateScope("AvsStorageContainerCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = _avsStorageContainerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, storageContainerName, cancellationToken: cancellationToken);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new AvsStorageContainerResource(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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsStorageContainerData.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsStorageContainerData.Serialization.cs
new file mode 100644
index 000000000000..f62994521390
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsStorageContainerData.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;
+using Azure.ResourceManager.Models;
+using Azure.ResourceManager.PureStorageBlock.Models;
+
+namespace Azure.ResourceManager.PureStorageBlock
+{
+ public partial class AvsStorageContainerData : 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(AvsStorageContainerData)} does not support writing '{format}' format.");
+ }
+
+ base.JsonModelWriteCore(writer, options);
+ if (Optional.IsDefined(Properties))
+ {
+ writer.WritePropertyName("properties"u8);
+ writer.WriteObjectValue(Properties, options);
+ }
+ }
+
+ AvsStorageContainerData 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(AvsStorageContainerData)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeAvsStorageContainerData(document.RootElement, options);
+ }
+
+ internal static AvsStorageContainerData DeserializeAvsStorageContainerData(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ AvsStorageContainerProperties 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 = AvsStorageContainerProperties.DeserializeAvsStorageContainerProperties(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 = JsonSerializer.Deserialize(property.Value.GetRawText());
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new AvsStorageContainerData(
+ 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);
+ default:
+ throw new FormatException($"The model {nameof(AvsStorageContainerData)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ AvsStorageContainerData 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 DeserializeAvsStorageContainerData(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(AvsStorageContainerData)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsStorageContainerData.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsStorageContainerData.cs
new file mode 100644
index 000000000000..ce8171061050
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsStorageContainerData.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.PureStorageBlock.Models;
+
+namespace Azure.ResourceManager.PureStorageBlock
+{
+ ///
+ /// A class representing the AvsStorageContainer data model.
+ /// AVS storage container resource type, representing a VMware storage container in a storage pool, which can be associated to and mounted as a datastore
+ ///
+ public partial class AvsStorageContainerData : 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 .
+ internal AvsStorageContainerData()
+ {
+ }
+
+ /// 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 AvsStorageContainerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AvsStorageContainerProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
+ {
+ Properties = properties;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// The resource-specific properties for this resource.
+ public AvsStorageContainerProperties Properties { get; }
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsStorageContainerResource.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsStorageContainerResource.Serialization.cs
new file mode 100644
index 000000000000..d6b632d6f1bc
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsStorageContainerResource.Serialization.cs
@@ -0,0 +1,26 @@
+// 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.PureStorageBlock
+{
+ public partial class AvsStorageContainerResource : IJsonModel
+ {
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options);
+
+ AvsStorageContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options);
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options);
+
+ AvsStorageContainerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options);
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options);
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsStorageContainerResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsStorageContainerResource.cs
new file mode 100644
index 000000000000..1d5e97a15020
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsStorageContainerResource.cs
@@ -0,0 +1,324 @@
+// 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.PureStorageBlock
+{
+ ///
+ /// A Class representing an AvsStorageContainer 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 GetAvsStorageContainerResource method.
+ /// Otherwise you can get one from its parent resource using the GetAvsStorageContainer method.
+ ///
+ public partial class AvsStorageContainerResource : ArmResource
+ {
+ /// Generate the resource identifier of a instance.
+ /// The subscriptionId.
+ /// The resourceGroupName.
+ /// The storagePoolName.
+ /// The storageContainerName.
+ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string storagePoolName, string storageContainerName)
+ {
+ var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ private readonly ClientDiagnostics _avsStorageContainerClientDiagnostics;
+ private readonly AvsStorageContainersRestOperations _avsStorageContainerRestClient;
+ private readonly AvsStorageContainerData _data;
+
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "PureStorage.Block/storagePools/avsStorageContainers";
+
+ /// Initializes a new instance of the class for mocking.
+ protected AvsStorageContainerResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal AvsStorageContainerResource(ArmClient client, AvsStorageContainerData 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 AvsStorageContainerResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _avsStorageContainerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PureStorageBlock", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string avsStorageContainerApiVersion);
+ _avsStorageContainerRestClient = new AvsStorageContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, avsStorageContainerApiVersion);
+#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 AvsStorageContainerData 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 AvsStorageContainerVolumeResources in the AvsStorageContainer.
+ /// An object representing collection of AvsStorageContainerVolumeResources and their operations over a AvsStorageContainerVolumeResource.
+ public virtual AvsStorageContainerVolumeCollection GetAvsStorageContainerVolumes()
+ {
+ return GetCachedClient(client => new AvsStorageContainerVolumeCollection(client, Id));
+ }
+
+ ///
+ /// Get a volume in an AVS storage container
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes/{volumeId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsStorageContainerVolume_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// ID of the volume in the storage container.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual async Task> GetAvsStorageContainerVolumeAsync(string volumeId, CancellationToken cancellationToken = default)
+ {
+ return await GetAvsStorageContainerVolumes().GetAsync(volumeId, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get a volume in an AVS storage container
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes/{volumeId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsStorageContainerVolume_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// ID of the volume in the storage container.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual Response GetAvsStorageContainerVolume(string volumeId, CancellationToken cancellationToken = default)
+ {
+ return GetAvsStorageContainerVolumes().Get(volumeId, cancellationToken);
+ }
+
+ ///
+ /// Get an AVS storage container
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsStorageContainer_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _avsStorageContainerClientDiagnostics.CreateScope("AvsStorageContainerResource.Get");
+ scope.Start();
+ try
+ {
+ var response = await _avsStorageContainerRestClient.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 AvsStorageContainerResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get an AVS storage container
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsStorageContainer_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using var scope = _avsStorageContainerClientDiagnostics.CreateScope("AvsStorageContainerResource.Get");
+ scope.Start();
+ try
+ {
+ var response = _avsStorageContainerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new AvsStorageContainerResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete an AVS storage container
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsStorageContainer_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-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 = _avsStorageContainerClientDiagnostics.CreateScope("AvsStorageContainerResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = await _avsStorageContainerRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false);
+ var operation = new PureStorageBlockArmOperation(_avsStorageContainerClientDiagnostics, Pipeline, _avsStorageContainerRestClient.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 an AVS storage container
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsStorageContainer_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-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 = _avsStorageContainerClientDiagnostics.CreateScope("AvsStorageContainerResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = _avsStorageContainerRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken);
+ var operation = new PureStorageBlockArmOperation(_avsStorageContainerClientDiagnostics, Pipeline, _avsStorageContainerRestClient.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;
+ }
+ }
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsStorageContainerVolumeCollection.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsStorageContainerVolumeCollection.cs
new file mode 100644
index 000000000000..be140fbd4ef8
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsStorageContainerVolumeCollection.cs
@@ -0,0 +1,395 @@
+// 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.PureStorageBlock
+{
+ ///
+ /// 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 GetAvsStorageContainerVolumes method from an instance of .
+ ///
+ public partial class AvsStorageContainerVolumeCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _avsStorageContainerVolumeClientDiagnostics;
+ private readonly AvsStorageContainerVolumesRestOperations _avsStorageContainerVolumeRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected AvsStorageContainerVolumeCollection()
+ {
+ }
+
+ /// 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 AvsStorageContainerVolumeCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _avsStorageContainerVolumeClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PureStorageBlock", AvsStorageContainerVolumeResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(AvsStorageContainerVolumeResource.ResourceType, out string avsStorageContainerVolumeApiVersion);
+ _avsStorageContainerVolumeRestClient = new AvsStorageContainerVolumesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, avsStorageContainerVolumeApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != AvsStorageContainerResource.ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AvsStorageContainerResource.ResourceType), nameof(id));
+ }
+
+ ///
+ /// Get a volume in an AVS storage container
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes/{volumeId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsStorageContainerVolume_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// ID of the volume in the storage container.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetAsync(string volumeId, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId));
+
+ using var scope = _avsStorageContainerVolumeClientDiagnostics.CreateScope("AvsStorageContainerVolumeCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = await _avsStorageContainerVolumeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeId, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new AvsStorageContainerVolumeResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a volume in an AVS storage container
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes/{volumeId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsStorageContainerVolume_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// ID of the volume in the storage container.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Get(string volumeId, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId));
+
+ using var scope = _avsStorageContainerVolumeClientDiagnostics.CreateScope("AvsStorageContainerVolumeCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = _avsStorageContainerVolumeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeId, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new AvsStorageContainerVolumeResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// List volumes in an AVS storage container
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes
+ ///
+ /// -
+ /// Operation Id
+ /// AvsStorageContainerVolume_ListByAvsStorageContainer
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-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) => _avsStorageContainerVolumeRestClient.CreateListByAvsStorageContainerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _avsStorageContainerVolumeRestClient.CreateListByAvsStorageContainerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AvsStorageContainerVolumeResource(Client, AvsStorageContainerVolumeData.DeserializeAvsStorageContainerVolumeData(e)), _avsStorageContainerVolumeClientDiagnostics, Pipeline, "AvsStorageContainerVolumeCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// List volumes in an AVS storage container
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes
+ ///
+ /// -
+ /// Operation Id
+ /// AvsStorageContainerVolume_ListByAvsStorageContainer
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-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) => _avsStorageContainerVolumeRestClient.CreateListByAvsStorageContainerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _avsStorageContainerVolumeRestClient.CreateListByAvsStorageContainerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AvsStorageContainerVolumeResource(Client, AvsStorageContainerVolumeData.DeserializeAvsStorageContainerVolumeData(e)), _avsStorageContainerVolumeClientDiagnostics, Pipeline, "AvsStorageContainerVolumeCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes/{volumeId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsStorageContainerVolume_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// ID of the volume in the storage container.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> ExistsAsync(string volumeId, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId));
+
+ using var scope = _avsStorageContainerVolumeClientDiagnostics.CreateScope("AvsStorageContainerVolumeCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = await _avsStorageContainerVolumeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeId, 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/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes/{volumeId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsStorageContainerVolume_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// ID of the volume in the storage container.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Exists(string volumeId, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId));
+
+ using var scope = _avsStorageContainerVolumeClientDiagnostics.CreateScope("AvsStorageContainerVolumeCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = _avsStorageContainerVolumeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeId, 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/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes/{volumeId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsStorageContainerVolume_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// ID of the volume in the storage container.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetIfExistsAsync(string volumeId, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId));
+
+ using var scope = _avsStorageContainerVolumeClientDiagnostics.CreateScope("AvsStorageContainerVolumeCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = await _avsStorageContainerVolumeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeId, cancellationToken: cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new AvsStorageContainerVolumeResource(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/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes/{volumeId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsStorageContainerVolume_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// ID of the volume in the storage container.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual NullableResponse GetIfExists(string volumeId, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId));
+
+ using var scope = _avsStorageContainerVolumeClientDiagnostics.CreateScope("AvsStorageContainerVolumeCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = _avsStorageContainerVolumeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeId, cancellationToken: cancellationToken);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new AvsStorageContainerVolumeResource(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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsStorageContainerVolumeData.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsStorageContainerVolumeData.Serialization.cs
new file mode 100644
index 000000000000..7edcbc9bb35c
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsStorageContainerVolumeData.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;
+using Azure.ResourceManager.Models;
+using Azure.ResourceManager.PureStorageBlock.Models;
+
+namespace Azure.ResourceManager.PureStorageBlock
+{
+ public partial class AvsStorageContainerVolumeData : 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(AvsStorageContainerVolumeData)} does not support writing '{format}' format.");
+ }
+
+ base.JsonModelWriteCore(writer, options);
+ if (Optional.IsDefined(Properties))
+ {
+ writer.WritePropertyName("properties"u8);
+ writer.WriteObjectValue(Properties, options);
+ }
+ }
+
+ AvsStorageContainerVolumeData 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(AvsStorageContainerVolumeData)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeAvsStorageContainerVolumeData(document.RootElement, options);
+ }
+
+ internal static AvsStorageContainerVolumeData DeserializeAvsStorageContainerVolumeData(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ VolumeProperties 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 = VolumeProperties.DeserializeVolumeProperties(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 = JsonSerializer.Deserialize(property.Value.GetRawText());
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new AvsStorageContainerVolumeData(
+ 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);
+ default:
+ throw new FormatException($"The model {nameof(AvsStorageContainerVolumeData)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ AvsStorageContainerVolumeData 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 DeserializeAvsStorageContainerVolumeData(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(AvsStorageContainerVolumeData)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsStorageContainerVolumeData.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsStorageContainerVolumeData.cs
new file mode 100644
index 000000000000..04afa4606ccf
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsStorageContainerVolumeData.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.PureStorageBlock.Models;
+
+namespace Azure.ResourceManager.PureStorageBlock
+{
+ ///
+ /// A class representing the AvsStorageContainerVolume data model.
+ /// A volume contained in an AVS storage container
+ ///
+ public partial class AvsStorageContainerVolumeData : 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 .
+ internal AvsStorageContainerVolumeData()
+ {
+ }
+
+ /// 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 AvsStorageContainerVolumeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, VolumeProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
+ {
+ Properties = properties;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// The resource-specific properties for this resource.
+ public VolumeProperties Properties { get; }
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsStorageContainerVolumeResource.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsStorageContainerVolumeResource.Serialization.cs
new file mode 100644
index 000000000000..035d75ef13fd
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsStorageContainerVolumeResource.Serialization.cs
@@ -0,0 +1,26 @@
+// 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.PureStorageBlock
+{
+ public partial class AvsStorageContainerVolumeResource : IJsonModel
+ {
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options);
+
+ AvsStorageContainerVolumeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options);
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options);
+
+ AvsStorageContainerVolumeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options);
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options);
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsStorageContainerVolumeResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsStorageContainerVolumeResource.cs
new file mode 100644
index 000000000000..a2c9b4068b0b
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsStorageContainerVolumeResource.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.PureStorageBlock.Models;
+
+namespace Azure.ResourceManager.PureStorageBlock
+{
+ ///
+ /// A Class representing an AvsStorageContainerVolume 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 GetAvsStorageContainerVolumeResource method.
+ /// Otherwise you can get one from its parent resource using the GetAvsStorageContainerVolume method.
+ ///
+ public partial class AvsStorageContainerVolumeResource : ArmResource
+ {
+ /// Generate the resource identifier of a instance.
+ /// The subscriptionId.
+ /// The resourceGroupName.
+ /// The storagePoolName.
+ /// The storageContainerName.
+ /// The volumeId.
+ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string storagePoolName, string storageContainerName, string volumeId)
+ {
+ var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes/{volumeId}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ private readonly ClientDiagnostics _avsStorageContainerVolumeClientDiagnostics;
+ private readonly AvsStorageContainerVolumesRestOperations _avsStorageContainerVolumeRestClient;
+ private readonly AvsStorageContainerVolumeData _data;
+
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "PureStorage.Block/storagePools/avsStorageContainers/volumes";
+
+ /// Initializes a new instance of the class for mocking.
+ protected AvsStorageContainerVolumeResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal AvsStorageContainerVolumeResource(ArmClient client, AvsStorageContainerVolumeData 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 AvsStorageContainerVolumeResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _avsStorageContainerVolumeClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PureStorageBlock", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string avsStorageContainerVolumeApiVersion);
+ _avsStorageContainerVolumeRestClient = new AvsStorageContainerVolumesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, avsStorageContainerVolumeApiVersion);
+#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 AvsStorageContainerVolumeData 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 volume in an AVS storage container
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes/{volumeId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsStorageContainerVolume_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _avsStorageContainerVolumeClientDiagnostics.CreateScope("AvsStorageContainerVolumeResource.Get");
+ scope.Start();
+ try
+ {
+ var response = await _avsStorageContainerVolumeRestClient.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 AvsStorageContainerVolumeResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a volume in an AVS storage container
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes/{volumeId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsStorageContainerVolume_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using var scope = _avsStorageContainerVolumeClientDiagnostics.CreateScope("AvsStorageContainerVolumeResource.Get");
+ scope.Start();
+ try
+ {
+ var response = _avsStorageContainerVolumeRestClient.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 AvsStorageContainerVolumeResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete a volume in an AVS storage container
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes/{volumeId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsStorageContainerVolume_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-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 = _avsStorageContainerVolumeClientDiagnostics.CreateScope("AvsStorageContainerVolumeResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = await _avsStorageContainerVolumeRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false);
+ var operation = new PureStorageBlockArmOperation(_avsStorageContainerVolumeClientDiagnostics, Pipeline, _avsStorageContainerVolumeRestClient.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 volume in an AVS storage container
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes/{volumeId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsStorageContainerVolume_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-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 = _avsStorageContainerVolumeClientDiagnostics.CreateScope("AvsStorageContainerVolumeResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = _avsStorageContainerVolumeRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken);
+ var operation = new PureStorageBlockArmOperation(_avsStorageContainerVolumeClientDiagnostics, Pipeline, _avsStorageContainerVolumeRestClient.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;
+ }
+ }
+
+ ///
+ /// Update a volume in an AVS storage container
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes/{volumeId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsStorageContainerVolume_Update
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-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, AvsStorageContainerVolumePatch patch, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(patch, nameof(patch));
+
+ using var scope = _avsStorageContainerVolumeClientDiagnostics.CreateScope("AvsStorageContainerVolumeResource.Update");
+ scope.Start();
+ try
+ {
+ var response = await _avsStorageContainerVolumeRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false);
+ var operation = new PureStorageBlockArmOperation(new AvsStorageContainerVolumeOperationSource(Client), _avsStorageContainerVolumeClientDiagnostics, Pipeline, _avsStorageContainerVolumeRestClient.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;
+ }
+ }
+
+ ///
+ /// Update a volume in an AVS storage container
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes/{volumeId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsStorageContainerVolume_Update
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-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, AvsStorageContainerVolumePatch patch, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(patch, nameof(patch));
+
+ using var scope = _avsStorageContainerVolumeClientDiagnostics.CreateScope("AvsStorageContainerVolumeResource.Update");
+ scope.Start();
+ try
+ {
+ var response = _avsStorageContainerVolumeRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken);
+ var operation = new PureStorageBlockArmOperation(new AvsStorageContainerVolumeOperationSource(Client), _avsStorageContainerVolumeClientDiagnostics, Pipeline, _avsStorageContainerVolumeRestClient.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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsVmCollection.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsVmCollection.cs
new file mode 100644
index 000000000000..1dc13dd8f203
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsVmCollection.cs
@@ -0,0 +1,395 @@
+// 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.PureStorageBlock
+{
+ ///
+ /// 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 GetAvsVms method from an instance of .
+ ///
+ public partial class AvsVmCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _avsVmClientDiagnostics;
+ private readonly AvsVmsRestOperations _avsVmRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected AvsVmCollection()
+ {
+ }
+
+ /// 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 AvsVmCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _avsVmClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PureStorageBlock", AvsVmResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(AvsVmResource.ResourceType, out string avsVmApiVersion);
+ _avsVmRestClient = new AvsVmsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, avsVmApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != StoragePoolResource.ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, StoragePoolResource.ResourceType), nameof(id));
+ }
+
+ ///
+ /// Get an AVS VM
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsVm_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// ID of the AVS VM.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetAsync(string avsVmId, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(avsVmId, nameof(avsVmId));
+
+ using var scope = _avsVmClientDiagnostics.CreateScope("AvsVmCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = await _avsVmRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, avsVmId, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new AvsVmResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get an AVS VM
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsVm_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// ID of the AVS VM.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Get(string avsVmId, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(avsVmId, nameof(avsVmId));
+
+ using var scope = _avsVmClientDiagnostics.CreateScope("AvsVmCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = _avsVmRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, avsVmId, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new AvsVmResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// List AVS VMs by storage pool
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms
+ ///
+ /// -
+ /// Operation Id
+ /// AvsVm_ListByStoragePool
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-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) => _avsVmRestClient.CreateListByStoragePoolRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _avsVmRestClient.CreateListByStoragePoolNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AvsVmResource(Client, AvsVmData.DeserializeAvsVmData(e)), _avsVmClientDiagnostics, Pipeline, "AvsVmCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// List AVS VMs by storage pool
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms
+ ///
+ /// -
+ /// Operation Id
+ /// AvsVm_ListByStoragePool
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-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) => _avsVmRestClient.CreateListByStoragePoolRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _avsVmRestClient.CreateListByStoragePoolNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AvsVmResource(Client, AvsVmData.DeserializeAvsVmData(e)), _avsVmClientDiagnostics, Pipeline, "AvsVmCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsVm_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// ID of the AVS VM.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> ExistsAsync(string avsVmId, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(avsVmId, nameof(avsVmId));
+
+ using var scope = _avsVmClientDiagnostics.CreateScope("AvsVmCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = await _avsVmRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, avsVmId, 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/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsVm_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// ID of the AVS VM.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Exists(string avsVmId, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(avsVmId, nameof(avsVmId));
+
+ using var scope = _avsVmClientDiagnostics.CreateScope("AvsVmCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = _avsVmRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, avsVmId, 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/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsVm_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// ID of the AVS VM.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetIfExistsAsync(string avsVmId, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(avsVmId, nameof(avsVmId));
+
+ using var scope = _avsVmClientDiagnostics.CreateScope("AvsVmCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = await _avsVmRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, avsVmId, cancellationToken: cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new AvsVmResource(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/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsVm_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// ID of the AVS VM.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual NullableResponse GetIfExists(string avsVmId, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(avsVmId, nameof(avsVmId));
+
+ using var scope = _avsVmClientDiagnostics.CreateScope("AvsVmCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = _avsVmRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, avsVmId, cancellationToken: cancellationToken);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new AvsVmResource(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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsVmData.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsVmData.Serialization.cs
new file mode 100644
index 000000000000..1d78a5f071b7
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsVmData.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;
+using Azure.ResourceManager.Models;
+using Azure.ResourceManager.PureStorageBlock.Models;
+
+namespace Azure.ResourceManager.PureStorageBlock
+{
+ public partial class AvsVmData : 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(AvsVmData)} does not support writing '{format}' format.");
+ }
+
+ base.JsonModelWriteCore(writer, options);
+ if (Optional.IsDefined(Properties))
+ {
+ writer.WritePropertyName("properties"u8);
+ writer.WriteObjectValue(Properties, options);
+ }
+ }
+
+ AvsVmData 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(AvsVmData)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeAvsVmData(document.RootElement, options);
+ }
+
+ internal static AvsVmData DeserializeAvsVmData(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ AvsVmProperties 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 = AvsVmProperties.DeserializeAvsVmProperties(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 = JsonSerializer.Deserialize(property.Value.GetRawText());
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new AvsVmData(
+ 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);
+ default:
+ throw new FormatException($"The model {nameof(AvsVmData)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ AvsVmData 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 DeserializeAvsVmData(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(AvsVmData)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsVmData.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsVmData.cs
new file mode 100644
index 000000000000..876f7adccc2c
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsVmData.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.PureStorageBlock.Models;
+
+namespace Azure.ResourceManager.PureStorageBlock
+{
+ ///
+ /// A class representing the AvsVm data model.
+ /// AVS VM resource type, representing all the volumes associated to an AVS VM as defined by VMware
+ ///
+ public partial class AvsVmData : 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 .
+ internal AvsVmData()
+ {
+ }
+
+ /// 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 AvsVmData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AvsVmProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
+ {
+ Properties = properties;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// The resource-specific properties for this resource.
+ public AvsVmProperties Properties { get; }
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsVmResource.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsVmResource.Serialization.cs
new file mode 100644
index 000000000000..a815491d93ad
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsVmResource.Serialization.cs
@@ -0,0 +1,26 @@
+// 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.PureStorageBlock
+{
+ public partial class AvsVmResource : IJsonModel
+ {
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options);
+
+ AvsVmData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options);
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options);
+
+ AvsVmData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options);
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options);
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsVmResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsVmResource.cs
new file mode 100644
index 000000000000..e13f5d6cb48e
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsVmResource.cs
@@ -0,0 +1,417 @@
+// 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.PureStorageBlock.Models;
+
+namespace Azure.ResourceManager.PureStorageBlock
+{
+ ///
+ /// A Class representing an AvsVm 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 GetAvsVmResource method.
+ /// Otherwise you can get one from its parent resource using the GetAvsVm method.
+ ///
+ public partial class AvsVmResource : ArmResource
+ {
+ /// Generate the resource identifier of a instance.
+ /// The subscriptionId.
+ /// The resourceGroupName.
+ /// The storagePoolName.
+ /// The avsVmId.
+ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string storagePoolName, string avsVmId)
+ {
+ var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ private readonly ClientDiagnostics _avsVmClientDiagnostics;
+ private readonly AvsVmsRestOperations _avsVmRestClient;
+ private readonly AvsVmData _data;
+
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "PureStorage.Block/storagePools/avsVms";
+
+ /// Initializes a new instance of the class for mocking.
+ protected AvsVmResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal AvsVmResource(ArmClient client, AvsVmData 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 AvsVmResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _avsVmClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PureStorageBlock", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string avsVmApiVersion);
+ _avsVmRestClient = new AvsVmsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, avsVmApiVersion);
+#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 AvsVmData 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 AvsVmVolumeResources in the AvsVm.
+ /// An object representing collection of AvsVmVolumeResources and their operations over a AvsVmVolumeResource.
+ public virtual AvsVmVolumeCollection GetAvsVmVolumes()
+ {
+ return GetCachedClient(client => new AvsVmVolumeCollection(client, Id));
+ }
+
+ ///
+ /// Get a volume in an AVS VM
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes/{volumeId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsVmVolume_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// ID of the volume in the AVS VM.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual async Task> GetAvsVmVolumeAsync(string volumeId, CancellationToken cancellationToken = default)
+ {
+ return await GetAvsVmVolumes().GetAsync(volumeId, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get a volume in an AVS VM
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes/{volumeId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsVmVolume_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// ID of the volume in the AVS VM.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual Response GetAvsVmVolume(string volumeId, CancellationToken cancellationToken = default)
+ {
+ return GetAvsVmVolumes().Get(volumeId, cancellationToken);
+ }
+
+ ///
+ /// Get an AVS VM
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsVm_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _avsVmClientDiagnostics.CreateScope("AvsVmResource.Get");
+ scope.Start();
+ try
+ {
+ var response = await _avsVmRestClient.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 AvsVmResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get an AVS VM
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsVm_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using var scope = _avsVmClientDiagnostics.CreateScope("AvsVmResource.Get");
+ scope.Start();
+ try
+ {
+ var response = _avsVmRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new AvsVmResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete an AVS VM
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsVm_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-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 = _avsVmClientDiagnostics.CreateScope("AvsVmResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = await _avsVmRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false);
+ var operation = new PureStorageBlockArmOperation(_avsVmClientDiagnostics, Pipeline, _avsVmRestClient.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 an AVS VM
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsVm_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-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 = _avsVmClientDiagnostics.CreateScope("AvsVmResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = _avsVmRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken);
+ var operation = new PureStorageBlockArmOperation(_avsVmClientDiagnostics, Pipeline, _avsVmRestClient.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 an AVS VM
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsVm_Update
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-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, AvsVmPatch patch, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(patch, nameof(patch));
+
+ using var scope = _avsVmClientDiagnostics.CreateScope("AvsVmResource.Update");
+ scope.Start();
+ try
+ {
+ var response = await _avsVmRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false);
+ var operation = new PureStorageBlockArmOperation(new AvsVmOperationSource(Client), _avsVmClientDiagnostics, Pipeline, _avsVmRestClient.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 an AVS VM
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsVm_Update
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-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, AvsVmPatch patch, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(patch, nameof(patch));
+
+ using var scope = _avsVmClientDiagnostics.CreateScope("AvsVmResource.Update");
+ scope.Start();
+ try
+ {
+ var response = _avsVmRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken);
+ var operation = new PureStorageBlockArmOperation(new AvsVmOperationSource(Client), _avsVmClientDiagnostics, Pipeline, _avsVmRestClient.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;
+ }
+ }
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsVmVolumeCollection.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsVmVolumeCollection.cs
new file mode 100644
index 000000000000..b1bbbae42b51
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsVmVolumeCollection.cs
@@ -0,0 +1,395 @@
+// 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.PureStorageBlock
+{
+ ///
+ /// 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 GetAvsVmVolumes method from an instance of .
+ ///
+ public partial class AvsVmVolumeCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _avsVmVolumeClientDiagnostics;
+ private readonly AvsVmVolumesRestOperations _avsVmVolumeRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected AvsVmVolumeCollection()
+ {
+ }
+
+ /// 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 AvsVmVolumeCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _avsVmVolumeClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PureStorageBlock", AvsVmVolumeResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(AvsVmVolumeResource.ResourceType, out string avsVmVolumeApiVersion);
+ _avsVmVolumeRestClient = new AvsVmVolumesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, avsVmVolumeApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != AvsVmResource.ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AvsVmResource.ResourceType), nameof(id));
+ }
+
+ ///
+ /// Get a volume in an AVS VM
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes/{volumeId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsVmVolume_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// ID of the volume in the AVS VM.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetAsync(string volumeId, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId));
+
+ using var scope = _avsVmVolumeClientDiagnostics.CreateScope("AvsVmVolumeCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = await _avsVmVolumeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeId, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new AvsVmVolumeResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a volume in an AVS VM
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes/{volumeId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsVmVolume_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// ID of the volume in the AVS VM.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Get(string volumeId, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId));
+
+ using var scope = _avsVmVolumeClientDiagnostics.CreateScope("AvsVmVolumeCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = _avsVmVolumeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeId, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new AvsVmVolumeResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// List volumes in an AVS VM
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes
+ ///
+ /// -
+ /// Operation Id
+ /// AvsVmVolume_ListByAvsVm
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-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) => _avsVmVolumeRestClient.CreateListByAvsVmRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _avsVmVolumeRestClient.CreateListByAvsVmNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AvsVmVolumeResource(Client, AvsVmVolumeData.DeserializeAvsVmVolumeData(e)), _avsVmVolumeClientDiagnostics, Pipeline, "AvsVmVolumeCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// List volumes in an AVS VM
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes
+ ///
+ /// -
+ /// Operation Id
+ /// AvsVmVolume_ListByAvsVm
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-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) => _avsVmVolumeRestClient.CreateListByAvsVmRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _avsVmVolumeRestClient.CreateListByAvsVmNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AvsVmVolumeResource(Client, AvsVmVolumeData.DeserializeAvsVmVolumeData(e)), _avsVmVolumeClientDiagnostics, Pipeline, "AvsVmVolumeCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes/{volumeId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsVmVolume_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// ID of the volume in the AVS VM.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> ExistsAsync(string volumeId, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId));
+
+ using var scope = _avsVmVolumeClientDiagnostics.CreateScope("AvsVmVolumeCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = await _avsVmVolumeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeId, 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/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes/{volumeId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsVmVolume_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// ID of the volume in the AVS VM.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Exists(string volumeId, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId));
+
+ using var scope = _avsVmVolumeClientDiagnostics.CreateScope("AvsVmVolumeCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = _avsVmVolumeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeId, 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/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes/{volumeId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsVmVolume_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// ID of the volume in the AVS VM.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetIfExistsAsync(string volumeId, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId));
+
+ using var scope = _avsVmVolumeClientDiagnostics.CreateScope("AvsVmVolumeCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = await _avsVmVolumeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeId, cancellationToken: cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new AvsVmVolumeResource(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/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes/{volumeId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsVmVolume_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// ID of the volume in the AVS VM.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual NullableResponse GetIfExists(string volumeId, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId));
+
+ using var scope = _avsVmVolumeClientDiagnostics.CreateScope("AvsVmVolumeCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = _avsVmVolumeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeId, cancellationToken: cancellationToken);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new AvsVmVolumeResource(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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsVmVolumeData.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsVmVolumeData.Serialization.cs
new file mode 100644
index 000000000000..df899081a16c
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsVmVolumeData.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;
+using Azure.ResourceManager.Models;
+using Azure.ResourceManager.PureStorageBlock.Models;
+
+namespace Azure.ResourceManager.PureStorageBlock
+{
+ public partial class AvsVmVolumeData : 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(AvsVmVolumeData)} does not support writing '{format}' format.");
+ }
+
+ base.JsonModelWriteCore(writer, options);
+ if (Optional.IsDefined(Properties))
+ {
+ writer.WritePropertyName("properties"u8);
+ writer.WriteObjectValue(Properties, options);
+ }
+ }
+
+ AvsVmVolumeData 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(AvsVmVolumeData)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeAvsVmVolumeData(document.RootElement, options);
+ }
+
+ internal static AvsVmVolumeData DeserializeAvsVmVolumeData(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ VolumeProperties 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 = VolumeProperties.DeserializeVolumeProperties(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 = JsonSerializer.Deserialize(property.Value.GetRawText());
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new AvsVmVolumeData(
+ 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);
+ default:
+ throw new FormatException($"The model {nameof(AvsVmVolumeData)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ AvsVmVolumeData 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 DeserializeAvsVmVolumeData(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(AvsVmVolumeData)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsVmVolumeData.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsVmVolumeData.cs
new file mode 100644
index 000000000000..dd4f871b5cb6
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsVmVolumeData.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.PureStorageBlock.Models;
+
+namespace Azure.ResourceManager.PureStorageBlock
+{
+ ///
+ /// A class representing the AvsVmVolume data model.
+ /// Any volume associated to a particular AVS VM
+ ///
+ public partial class AvsVmVolumeData : 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 .
+ internal AvsVmVolumeData()
+ {
+ }
+
+ /// 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 AvsVmVolumeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, VolumeProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
+ {
+ Properties = properties;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// The resource-specific properties for this resource.
+ public VolumeProperties Properties { get; }
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsVmVolumeResource.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsVmVolumeResource.Serialization.cs
new file mode 100644
index 000000000000..a1ddb78a558a
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsVmVolumeResource.Serialization.cs
@@ -0,0 +1,26 @@
+// 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.PureStorageBlock
+{
+ public partial class AvsVmVolumeResource : IJsonModel
+ {
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options);
+
+ AvsVmVolumeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options);
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options);
+
+ AvsVmVolumeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options);
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options);
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsVmVolumeResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsVmVolumeResource.cs
new file mode 100644
index 000000000000..ad083aebf808
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/AvsVmVolumeResource.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.PureStorageBlock.Models;
+
+namespace Azure.ResourceManager.PureStorageBlock
+{
+ ///
+ /// A Class representing an AvsVmVolume 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 GetAvsVmVolumeResource method.
+ /// Otherwise you can get one from its parent resource using the GetAvsVmVolume method.
+ ///
+ public partial class AvsVmVolumeResource : ArmResource
+ {
+ /// Generate the resource identifier of a instance.
+ /// The subscriptionId.
+ /// The resourceGroupName.
+ /// The storagePoolName.
+ /// The avsVmId.
+ /// The volumeId.
+ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string storagePoolName, string avsVmId, string volumeId)
+ {
+ var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes/{volumeId}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ private readonly ClientDiagnostics _avsVmVolumeClientDiagnostics;
+ private readonly AvsVmVolumesRestOperations _avsVmVolumeRestClient;
+ private readonly AvsVmVolumeData _data;
+
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "PureStorage.Block/storagePools/avsVms/avsVmVolumes";
+
+ /// Initializes a new instance of the class for mocking.
+ protected AvsVmVolumeResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal AvsVmVolumeResource(ArmClient client, AvsVmVolumeData 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 AvsVmVolumeResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _avsVmVolumeClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PureStorageBlock", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string avsVmVolumeApiVersion);
+ _avsVmVolumeRestClient = new AvsVmVolumesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, avsVmVolumeApiVersion);
+#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 AvsVmVolumeData 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 volume in an AVS VM
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes/{volumeId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsVmVolume_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _avsVmVolumeClientDiagnostics.CreateScope("AvsVmVolumeResource.Get");
+ scope.Start();
+ try
+ {
+ var response = await _avsVmVolumeRestClient.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 AvsVmVolumeResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a volume in an AVS VM
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes/{volumeId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsVmVolume_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using var scope = _avsVmVolumeClientDiagnostics.CreateScope("AvsVmVolumeResource.Get");
+ scope.Start();
+ try
+ {
+ var response = _avsVmVolumeRestClient.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 AvsVmVolumeResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete a volume in an AVS VM
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes/{volumeId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsVmVolume_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-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 = _avsVmVolumeClientDiagnostics.CreateScope("AvsVmVolumeResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = await _avsVmVolumeRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false);
+ var operation = new PureStorageBlockArmOperation(_avsVmVolumeClientDiagnostics, Pipeline, _avsVmVolumeRestClient.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 volume in an AVS VM
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes/{volumeId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsVmVolume_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-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 = _avsVmVolumeClientDiagnostics.CreateScope("AvsVmVolumeResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = _avsVmVolumeRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken);
+ var operation = new PureStorageBlockArmOperation(_avsVmVolumeClientDiagnostics, Pipeline, _avsVmVolumeRestClient.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;
+ }
+ }
+
+ ///
+ /// Update a volume in an AVS VM
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes/{volumeId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsVmVolume_Update
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-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, AvsVmVolumePatch patch, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(patch, nameof(patch));
+
+ using var scope = _avsVmVolumeClientDiagnostics.CreateScope("AvsVmVolumeResource.Update");
+ scope.Start();
+ try
+ {
+ var response = await _avsVmVolumeRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false);
+ var operation = new PureStorageBlockArmOperation(new AvsVmVolumeOperationSource(Client), _avsVmVolumeClientDiagnostics, Pipeline, _avsVmVolumeRestClient.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;
+ }
+ }
+
+ ///
+ /// Update a volume in an AVS VM
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes/{volumeId}
+ ///
+ /// -
+ /// Operation Id
+ /// AvsVmVolume_Update
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-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, AvsVmVolumePatch patch, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(patch, nameof(patch));
+
+ using var scope = _avsVmVolumeClientDiagnostics.CreateScope("AvsVmVolumeResource.Update");
+ scope.Start();
+ try
+ {
+ var response = _avsVmVolumeRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken);
+ var operation = new PureStorageBlockArmOperation(new AvsVmVolumeOperationSource(Client), _avsVmVolumeClientDiagnostics, Pipeline, _avsVmVolumeRestClient.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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Extensions/MockablePureStorageBlockArmClient.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Extensions/MockablePureStorageBlockArmClient.cs
new file mode 100644
index 000000000000..f453407ef77a
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Extensions/MockablePureStorageBlockArmClient.cs
@@ -0,0 +1,109 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using Azure.Core;
+
+namespace Azure.ResourceManager.PureStorageBlock.Mocking
+{
+ /// A class to add extension methods to ArmClient.
+ public partial class MockablePureStorageBlockArmClient : ArmResource
+ {
+ /// Initializes a new instance of the class for mocking.
+ protected MockablePureStorageBlockArmClient()
+ {
+ }
+
+ /// 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 MockablePureStorageBlockArmClient(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ }
+
+ internal MockablePureStorageBlockArmClient(ArmClient client) : this(client, ResourceIdentifier.Root)
+ {
+ }
+
+ private string GetApiVersionOrNull(ResourceType resourceType)
+ {
+ TryGetApiVersion(resourceType, out string apiVersion);
+ return apiVersion;
+ }
+
+ ///
+ /// 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 ReservationResource GetReservationResource(ResourceIdentifier id)
+ {
+ ReservationResource.ValidateResourceId(id);
+ return new ReservationResource(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 StoragePoolResource GetStoragePoolResource(ResourceIdentifier id)
+ {
+ StoragePoolResource.ValidateResourceId(id);
+ return new StoragePoolResource(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 AvsStorageContainerResource GetAvsStorageContainerResource(ResourceIdentifier id)
+ {
+ AvsStorageContainerResource.ValidateResourceId(id);
+ return new AvsStorageContainerResource(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 AvsStorageContainerVolumeResource GetAvsStorageContainerVolumeResource(ResourceIdentifier id)
+ {
+ AvsStorageContainerVolumeResource.ValidateResourceId(id);
+ return new AvsStorageContainerVolumeResource(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 AvsVmResource GetAvsVmResource(ResourceIdentifier id)
+ {
+ AvsVmResource.ValidateResourceId(id);
+ return new AvsVmResource(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 AvsVmVolumeResource GetAvsVmVolumeResource(ResourceIdentifier id)
+ {
+ AvsVmVolumeResource.ValidateResourceId(id);
+ return new AvsVmVolumeResource(Client, id);
+ }
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Extensions/MockablePureStorageBlockResourceGroupResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Extensions/MockablePureStorageBlockResourceGroupResource.cs
new file mode 100644
index 000000000000..991ad2456cea
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Extensions/MockablePureStorageBlockResourceGroupResource.cs
@@ -0,0 +1,174 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure.Core;
+
+namespace Azure.ResourceManager.PureStorageBlock.Mocking
+{
+ /// A class to add extension methods to ResourceGroupResource.
+ public partial class MockablePureStorageBlockResourceGroupResource : ArmResource
+ {
+ /// Initializes a new instance of the class for mocking.
+ protected MockablePureStorageBlockResourceGroupResource()
+ {
+ }
+
+ /// 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 MockablePureStorageBlockResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ }
+
+ private string GetApiVersionOrNull(ResourceType resourceType)
+ {
+ TryGetApiVersion(resourceType, out string apiVersion);
+ return apiVersion;
+ }
+
+ /// Gets a collection of ReservationResources in the ResourceGroupResource.
+ /// An object representing collection of ReservationResources and their operations over a ReservationResource.
+ public virtual ReservationCollection GetReservations()
+ {
+ return GetCachedClient(client => new ReservationCollection(client, Id));
+ }
+
+ ///
+ /// Get a reservation
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations/{reservationName}
+ ///
+ /// -
+ /// Operation Id
+ /// Reservation_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Name of the reservation.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual async Task> GetReservationAsync(string reservationName, CancellationToken cancellationToken = default)
+ {
+ return await GetReservations().GetAsync(reservationName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get a reservation
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations/{reservationName}
+ ///
+ /// -
+ /// Operation Id
+ /// Reservation_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Name of the reservation.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual Response GetReservation(string reservationName, CancellationToken cancellationToken = default)
+ {
+ return GetReservations().Get(reservationName, cancellationToken);
+ }
+
+ /// Gets a collection of StoragePoolResources in the ResourceGroupResource.
+ /// An object representing collection of StoragePoolResources and their operations over a StoragePoolResource.
+ public virtual StoragePoolCollection GetStoragePools()
+ {
+ return GetCachedClient(client => new StoragePoolCollection(client, Id));
+ }
+
+ ///
+ /// Get a storage pool
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}
+ ///
+ /// -
+ /// Operation Id
+ /// StoragePool_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Name of the storage pool.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual async Task> GetStoragePoolAsync(string storagePoolName, CancellationToken cancellationToken = default)
+ {
+ return await GetStoragePools().GetAsync(storagePoolName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get a storage pool
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}
+ ///
+ /// -
+ /// Operation Id
+ /// StoragePool_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Name of the storage pool.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual Response GetStoragePool(string storagePoolName, CancellationToken cancellationToken = default)
+ {
+ return GetStoragePools().Get(storagePoolName, cancellationToken);
+ }
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Extensions/MockablePureStorageBlockSubscriptionResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Extensions/MockablePureStorageBlockSubscriptionResource.cs
new file mode 100644
index 000000000000..feb1635e9487
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Extensions/MockablePureStorageBlockSubscriptionResource.cs
@@ -0,0 +1,166 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Threading;
+using Autorest.CSharp.Core;
+using Azure.Core;
+using Azure.Core.Pipeline;
+
+namespace Azure.ResourceManager.PureStorageBlock.Mocking
+{
+ /// A class to add extension methods to SubscriptionResource.
+ public partial class MockablePureStorageBlockSubscriptionResource : ArmResource
+ {
+ private ClientDiagnostics _reservationClientDiagnostics;
+ private ReservationsRestOperations _reservationRestClient;
+ private ClientDiagnostics _storagePoolClientDiagnostics;
+ private StoragePoolsRestOperations _storagePoolRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected MockablePureStorageBlockSubscriptionResource()
+ {
+ }
+
+ /// 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 MockablePureStorageBlockSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ }
+
+ private ClientDiagnostics ReservationClientDiagnostics => _reservationClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.PureStorageBlock", ReservationResource.ResourceType.Namespace, Diagnostics);
+ private ReservationsRestOperations ReservationRestClient => _reservationRestClient ??= new ReservationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ReservationResource.ResourceType));
+ private ClientDiagnostics StoragePoolClientDiagnostics => _storagePoolClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.PureStorageBlock", StoragePoolResource.ResourceType.Namespace, Diagnostics);
+ private StoragePoolsRestOperations StoragePoolRestClient => _storagePoolRestClient ??= new StoragePoolsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(StoragePoolResource.ResourceType));
+
+ private string GetApiVersionOrNull(ResourceType resourceType)
+ {
+ TryGetApiVersion(resourceType, out string apiVersion);
+ return apiVersion;
+ }
+
+ ///
+ /// List reservations by Azure subscription ID
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/PureStorage.Block/reservations
+ ///
+ /// -
+ /// Operation Id
+ /// Reservation_ListBySubscription
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetReservationsAsync(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => ReservationRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ReservationRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ReservationResource(Client, ReservationData.DeserializeReservationData(e)), ReservationClientDiagnostics, Pipeline, "MockablePureStorageBlockSubscriptionResource.GetReservations", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// List reservations by Azure subscription ID
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/PureStorage.Block/reservations
+ ///
+ /// -
+ /// Operation Id
+ /// Reservation_ListBySubscription
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetReservations(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => ReservationRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ReservationRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ReservationResource(Client, ReservationData.DeserializeReservationData(e)), ReservationClientDiagnostics, Pipeline, "MockablePureStorageBlockSubscriptionResource.GetReservations", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// List storage pools by Azure subscription ID
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/PureStorage.Block/storagePools
+ ///
+ /// -
+ /// Operation Id
+ /// StoragePool_ListBySubscription
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetStoragePoolsAsync(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => StoragePoolRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => StoragePoolRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new StoragePoolResource(Client, StoragePoolData.DeserializeStoragePoolData(e)), StoragePoolClientDiagnostics, Pipeline, "MockablePureStorageBlockSubscriptionResource.GetStoragePools", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// List storage pools by Azure subscription ID
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/PureStorage.Block/storagePools
+ ///
+ /// -
+ /// Operation Id
+ /// StoragePool_ListBySubscription
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetStoragePools(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => StoragePoolRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => StoragePoolRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new StoragePoolResource(Client, StoragePoolData.DeserializeStoragePoolData(e)), StoragePoolClientDiagnostics, Pipeline, "MockablePureStorageBlockSubscriptionResource.GetStoragePools", "value", "nextLink", cancellationToken);
+ }
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Extensions/PureStorageBlockExtensions.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Extensions/PureStorageBlockExtensions.cs
new file mode 100644
index 000000000000..0253af0daf16
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Extensions/PureStorageBlockExtensions.cs
@@ -0,0 +1,479 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.ResourceManager.PureStorageBlock.Mocking;
+using Azure.ResourceManager.Resources;
+
+namespace Azure.ResourceManager.PureStorageBlock
+{
+ /// A class to add extension methods to Azure.ResourceManager.PureStorageBlock.
+ public static partial class PureStorageBlockExtensions
+ {
+ private static MockablePureStorageBlockArmClient GetMockablePureStorageBlockArmClient(ArmClient client)
+ {
+ return client.GetCachedClient(client0 => new MockablePureStorageBlockArmClient(client0));
+ }
+
+ private static MockablePureStorageBlockResourceGroupResource GetMockablePureStorageBlockResourceGroupResource(ArmResource resource)
+ {
+ return resource.GetCachedClient(client => new MockablePureStorageBlockResourceGroupResource(client, resource.Id));
+ }
+
+ private static MockablePureStorageBlockSubscriptionResource GetMockablePureStorageBlockSubscriptionResource(ArmResource resource)
+ {
+ return resource.GetCachedClient(client => new MockablePureStorageBlockSubscriptionResource(client, resource.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 ReservationResource GetReservationResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockablePureStorageBlockArmClient(client).GetReservationResource(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 StoragePoolResource GetStoragePoolResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockablePureStorageBlockArmClient(client).GetStoragePoolResource(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 AvsStorageContainerResource GetAvsStorageContainerResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockablePureStorageBlockArmClient(client).GetAvsStorageContainerResource(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 AvsStorageContainerVolumeResource GetAvsStorageContainerVolumeResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockablePureStorageBlockArmClient(client).GetAvsStorageContainerVolumeResource(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 AvsVmResource GetAvsVmResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockablePureStorageBlockArmClient(client).GetAvsVmResource(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 AvsVmVolumeResource GetAvsVmVolumeResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockablePureStorageBlockArmClient(client).GetAvsVmVolumeResource(id);
+ }
+
+ ///
+ /// Gets a collection of ReservationResources 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 ReservationResources and their operations over a ReservationResource.
+ public static ReservationCollection GetReservations(this ResourceGroupResource resourceGroupResource)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return GetMockablePureStorageBlockResourceGroupResource(resourceGroupResource).GetReservations();
+ }
+
+ ///
+ /// Get a reservation
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations/{reservationName}
+ ///
+ /// -
+ /// Operation Id
+ /// Reservation_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// Name of the reservation.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static async Task> GetReservationAsync(this ResourceGroupResource resourceGroupResource, string reservationName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return await GetMockablePureStorageBlockResourceGroupResource(resourceGroupResource).GetReservationAsync(reservationName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get a reservation
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations/{reservationName}
+ ///
+ /// -
+ /// Operation Id
+ /// Reservation_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// Name of the reservation.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static Response GetReservation(this ResourceGroupResource resourceGroupResource, string reservationName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return GetMockablePureStorageBlockResourceGroupResource(resourceGroupResource).GetReservation(reservationName, cancellationToken);
+ }
+
+ ///
+ /// Gets a collection of StoragePoolResources 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 StoragePoolResources and their operations over a StoragePoolResource.
+ public static StoragePoolCollection GetStoragePools(this ResourceGroupResource resourceGroupResource)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return GetMockablePureStorageBlockResourceGroupResource(resourceGroupResource).GetStoragePools();
+ }
+
+ ///
+ /// Get a storage pool
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}
+ ///
+ /// -
+ /// Operation Id
+ /// StoragePool_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// Name of the storage pool.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static async Task> GetStoragePoolAsync(this ResourceGroupResource resourceGroupResource, string storagePoolName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return await GetMockablePureStorageBlockResourceGroupResource(resourceGroupResource).GetStoragePoolAsync(storagePoolName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get a storage pool
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}
+ ///
+ /// -
+ /// Operation Id
+ /// StoragePool_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// Name of the storage pool.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static Response GetStoragePool(this ResourceGroupResource resourceGroupResource, string storagePoolName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return GetMockablePureStorageBlockResourceGroupResource(resourceGroupResource).GetStoragePool(storagePoolName, cancellationToken);
+ }
+
+ ///
+ /// List reservations by Azure subscription ID
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/PureStorage.Block/reservations
+ ///
+ /// -
+ /// Operation Id
+ /// Reservation_ListBySubscription
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-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 GetReservationsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return GetMockablePureStorageBlockSubscriptionResource(subscriptionResource).GetReservationsAsync(cancellationToken);
+ }
+
+ ///
+ /// List reservations by Azure subscription ID
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/PureStorage.Block/reservations
+ ///
+ /// -
+ /// Operation Id
+ /// Reservation_ListBySubscription
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-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 GetReservations(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return GetMockablePureStorageBlockSubscriptionResource(subscriptionResource).GetReservations(cancellationToken);
+ }
+
+ ///
+ /// List storage pools by Azure subscription ID
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/PureStorage.Block/storagePools
+ ///
+ /// -
+ /// Operation Id
+ /// StoragePool_ListBySubscription
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-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 GetStoragePoolsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return GetMockablePureStorageBlockSubscriptionResource(subscriptionResource).GetStoragePoolsAsync(cancellationToken);
+ }
+
+ ///
+ /// List storage pools by Azure subscription ID
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/PureStorage.Block/storagePools
+ ///
+ /// -
+ /// Operation Id
+ /// StoragePool_ListBySubscription
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-11-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 GetStoragePools(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return GetMockablePureStorageBlockSubscriptionResource(subscriptionResource).GetStoragePools(cancellationToken);
+ }
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Internal/Argument.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Internal/Argument.cs
new file mode 100644
index 000000000000..c8664855aa7e
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Internal/Argument.cs
@@ -0,0 +1,129 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace Azure.ResourceManager.PureStorageBlock
+{
+ internal static class Argument
+ {
+ public static void AssertNotNull(T value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ }
+
+ public static void AssertNotNull(T? value, string name)
+ where T : struct
+ {
+ if (!value.HasValue)
+ {
+ throw new ArgumentNullException(name);
+ }
+ }
+
+ public static void AssertNotNullOrEmpty(IEnumerable value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ if (value is ICollection collectionOfT && collectionOfT.Count == 0)
+ {
+ throw new ArgumentException("Value cannot be an empty collection.", name);
+ }
+ if (value is ICollection collection && collection.Count == 0)
+ {
+ throw new ArgumentException("Value cannot be an empty collection.", name);
+ }
+ using IEnumerator e = value.GetEnumerator();
+ if (!e.MoveNext())
+ {
+ throw new ArgumentException("Value cannot be an empty collection.", name);
+ }
+ }
+
+ public static void AssertNotNullOrEmpty(string value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ if (value.Length == 0)
+ {
+ throw new ArgumentException("Value cannot be an empty string.", name);
+ }
+ }
+
+ public static void AssertNotNullOrWhiteSpace(string value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ if (string.IsNullOrWhiteSpace(value))
+ {
+ throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name);
+ }
+ }
+
+ public static void AssertNotDefault(ref T value, string name)
+ where T : struct, IEquatable
+ {
+ if (value.Equals(default))
+ {
+ throw new ArgumentException("Value cannot be empty.", name);
+ }
+ }
+
+ public static void AssertInRange(T value, T minimum, T maximum, string name)
+ where T : notnull, IComparable
+ {
+ if (minimum.CompareTo(value) > 0)
+ {
+ throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed.");
+ }
+ if (maximum.CompareTo(value) < 0)
+ {
+ throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed.");
+ }
+ }
+
+ public static void AssertEnumDefined(Type enumType, object value, string name)
+ {
+ if (!Enum.IsDefined(enumType, value))
+ {
+ throw new ArgumentException($"Value not defined for {enumType.FullName}.", name);
+ }
+ }
+
+ public static T CheckNotNull(T value, string name)
+ where T : class
+ {
+ AssertNotNull(value, name);
+ return value;
+ }
+
+ public static string CheckNotNullOrEmpty(string value, string name)
+ {
+ AssertNotNullOrEmpty(value, name);
+ return value;
+ }
+
+ public static void AssertNull(T value, string name, string message = null)
+ {
+ if (value != null)
+ {
+ throw new ArgumentException(message ?? "Value must be null.", name);
+ }
+ }
+ }
+}
diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Internal/ChangeTrackingDictionary.cs
new file mode 100644
index 000000000000..892c4f25ead6
--- /dev/null
+++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Internal/ChangeTrackingDictionary.cs
@@ -0,0 +1,167 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace Azure.ResourceManager.PureStorageBlock
+{
+ internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary