diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/Azure.ResourceManager.ContainerOrchestratorRuntime.sln b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/Azure.ResourceManager.ContainerOrchestratorRuntime.sln
new file mode 100644
index 000000000000..a982d94cc93d
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/Azure.ResourceManager.ContainerOrchestratorRuntime.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.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{ECC730C1-4AEA-420C-916A-66B19B79E4DC}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.ContainerOrchestratorRuntime", "src\Azure.ResourceManager.ContainerOrchestratorRuntime.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.ContainerOrchestratorRuntime.Tests", "tests\Azure.ResourceManager.ContainerOrchestratorRuntime.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
+ {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.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/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/CHANGELOG.md b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/CHANGELOG.md
new file mode 100644
index 000000000000..13dd08af78ab
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/CHANGELOG.md
@@ -0,0 +1,11 @@
+# Release History
+
+## 1.0.0-beta.1 (Unreleased)
+
+### Features Added
+
+### Breaking Changes
+
+### Bugs Fixed
+
+### Other Changes
diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/Directory.Build.props b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/Directory.Build.props
new file mode 100644
index 000000000000..63bd836ad44b
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/Directory.Build.props
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/README.md b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/README.md
new file mode 100644
index 000000000000..9674091e3f86
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/README.md
@@ -0,0 +1,86 @@
+# Azure.ResourceManager.ContainerOrchestratorRuntime client library for .NET
+
+Azure.ResourceManager.ContainerOrchestratorRuntime is a managed service that helps developers get secret simply and securely.
+
+Use the client library for to:
+
+* [Get secret](https://docs.microsoft.com/azure)
+
+[Source code][source_root] | [Package (NuGet)][package] | [API reference documentation][reference_docs] | [Product documentation][azconfig_docs] | [Samples][source_samples]
+
+ [Source code](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src) | [Package (NuGet)](https://www.nuget.org/packages) | [API reference documentation](https://azure.github.io/azure-sdk-for-net) | [Product documentation](https://docs.microsoft.com/azure)
+
+## Getting started
+
+This section should include everything a developer needs to do to install and create their first client connection *very quickly*.
+
+### Install the package
+
+First, provide instruction for obtaining and installing the package or library. This section might include only a single line of code, like `dotnet add package package-name`, but should enable a developer to successfully install the package from NuGet, npm, or even cloning a GitHub repository.
+
+Install the client library for .NET with [NuGet](https://www.nuget.org/ ):
+
+```dotnetcli
+dotnet add package Azure.ResourceManager.ContainerOrchestratorRuntime --prerelease
+```
+
+### Prerequisites
+
+Include a section after the install command that details any requirements that must be satisfied before a developer can [authenticate](#authenticate-the-client) and test all of the snippets in the [Examples](#examples) section. For example, for Cosmos DB:
+
+> You must have an [Azure subscription](https://azure.microsoft.com/free/dotnet/) and [Cosmos DB account](https://docs.microsoft.com/azure/cosmos-db/account-overview) (SQL API). In order to take advantage of the C# 8.0 syntax, it is recommended that you compile using the [.NET Core SDK](https://dotnet.microsoft.com/download) 3.0 or higher with a [language version](https://docs.microsoft.com/dotnet/csharp/language-reference/configure-language-version#override-a-default) of `latest`. It is also possible to compile with the .NET Core SDK 2.1.x using a language version of `preview`.
+
+### Authenticate the client
+
+If your library requires authentication for use, such as for Azure services, include instructions and example code needed for initializing and authenticating.
+
+For example, include details on obtaining an account key and endpoint URI, setting environment variables for each, and initializing the client object.
+
+## Key concepts
+
+The *Key concepts* section should describe the functionality of the main classes. Point out the most important and useful classes in the package (with links to their reference pages) and explain how those classes work together. Feel free to use bulleted lists, tables, code blocks, or even diagrams for clarity.
+
+Include the *Thread safety* and *Additional concepts* sections below at the end of your *Key concepts* section. You may remove or add links depending on what your library makes use of:
+
+### Thread safety
+
+We guarantee that all client instance methods are thread-safe and independent of each other ([guideline](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-service-methods-thread-safety)). This ensures that the recommendation of reusing client instances is always safe, even across threads.
+
+### Additional concepts
+
+[Client options](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#configuring-service-clients-using-clientoptions) |
+[Accessing the response](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#accessing-http-response-details-using-responset) |
+[Long-running operations](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#consuming-long-running-operations-using-operationt) |
+[Handling failures](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#reporting-errors-requestfailedexception) |
+[Diagnostics](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/Diagnostics.md) |
+[Mocking](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#mocking) |
+[Client lifetime](https://devblogs.microsoft.com/azure-sdk/lifetime-management-and-thread-safety-guarantees-of-azure-sdk-net-clients/)
+
+
+## Examples
+
+You can familiarize yourself with different APIs using [Samples](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples).
+
+## Troubleshooting
+
+Describe common errors and exceptions, how to "unpack" them if necessary, and include guidance for graceful handling and recovery.
+
+Provide information to help developers avoid throttling or other service-enforced errors they might encounter. For example, provide guidance and examples for using retry or connection policies in the API.
+
+If the package or a related package supports it, include tips for logging or enabling instrumentation to help them debug their code.
+
+## Next steps
+
+* Provide a link to additional code examples, ideally to those sitting alongside the README in the package's `/samples` directory.
+* If appropriate, point users to other packages that might be useful.
+* If you think there's a good chance that developers might stumble across your package in error (because they're searching for specific functionality and mistakenly think the package provides that functionality), point them to the packages they might be looking for.
+
+## Contributing
+
+This is a template, but your SDK readme should include details on how to contribute code to the repo/package.
+
+
+[style-guide-msft]: https://docs.microsoft.com/style-guide/capitalization
+[style-guide-cloud]: https://aka.ms/azsdk/cloud-style-guide
+
+
diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterBgpPeerCollection.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterBgpPeerCollection.cs
new file mode 100644
index 000000000000..0733af5a93cf
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterBgpPeerCollection.cs
@@ -0,0 +1,189 @@
+// 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.ContainerOrchestratorRuntime.Models;
+
+namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Samples
+{
+ public partial class Sample_ConnectedClusterBgpPeerCollection
+ {
+ // BgpPeers_Get
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_BgpPeersGet()
+ {
+ // Generated from example definition: 2024-03-01/BgpPeers_Get.json
+ // this example is just showing the usage of "BgpPeers_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 ArmResource created on azure
+ // for more information of creating ArmResource, please refer to the document of ArmResource
+
+ // get the collection of this ConnectedClusterBgpPeerResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
+ ConnectedClusterBgpPeerCollection collection = client.GetConnectedClusterBgpPeers(scopeId);
+
+ // invoke the operation
+ string bgpPeerName = "testpeer";
+ ConnectedClusterBgpPeerResource result = await collection.GetAsync(bgpPeerName);
+
+ // 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
+ ConnectedClusterBgpPeerData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // BgpPeers_Get
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_BgpPeersGet()
+ {
+ // Generated from example definition: 2024-03-01/BgpPeers_Get.json
+ // this example is just showing the usage of "BgpPeers_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 ArmResource created on azure
+ // for more information of creating ArmResource, please refer to the document of ArmResource
+
+ // get the collection of this ConnectedClusterBgpPeerResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
+ ConnectedClusterBgpPeerCollection collection = client.GetConnectedClusterBgpPeers(scopeId);
+
+ // invoke the operation
+ string bgpPeerName = "testpeer";
+ bool result = await collection.ExistsAsync(bgpPeerName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // BgpPeers_Get
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_BgpPeersGet()
+ {
+ // Generated from example definition: 2024-03-01/BgpPeers_Get.json
+ // this example is just showing the usage of "BgpPeers_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 ArmResource created on azure
+ // for more information of creating ArmResource, please refer to the document of ArmResource
+
+ // get the collection of this ConnectedClusterBgpPeerResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
+ ConnectedClusterBgpPeerCollection collection = client.GetConnectedClusterBgpPeers(scopeId);
+
+ // invoke the operation
+ string bgpPeerName = "testpeer";
+ NullableResponse response = await collection.GetIfExistsAsync(bgpPeerName);
+ ConnectedClusterBgpPeerResource 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
+ ConnectedClusterBgpPeerData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+
+ // BgpPeers_CreateOrUpdate
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_BgpPeersCreateOrUpdate()
+ {
+ // Generated from example definition: 2024-03-01/BgpPeers_CreateOrUpdate.json
+ // this example is just showing the usage of "BgpPeers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ArmResource created on azure
+ // for more information of creating ArmResource, please refer to the document of ArmResource
+
+ // get the collection of this ConnectedClusterBgpPeerResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
+ ConnectedClusterBgpPeerCollection collection = client.GetConnectedClusterBgpPeers(scopeId);
+
+ // invoke the operation
+ string bgpPeerName = "testpeer";
+ ConnectedClusterBgpPeerData data = new ConnectedClusterBgpPeerData()
+ {
+ Properties = new ConnectedClusterBgpPeerProperties(64500, 64501, "10.0.0.1"),
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, bgpPeerName, data);
+ ConnectedClusterBgpPeerResource 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
+ ConnectedClusterBgpPeerData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // BgpPeers_List
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_BgpPeersList()
+ {
+ // Generated from example definition: 2024-03-01/BgpPeers_List.json
+ // this example is just showing the usage of "BgpPeer_List" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ArmResource created on azure
+ // for more information of creating ArmResource, please refer to the document of ArmResource
+
+ // get the collection of this ConnectedClusterBgpPeerResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
+ ConnectedClusterBgpPeerCollection collection = client.GetConnectedClusterBgpPeers(scopeId);
+
+ // invoke the operation and iterate over the result
+ await foreach (ConnectedClusterBgpPeerResource 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
+ ConnectedClusterBgpPeerData 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/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterBgpPeerResource.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterBgpPeerResource.cs
new file mode 100644
index 000000000000..9e194a2f3a82
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterBgpPeerResource.cs
@@ -0,0 +1,109 @@
+// 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.ContainerOrchestratorRuntime.Models;
+
+namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Samples
+{
+ public partial class Sample_ConnectedClusterBgpPeerResource
+ {
+ // BgpPeers_Get
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_BgpPeersGet()
+ {
+ // Generated from example definition: 2024-03-01/BgpPeers_Get.json
+ // this example is just showing the usage of "BgpPeers_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 ConnectedClusterBgpPeerResource created on azure
+ // for more information of creating ConnectedClusterBgpPeerResource, please refer to the document of ConnectedClusterBgpPeerResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ string bgpPeerName = "testpeer";
+ ResourceIdentifier connectedClusterBgpPeerResourceId = ConnectedClusterBgpPeerResource.CreateResourceIdentifier(resourceUri, bgpPeerName);
+ ConnectedClusterBgpPeerResource connectedClusterBgpPeer = client.GetConnectedClusterBgpPeerResource(connectedClusterBgpPeerResourceId);
+
+ // invoke the operation
+ ConnectedClusterBgpPeerResource result = await connectedClusterBgpPeer.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
+ ConnectedClusterBgpPeerData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // BgpPeers_CreateOrUpdate
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Update_BgpPeersCreateOrUpdate()
+ {
+ // Generated from example definition: 2024-03-01/BgpPeers_CreateOrUpdate.json
+ // this example is just showing the usage of "BgpPeers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ConnectedClusterBgpPeerResource created on azure
+ // for more information of creating ConnectedClusterBgpPeerResource, please refer to the document of ConnectedClusterBgpPeerResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ string bgpPeerName = "testpeer";
+ ResourceIdentifier connectedClusterBgpPeerResourceId = ConnectedClusterBgpPeerResource.CreateResourceIdentifier(resourceUri, bgpPeerName);
+ ConnectedClusterBgpPeerResource connectedClusterBgpPeer = client.GetConnectedClusterBgpPeerResource(connectedClusterBgpPeerResourceId);
+
+ // invoke the operation
+ ConnectedClusterBgpPeerData data = new ConnectedClusterBgpPeerData()
+ {
+ Properties = new ConnectedClusterBgpPeerProperties(64500, 64501, "10.0.0.1"),
+ };
+ ArmOperation lro = await connectedClusterBgpPeer.UpdateAsync(WaitUntil.Completed, data);
+ ConnectedClusterBgpPeerResource 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
+ ConnectedClusterBgpPeerData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // BgpPeers_Delete
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Delete_BgpPeersDelete()
+ {
+ // Generated from example definition: 2024-03-01/BgpPeers_Delete.json
+ // this example is just showing the usage of "BgpPeers_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 ConnectedClusterBgpPeerResource created on azure
+ // for more information of creating ConnectedClusterBgpPeerResource, please refer to the document of ConnectedClusterBgpPeerResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ string bgpPeerName = "testpeer";
+ ResourceIdentifier connectedClusterBgpPeerResourceId = ConnectedClusterBgpPeerResource.CreateResourceIdentifier(resourceUri, bgpPeerName);
+ ConnectedClusterBgpPeerResource connectedClusterBgpPeer = client.GetConnectedClusterBgpPeerResource(connectedClusterBgpPeerResourceId);
+
+ // invoke the operation
+ await connectedClusterBgpPeer.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine($"Succeeded");
+ }
+ }
+}
diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterLoadBalancerCollection.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterLoadBalancerCollection.cs
new file mode 100644
index 000000000000..1c4e2af1d9a0
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterLoadBalancerCollection.cs
@@ -0,0 +1,198 @@
+// 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.ContainerOrchestratorRuntime.Models;
+
+namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Samples
+{
+ public partial class Sample_ConnectedClusterLoadBalancerCollection
+ {
+ // LoadBalancers_Get
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_LoadBalancersGet()
+ {
+ // Generated from example definition: 2024-03-01/LoadBalancers_Get.json
+ // this example is just showing the usage of "LoadBalancers_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 ArmResource created on azure
+ // for more information of creating ArmResource, please refer to the document of ArmResource
+
+ // get the collection of this ConnectedClusterLoadBalancerResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
+ ConnectedClusterLoadBalancerCollection collection = client.GetConnectedClusterLoadBalancers(scopeId);
+
+ // invoke the operation
+ string loadBalancerName = "testlb";
+ ConnectedClusterLoadBalancerResource result = await collection.GetAsync(loadBalancerName);
+
+ // 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
+ ConnectedClusterLoadBalancerData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // LoadBalancers_Get
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_LoadBalancersGet()
+ {
+ // Generated from example definition: 2024-03-01/LoadBalancers_Get.json
+ // this example is just showing the usage of "LoadBalancers_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 ArmResource created on azure
+ // for more information of creating ArmResource, please refer to the document of ArmResource
+
+ // get the collection of this ConnectedClusterLoadBalancerResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
+ ConnectedClusterLoadBalancerCollection collection = client.GetConnectedClusterLoadBalancers(scopeId);
+
+ // invoke the operation
+ string loadBalancerName = "testlb";
+ bool result = await collection.ExistsAsync(loadBalancerName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // LoadBalancers_Get
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_LoadBalancersGet()
+ {
+ // Generated from example definition: 2024-03-01/LoadBalancers_Get.json
+ // this example is just showing the usage of "LoadBalancers_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 ArmResource created on azure
+ // for more information of creating ArmResource, please refer to the document of ArmResource
+
+ // get the collection of this ConnectedClusterLoadBalancerResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
+ ConnectedClusterLoadBalancerCollection collection = client.GetConnectedClusterLoadBalancers(scopeId);
+
+ // invoke the operation
+ string loadBalancerName = "testlb";
+ NullableResponse response = await collection.GetIfExistsAsync(loadBalancerName);
+ ConnectedClusterLoadBalancerResource 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
+ ConnectedClusterLoadBalancerData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+
+ // LoadBalancers_CreateOrUpdate
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_LoadBalancersCreateOrUpdate()
+ {
+ // Generated from example definition: 2024-03-01/LoadBalancers_CreateOrUpdate.json
+ // this example is just showing the usage of "LoadBalancers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ArmResource created on azure
+ // for more information of creating ArmResource, please refer to the document of ArmResource
+
+ // get the collection of this ConnectedClusterLoadBalancerResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
+ ConnectedClusterLoadBalancerCollection collection = client.GetConnectedClusterLoadBalancers(scopeId);
+
+ // invoke the operation
+ string loadBalancerName = "testlb";
+ ConnectedClusterLoadBalancerData data = new ConnectedClusterLoadBalancerData()
+ {
+ Properties = new ConnectedClusterLoadBalancerProperties(new string[]
+ {
+"192.168.50.1/24","192.168.51.2-192.168.51.10"
+ }, AdvertiseMode.Arp)
+ {
+ ServiceSelector =
+{
+["app"] = "frontend",
+},
+ },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, loadBalancerName, data);
+ ConnectedClusterLoadBalancerResource 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
+ ConnectedClusterLoadBalancerData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // LoadBalancers_List
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_LoadBalancersList()
+ {
+ // Generated from example definition: 2024-03-01/LoadBalancers_List.json
+ // this example is just showing the usage of "LoadBalancer_List" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ArmResource created on azure
+ // for more information of creating ArmResource, please refer to the document of ArmResource
+
+ // get the collection of this ConnectedClusterLoadBalancerResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
+ ConnectedClusterLoadBalancerCollection collection = client.GetConnectedClusterLoadBalancers(scopeId);
+
+ // invoke the operation and iterate over the result
+ await foreach (ConnectedClusterLoadBalancerResource 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
+ ConnectedClusterLoadBalancerData 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/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterLoadBalancerResource.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterLoadBalancerResource.cs
new file mode 100644
index 000000000000..aa214027c2a9
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterLoadBalancerResource.cs
@@ -0,0 +1,118 @@
+// 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.ContainerOrchestratorRuntime.Models;
+
+namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Samples
+{
+ public partial class Sample_ConnectedClusterLoadBalancerResource
+ {
+ // LoadBalancers_Get
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_LoadBalancersGet()
+ {
+ // Generated from example definition: 2024-03-01/LoadBalancers_Get.json
+ // this example is just showing the usage of "LoadBalancers_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 ConnectedClusterLoadBalancerResource created on azure
+ // for more information of creating ConnectedClusterLoadBalancerResource, please refer to the document of ConnectedClusterLoadBalancerResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ string loadBalancerName = "testlb";
+ ResourceIdentifier connectedClusterLoadBalancerResourceId = ConnectedClusterLoadBalancerResource.CreateResourceIdentifier(resourceUri, loadBalancerName);
+ ConnectedClusterLoadBalancerResource connectedClusterLoadBalancer = client.GetConnectedClusterLoadBalancerResource(connectedClusterLoadBalancerResourceId);
+
+ // invoke the operation
+ ConnectedClusterLoadBalancerResource result = await connectedClusterLoadBalancer.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
+ ConnectedClusterLoadBalancerData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // LoadBalancers_CreateOrUpdate
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Update_LoadBalancersCreateOrUpdate()
+ {
+ // Generated from example definition: 2024-03-01/LoadBalancers_CreateOrUpdate.json
+ // this example is just showing the usage of "LoadBalancers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ConnectedClusterLoadBalancerResource created on azure
+ // for more information of creating ConnectedClusterLoadBalancerResource, please refer to the document of ConnectedClusterLoadBalancerResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ string loadBalancerName = "testlb";
+ ResourceIdentifier connectedClusterLoadBalancerResourceId = ConnectedClusterLoadBalancerResource.CreateResourceIdentifier(resourceUri, loadBalancerName);
+ ConnectedClusterLoadBalancerResource connectedClusterLoadBalancer = client.GetConnectedClusterLoadBalancerResource(connectedClusterLoadBalancerResourceId);
+
+ // invoke the operation
+ ConnectedClusterLoadBalancerData data = new ConnectedClusterLoadBalancerData()
+ {
+ Properties = new ConnectedClusterLoadBalancerProperties(new string[]
+ {
+"192.168.50.1/24","192.168.51.2-192.168.51.10"
+ }, AdvertiseMode.Arp)
+ {
+ ServiceSelector =
+{
+["app"] = "frontend",
+},
+ },
+ };
+ ArmOperation lro = await connectedClusterLoadBalancer.UpdateAsync(WaitUntil.Completed, data);
+ ConnectedClusterLoadBalancerResource 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
+ ConnectedClusterLoadBalancerData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // LoadBalancers_Delete
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Delete_LoadBalancersDelete()
+ {
+ // Generated from example definition: 2024-03-01/LoadBalancers_Delete.json
+ // this example is just showing the usage of "LoadBalancers_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 ConnectedClusterLoadBalancerResource created on azure
+ // for more information of creating ConnectedClusterLoadBalancerResource, please refer to the document of ConnectedClusterLoadBalancerResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ string loadBalancerName = "testlb";
+ ResourceIdentifier connectedClusterLoadBalancerResourceId = ConnectedClusterLoadBalancerResource.CreateResourceIdentifier(resourceUri, loadBalancerName);
+ ConnectedClusterLoadBalancerResource connectedClusterLoadBalancer = client.GetConnectedClusterLoadBalancerResource(connectedClusterLoadBalancerResourceId);
+
+ // invoke the operation
+ await connectedClusterLoadBalancer.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine($"Succeeded");
+ }
+ }
+}
diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterServiceCollection.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterServiceCollection.cs
new file mode 100644
index 000000000000..228345822375
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterServiceCollection.cs
@@ -0,0 +1,189 @@
+// 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.ContainerOrchestratorRuntime.Models;
+
+namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Samples
+{
+ public partial class Sample_ConnectedClusterServiceCollection
+ {
+ // Services_Get
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_ServicesGet()
+ {
+ // Generated from example definition: 2024-03-01/Services_Get.json
+ // this example is just showing the usage of "Services_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 ArmResource created on azure
+ // for more information of creating ArmResource, please refer to the document of ArmResource
+
+ // get the collection of this ConnectedClusterServiceResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
+ ConnectedClusterServiceCollection collection = client.GetConnectedClusterServices(scopeId);
+
+ // invoke the operation
+ string serviceName = "storageclass";
+ ConnectedClusterServiceResource result = await collection.GetAsync(serviceName);
+
+ // 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
+ ConnectedClusterServiceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Services_Get
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_ServicesGet()
+ {
+ // Generated from example definition: 2024-03-01/Services_Get.json
+ // this example is just showing the usage of "Services_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 ArmResource created on azure
+ // for more information of creating ArmResource, please refer to the document of ArmResource
+
+ // get the collection of this ConnectedClusterServiceResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
+ ConnectedClusterServiceCollection collection = client.GetConnectedClusterServices(scopeId);
+
+ // invoke the operation
+ string serviceName = "storageclass";
+ bool result = await collection.ExistsAsync(serviceName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Services_Get
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_ServicesGet()
+ {
+ // Generated from example definition: 2024-03-01/Services_Get.json
+ // this example is just showing the usage of "Services_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 ArmResource created on azure
+ // for more information of creating ArmResource, please refer to the document of ArmResource
+
+ // get the collection of this ConnectedClusterServiceResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
+ ConnectedClusterServiceCollection collection = client.GetConnectedClusterServices(scopeId);
+
+ // invoke the operation
+ string serviceName = "storageclass";
+ NullableResponse response = await collection.GetIfExistsAsync(serviceName);
+ ConnectedClusterServiceResource 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
+ ConnectedClusterServiceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+
+ // Services_CreateOrUpdate
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_ServicesCreateOrUpdate()
+ {
+ // Generated from example definition: 2024-03-01/Services_CreateOrUpdate.json
+ // this example is just showing the usage of "Services_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ArmResource created on azure
+ // for more information of creating ArmResource, please refer to the document of ArmResource
+
+ // get the collection of this ConnectedClusterServiceResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
+ ConnectedClusterServiceCollection collection = client.GetConnectedClusterServices(scopeId);
+
+ // invoke the operation
+ string serviceName = "storageclass";
+ ConnectedClusterServiceData data = new ConnectedClusterServiceData()
+ {
+ Properties = new ConnectedClusterServiceProperties(),
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, serviceName, data);
+ ConnectedClusterServiceResource 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
+ ConnectedClusterServiceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Services_List
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ServicesList()
+ {
+ // Generated from example definition: 2024-03-01/Services_List.json
+ // this example is just showing the usage of "ServiceResource_List" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ArmResource created on azure
+ // for more information of creating ArmResource, please refer to the document of ArmResource
+
+ // get the collection of this ConnectedClusterServiceResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
+ ConnectedClusterServiceCollection collection = client.GetConnectedClusterServices(scopeId);
+
+ // invoke the operation and iterate over the result
+ await foreach (ConnectedClusterServiceResource 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
+ ConnectedClusterServiceData 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/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterServiceResource.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterServiceResource.cs
new file mode 100644
index 000000000000..f17f338e508b
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterServiceResource.cs
@@ -0,0 +1,109 @@
+// 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.ContainerOrchestratorRuntime.Models;
+
+namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Samples
+{
+ public partial class Sample_ConnectedClusterServiceResource
+ {
+ // Services_Get
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_ServicesGet()
+ {
+ // Generated from example definition: 2024-03-01/Services_Get.json
+ // this example is just showing the usage of "Services_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 ConnectedClusterServiceResource created on azure
+ // for more information of creating ConnectedClusterServiceResource, please refer to the document of ConnectedClusterServiceResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ string serviceName = "storageclass";
+ ResourceIdentifier connectedClusterServiceResourceId = ConnectedClusterServiceResource.CreateResourceIdentifier(resourceUri, serviceName);
+ ConnectedClusterServiceResource connectedClusterService = client.GetConnectedClusterServiceResource(connectedClusterServiceResourceId);
+
+ // invoke the operation
+ ConnectedClusterServiceResource result = await connectedClusterService.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
+ ConnectedClusterServiceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Services_CreateOrUpdate
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Update_ServicesCreateOrUpdate()
+ {
+ // Generated from example definition: 2024-03-01/Services_CreateOrUpdate.json
+ // this example is just showing the usage of "Services_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ConnectedClusterServiceResource created on azure
+ // for more information of creating ConnectedClusterServiceResource, please refer to the document of ConnectedClusterServiceResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ string serviceName = "storageclass";
+ ResourceIdentifier connectedClusterServiceResourceId = ConnectedClusterServiceResource.CreateResourceIdentifier(resourceUri, serviceName);
+ ConnectedClusterServiceResource connectedClusterService = client.GetConnectedClusterServiceResource(connectedClusterServiceResourceId);
+
+ // invoke the operation
+ ConnectedClusterServiceData data = new ConnectedClusterServiceData()
+ {
+ Properties = new ConnectedClusterServiceProperties(),
+ };
+ ArmOperation lro = await connectedClusterService.UpdateAsync(WaitUntil.Completed, data);
+ ConnectedClusterServiceResource 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
+ ConnectedClusterServiceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Services_Delete
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Delete_ServicesDelete()
+ {
+ // Generated from example definition: 2024-03-01/Services_Delete.json
+ // this example is just showing the usage of "Services_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 ConnectedClusterServiceResource created on azure
+ // for more information of creating ConnectedClusterServiceResource, please refer to the document of ConnectedClusterServiceResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ string serviceName = "storageclass";
+ ResourceIdentifier connectedClusterServiceResourceId = ConnectedClusterServiceResource.CreateResourceIdentifier(resourceUri, serviceName);
+ ConnectedClusterServiceResource connectedClusterService = client.GetConnectedClusterServiceResource(connectedClusterServiceResourceId);
+
+ // invoke the operation
+ await connectedClusterService.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine($"Succeeded");
+ }
+ }
+}
diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterStorageClassCollection.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterStorageClassCollection.cs
new file mode 100644
index 000000000000..ed2fd49c78f9
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterStorageClassCollection.cs
@@ -0,0 +1,189 @@
+// 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.ContainerOrchestratorRuntime.Models;
+
+namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Samples
+{
+ public partial class Sample_ConnectedClusterStorageClassCollection
+ {
+ // StorageClass_Get_0
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_StorageClassGet0()
+ {
+ // Generated from example definition: 2024-03-01/StorageClass_Get.json
+ // this example is just showing the usage of "StorageClass_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 ArmResource created on azure
+ // for more information of creating ArmResource, please refer to the document of ArmResource
+
+ // get the collection of this ConnectedClusterStorageClassResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
+ ConnectedClusterStorageClassCollection collection = client.GetConnectedClusterStorageClasses(scopeId);
+
+ // invoke the operation
+ string storageClassName = "testrwx";
+ ConnectedClusterStorageClassResource result = await collection.GetAsync(storageClassName);
+
+ // 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
+ ConnectedClusterStorageClassData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // StorageClass_Get_0
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_StorageClassGet0()
+ {
+ // Generated from example definition: 2024-03-01/StorageClass_Get.json
+ // this example is just showing the usage of "StorageClass_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 ArmResource created on azure
+ // for more information of creating ArmResource, please refer to the document of ArmResource
+
+ // get the collection of this ConnectedClusterStorageClassResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
+ ConnectedClusterStorageClassCollection collection = client.GetConnectedClusterStorageClasses(scopeId);
+
+ // invoke the operation
+ string storageClassName = "testrwx";
+ bool result = await collection.ExistsAsync(storageClassName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // StorageClass_Get_0
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_StorageClassGet0()
+ {
+ // Generated from example definition: 2024-03-01/StorageClass_Get.json
+ // this example is just showing the usage of "StorageClass_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 ArmResource created on azure
+ // for more information of creating ArmResource, please refer to the document of ArmResource
+
+ // get the collection of this ConnectedClusterStorageClassResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
+ ConnectedClusterStorageClassCollection collection = client.GetConnectedClusterStorageClasses(scopeId);
+
+ // invoke the operation
+ string storageClassName = "testrwx";
+ NullableResponse response = await collection.GetIfExistsAsync(storageClassName);
+ ConnectedClusterStorageClassResource 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
+ ConnectedClusterStorageClassData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+
+ // StorageClass_CreateOrUpdate_0
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_StorageClassCreateOrUpdate0()
+ {
+ // Generated from example definition: 2024-03-01/StorageClass_CreateOrUpdate.json
+ // this example is just showing the usage of "StorageClass_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ArmResource created on azure
+ // for more information of creating ArmResource, please refer to the document of ArmResource
+
+ // get the collection of this ConnectedClusterStorageClassResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
+ ConnectedClusterStorageClassCollection collection = client.GetConnectedClusterStorageClasses(scopeId);
+
+ // invoke the operation
+ string storageClassName = "testrwx";
+ ConnectedClusterStorageClassData data = new ConnectedClusterStorageClassData()
+ {
+ Properties = new ConnectedClusterStorageClassProperties(new RwxStorageClassTypeProperties("default")),
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, storageClassName, data);
+ ConnectedClusterStorageClassResource 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
+ ConnectedClusterStorageClassData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // StorageClass_List_0
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_StorageClassList0()
+ {
+ // Generated from example definition: 2024-03-01/StorageClass_List.json
+ // this example is just showing the usage of "StorageClassResource_List" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ArmResource created on azure
+ // for more information of creating ArmResource, please refer to the document of ArmResource
+
+ // get the collection of this ConnectedClusterStorageClassResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
+ ConnectedClusterStorageClassCollection collection = client.GetConnectedClusterStorageClasses(scopeId);
+
+ // invoke the operation and iterate over the result
+ await foreach (ConnectedClusterStorageClassResource 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
+ ConnectedClusterStorageClassData 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/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterStorageClassResource.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterStorageClassResource.cs
new file mode 100644
index 000000000000..2e2866223353
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/samples/Generated/Samples/Sample_ConnectedClusterStorageClassResource.cs
@@ -0,0 +1,115 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.ContainerOrchestratorRuntime.Models;
+
+namespace Azure.ResourceManager.ContainerOrchestratorRuntime.Samples
+{
+ public partial class Sample_ConnectedClusterStorageClassResource
+ {
+ // StorageClass_Get_0
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_StorageClassGet0()
+ {
+ // Generated from example definition: 2024-03-01/StorageClass_Get.json
+ // this example is just showing the usage of "StorageClass_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 ConnectedClusterStorageClassResource created on azure
+ // for more information of creating ConnectedClusterStorageClassResource, please refer to the document of ConnectedClusterStorageClassResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ string storageClassName = "testrwx";
+ ResourceIdentifier connectedClusterStorageClassResourceId = ConnectedClusterStorageClassResource.CreateResourceIdentifier(resourceUri, storageClassName);
+ ConnectedClusterStorageClassResource connectedClusterStorageClass = client.GetConnectedClusterStorageClassResource(connectedClusterStorageClassResourceId);
+
+ // invoke the operation
+ ConnectedClusterStorageClassResource result = await connectedClusterStorageClass.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
+ ConnectedClusterStorageClassData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // StorageClass_Update_0
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Update_StorageClassUpdate0()
+ {
+ // Generated from example definition: 2024-03-01/StorageClass_Update.json
+ // this example is just showing the usage of "StorageClass_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 ConnectedClusterStorageClassResource created on azure
+ // for more information of creating ConnectedClusterStorageClassResource, please refer to the document of ConnectedClusterStorageClassResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ string storageClassName = "testrwx";
+ ResourceIdentifier connectedClusterStorageClassResourceId = ConnectedClusterStorageClassResource.CreateResourceIdentifier(resourceUri, storageClassName);
+ ConnectedClusterStorageClassResource connectedClusterStorageClass = client.GetConnectedClusterStorageClassResource(connectedClusterStorageClassResourceId);
+
+ // invoke the operation
+ ConnectedClusterStorageClassPatch patch = new ConnectedClusterStorageClassPatch()
+ {
+ Properties = new StorageClassPropertiesUpdate()
+ {
+ TypeProperties = new StorageClassTypePropertiesUpdate()
+ {
+ BackingStorageClassName = "default",
+ },
+ },
+ };
+ ArmOperation lro = await connectedClusterStorageClass.UpdateAsync(WaitUntil.Completed, patch);
+ ConnectedClusterStorageClassResource 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
+ ConnectedClusterStorageClassData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // StorageClass_Delete_0
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Delete_StorageClassDelete0()
+ {
+ // Generated from example definition: 2024-03-01/StorageClass_Delete.json
+ // this example is just showing the usage of "StorageClass_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 ConnectedClusterStorageClassResource created on azure
+ // for more information of creating ConnectedClusterStorageClassResource, please refer to the document of ConnectedClusterStorageClassResource
+ string resourceUri = "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/example/providers/Microsoft.Kubernetes/connectedClusters/cluster1";
+ string storageClassName = "testrwx";
+ ResourceIdentifier connectedClusterStorageClassResourceId = ConnectedClusterStorageClassResource.CreateResourceIdentifier(resourceUri, storageClassName);
+ ConnectedClusterStorageClassResource connectedClusterStorageClass = client.GetConnectedClusterStorageClassResource(connectedClusterStorageClassResourceId);
+
+ // invoke the operation
+ await connectedClusterStorageClass.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine($"Succeeded");
+ }
+ }
+}
diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Azure.ResourceManager.ContainerOrchestratorRuntime.csproj b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Azure.ResourceManager.ContainerOrchestratorRuntime.csproj
new file mode 100644
index 000000000000..73e9831f85f0
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Azure.ResourceManager.ContainerOrchestratorRuntime.csproj
@@ -0,0 +1,10 @@
+
+
+ This is the Azure.ResourceManager.ContainerOrchestratorRuntime client library for developing .NET applications with rich experience.
+ Azure SDK Code Generation Azure.ResourceManager.ContainerOrchestratorRuntime for Azure Data Plane
+ 1.0.0-beta.1
+ Azure.ResourceManager.ContainerOrchestratorRuntime
+ $(RequiredTargetFrameworks)
+ true
+
+
diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ArmContainerOrchestratorRuntimeModelFactory.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ArmContainerOrchestratorRuntimeModelFactory.cs
new file mode 100644
index 000000000000..f33ab58d1c2e
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ArmContainerOrchestratorRuntimeModelFactory.cs
@@ -0,0 +1,173 @@
+// 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.ContainerOrchestratorRuntime.Models
+{
+ /// Model factory for models.
+ public static partial class ArmContainerOrchestratorRuntimeModelFactory
+ {
+ /// 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 ConnectedClusterServiceData ConnectedClusterServiceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ConnectedClusterServiceProperties properties = null)
+ {
+ return new ConnectedClusterServiceData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ properties,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The object id of the service principal of the RP provisioned in the tenant.
+ /// Resource provision state.
+ /// A new instance for mocking.
+ public static ConnectedClusterServiceProperties ConnectedClusterServiceProperties(Guid? rpObjectId = null, ContainerOrchestratorProvisioningState? provisioningState = null)
+ {
+ return new ConnectedClusterServiceProperties(rpObjectId, provisioningState, 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 ConnectedClusterBgpPeerData ConnectedClusterBgpPeerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ConnectedClusterBgpPeerProperties properties = null)
+ {
+ return new ConnectedClusterBgpPeerData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ properties,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// My ASN.
+ /// Peer ASN.
+ /// Peer Address.
+ /// Resource provision state.
+ /// A new instance for mocking.
+ public static ConnectedClusterBgpPeerProperties ConnectedClusterBgpPeerProperties(int myAsn = default, int peerAsn = default, string peerAddress = null, ContainerOrchestratorProvisioningState? provisioningState = null)
+ {
+ return new ConnectedClusterBgpPeerProperties(myAsn, peerAsn, peerAddress, provisioningState, 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 ConnectedClusterLoadBalancerData ConnectedClusterLoadBalancerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ConnectedClusterLoadBalancerProperties properties = null)
+ {
+ return new ConnectedClusterLoadBalancerData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ properties,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// IP Range.
+ /// A dynamic label mapping to select related services. For instance, if you want to create a load balancer only for services with label "a=b", then please specify {"a": "b"} in the field.
+ /// Advertise Mode.
+ /// The list of BGP peers it should advertise to. Null or empty means to advertise to all peers.
+ /// Resource provision state.
+ /// A new instance for mocking.
+ public static ConnectedClusterLoadBalancerProperties ConnectedClusterLoadBalancerProperties(IEnumerable addresses = null, IDictionary serviceSelector = null, AdvertiseMode advertiseMode = default, IEnumerable bgpPeers = null, ContainerOrchestratorProvisioningState? provisioningState = null)
+ {
+ addresses ??= new List();
+ serviceSelector ??= new Dictionary();
+ bgpPeers ??= new List();
+
+ return new ConnectedClusterLoadBalancerProperties(
+ addresses?.ToList(),
+ serviceSelector,
+ advertiseMode,
+ bgpPeers?.ToList(),
+ provisioningState,
+ 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 ConnectedClusterStorageClassData ConnectedClusterStorageClassData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ConnectedClusterStorageClassProperties properties = null)
+ {
+ return new ConnectedClusterStorageClassData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ properties,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Volume can be expanded or not.
+ /// Additional mount options.
+ /// Provisioner name.
+ /// Binding mode of volumes: Immediate, WaitForFirstConsumer.
+ /// The access mode: [ReadWriteOnce, ReadWriteMany] or [ReadWriteOnce].
+ /// Allow single data node failure.
+ /// Failover speed: NA, Slow, Fast.
+ /// Limitations of the storage class.
+ /// Performance tier.
+ /// Selection priority when multiple storage classes meet the criteria. 0: Highest, -1: Never use.
+ ///
+ /// Properties of the StorageClass
+ /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
+ /// The available derived classes include , , , and .
+ ///
+ /// Resource provision state.
+ /// A new instance for mocking.
+ public static ConnectedClusterStorageClassProperties ConnectedClusterStorageClassProperties(VolumeExpansion? allowVolumeExpansion = null, IEnumerable mountOptions = null, string provisioner = null, VolumeBindingMode? volumeBindingMode = null, IEnumerable accessModes = null, DataResilienceTier? dataResilience = null, FailoverTier? failoverSpeed = null, IEnumerable limitations = null, PerformanceTier? performance = null, long? priority = null, StorageClassTypeProperties typeProperties = null, ContainerOrchestratorProvisioningState? provisioningState = null)
+ {
+ mountOptions ??= new List();
+ accessModes ??= new List();
+ limitations ??= new List();
+
+ return new ConnectedClusterStorageClassProperties(
+ allowVolumeExpansion,
+ mountOptions?.ToList(),
+ provisioner,
+ volumeBindingMode,
+ accessModes?.ToList(),
+ dataResilience,
+ failoverSpeed,
+ limitations?.ToList(),
+ performance,
+ priority,
+ typeProperties,
+ provisioningState,
+ serializedAdditionalRawData: null);
+ }
+ }
+}
diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerCollection.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerCollection.cs
new file mode 100644
index 000000000000..67264f01a56f
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerCollection.cs
@@ -0,0 +1,483 @@
+// 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.Threading;
+using System.Threading.Tasks;
+using Autorest.CSharp.Core;
+using Azure.Core;
+using Azure.Core.Pipeline;
+
+namespace Azure.ResourceManager.ContainerOrchestratorRuntime
+{
+ ///
+ /// A class representing a collection of and their operations.
+ /// Each in the collection will belong to the same instance of .
+ /// To get a instance call the GetConnectedClusterBgpPeers method from an instance of .
+ ///
+ public partial class ConnectedClusterBgpPeerCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _connectedClusterBgpPeerBgpPeersClientDiagnostics;
+ private readonly BgpPeersRestOperations _connectedClusterBgpPeerBgpPeersRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected ConnectedClusterBgpPeerCollection()
+ {
+ }
+
+ /// 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 ConnectedClusterBgpPeerCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _connectedClusterBgpPeerBgpPeersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerOrchestratorRuntime", ConnectedClusterBgpPeerResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ConnectedClusterBgpPeerResource.ResourceType, out string connectedClusterBgpPeerBgpPeersApiVersion);
+ _connectedClusterBgpPeerBgpPeersRestClient = new BgpPeersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, connectedClusterBgpPeerBgpPeersApiVersion);
+ }
+
+ ///
+ /// Create a BgpPeer
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName}
+ ///
+ /// -
+ /// Operation Id
+ /// BgpPeers_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of the BgpPeer.
+ /// Resource create parameters.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string bgpPeerName, ConnectedClusterBgpPeerData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(bgpPeerName, nameof(bgpPeerName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _connectedClusterBgpPeerBgpPeersClientDiagnostics.CreateScope("ConnectedClusterBgpPeerCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = await _connectedClusterBgpPeerBgpPeersRestClient.CreateOrUpdateAsync(Id, bgpPeerName, data, cancellationToken).ConfigureAwait(false);
+ var operation = new ContainerOrchestratorRuntimeArmOperation(new ConnectedClusterBgpPeerOperationSource(Client), _connectedClusterBgpPeerBgpPeersClientDiagnostics, Pipeline, _connectedClusterBgpPeerBgpPeersRestClient.CreateCreateOrUpdateRequest(Id, bgpPeerName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create a BgpPeer
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName}
+ ///
+ /// -
+ /// Operation Id
+ /// BgpPeers_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of the BgpPeer.
+ /// Resource create parameters.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string bgpPeerName, ConnectedClusterBgpPeerData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(bgpPeerName, nameof(bgpPeerName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _connectedClusterBgpPeerBgpPeersClientDiagnostics.CreateScope("ConnectedClusterBgpPeerCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = _connectedClusterBgpPeerBgpPeersRestClient.CreateOrUpdate(Id, bgpPeerName, data, cancellationToken);
+ var operation = new ContainerOrchestratorRuntimeArmOperation(new ConnectedClusterBgpPeerOperationSource(Client), _connectedClusterBgpPeerBgpPeersClientDiagnostics, Pipeline, _connectedClusterBgpPeerBgpPeersRestClient.CreateCreateOrUpdateRequest(Id, bgpPeerName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a BgpPeer
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName}
+ ///
+ /// -
+ /// Operation Id
+ /// BgpPeers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the BgpPeer.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetAsync(string bgpPeerName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(bgpPeerName, nameof(bgpPeerName));
+
+ using var scope = _connectedClusterBgpPeerBgpPeersClientDiagnostics.CreateScope("ConnectedClusterBgpPeerCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = await _connectedClusterBgpPeerBgpPeersRestClient.GetAsync(Id, bgpPeerName, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ConnectedClusterBgpPeerResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a BgpPeer
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName}
+ ///
+ /// -
+ /// Operation Id
+ /// BgpPeers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the BgpPeer.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Get(string bgpPeerName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(bgpPeerName, nameof(bgpPeerName));
+
+ using var scope = _connectedClusterBgpPeerBgpPeersClientDiagnostics.CreateScope("ConnectedClusterBgpPeerCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = _connectedClusterBgpPeerBgpPeersRestClient.Get(Id, bgpPeerName, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ConnectedClusterBgpPeerResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// List BgpPeer resources by parent
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers
+ ///
+ /// -
+ /// Operation Id
+ /// BgpPeer_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// 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) => _connectedClusterBgpPeerBgpPeersRestClient.CreateListRequest(Id);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _connectedClusterBgpPeerBgpPeersRestClient.CreateListNextPageRequest(nextLink, Id);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ConnectedClusterBgpPeerResource(Client, ConnectedClusterBgpPeerData.DeserializeConnectedClusterBgpPeerData(e)), _connectedClusterBgpPeerBgpPeersClientDiagnostics, Pipeline, "ConnectedClusterBgpPeerCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// List BgpPeer resources by parent
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers
+ ///
+ /// -
+ /// Operation Id
+ /// BgpPeer_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// 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) => _connectedClusterBgpPeerBgpPeersRestClient.CreateListRequest(Id);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _connectedClusterBgpPeerBgpPeersRestClient.CreateListNextPageRequest(nextLink, Id);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ConnectedClusterBgpPeerResource(Client, ConnectedClusterBgpPeerData.DeserializeConnectedClusterBgpPeerData(e)), _connectedClusterBgpPeerBgpPeersClientDiagnostics, Pipeline, "ConnectedClusterBgpPeerCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName}
+ ///
+ /// -
+ /// Operation Id
+ /// BgpPeers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the BgpPeer.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> ExistsAsync(string bgpPeerName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(bgpPeerName, nameof(bgpPeerName));
+
+ using var scope = _connectedClusterBgpPeerBgpPeersClientDiagnostics.CreateScope("ConnectedClusterBgpPeerCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = await _connectedClusterBgpPeerBgpPeersRestClient.GetAsync(Id, bgpPeerName, 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
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName}
+ ///
+ /// -
+ /// Operation Id
+ /// BgpPeers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the BgpPeer.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Exists(string bgpPeerName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(bgpPeerName, nameof(bgpPeerName));
+
+ using var scope = _connectedClusterBgpPeerBgpPeersClientDiagnostics.CreateScope("ConnectedClusterBgpPeerCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = _connectedClusterBgpPeerBgpPeersRestClient.Get(Id, bgpPeerName, 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
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName}
+ ///
+ /// -
+ /// Operation Id
+ /// BgpPeers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the BgpPeer.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetIfExistsAsync(string bgpPeerName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(bgpPeerName, nameof(bgpPeerName));
+
+ using var scope = _connectedClusterBgpPeerBgpPeersClientDiagnostics.CreateScope("ConnectedClusterBgpPeerCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = await _connectedClusterBgpPeerBgpPeersRestClient.GetAsync(Id, bgpPeerName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new ConnectedClusterBgpPeerResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName}
+ ///
+ /// -
+ /// Operation Id
+ /// BgpPeers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the BgpPeer.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual NullableResponse GetIfExists(string bgpPeerName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(bgpPeerName, nameof(bgpPeerName));
+
+ using var scope = _connectedClusterBgpPeerBgpPeersClientDiagnostics.CreateScope("ConnectedClusterBgpPeerCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = _connectedClusterBgpPeerBgpPeersRestClient.Get(Id, bgpPeerName, cancellationToken: cancellationToken);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new ConnectedClusterBgpPeerResource(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/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerData.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerData.Serialization.cs
new file mode 100644
index 000000000000..31d9f261812b
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerData.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.ContainerOrchestratorRuntime.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.ContainerOrchestratorRuntime
+{
+ public partial class ConnectedClusterBgpPeerData : 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(ConnectedClusterBgpPeerData)} does not support writing '{format}' format.");
+ }
+
+ base.JsonModelWriteCore(writer, options);
+ if (Optional.IsDefined(Properties))
+ {
+ writer.WritePropertyName("properties"u8);
+ writer.WriteObjectValue(Properties, options);
+ }
+ }
+
+ ConnectedClusterBgpPeerData 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(ConnectedClusterBgpPeerData)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeConnectedClusterBgpPeerData(document.RootElement, options);
+ }
+
+ internal static ConnectedClusterBgpPeerData DeserializeConnectedClusterBgpPeerData(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ ConnectedClusterBgpPeerProperties 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 = ConnectedClusterBgpPeerProperties.DeserializeConnectedClusterBgpPeerProperties(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 ConnectedClusterBgpPeerData(
+ 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(ConnectedClusterBgpPeerData)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ ConnectedClusterBgpPeerData 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);
+ return DeserializeConnectedClusterBgpPeerData(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(ConnectedClusterBgpPeerData)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerData.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerData.cs
new file mode 100644
index 000000000000..e8ec52c25c3a
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerData.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.ContainerOrchestratorRuntime.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.ContainerOrchestratorRuntime
+{
+ ///
+ /// A class representing the ConnectedClusterBgpPeer data model.
+ /// A BgpPeer resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters)
+ ///
+ public partial class ConnectedClusterBgpPeerData : ResourceData
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ public ConnectedClusterBgpPeerData()
+ {
+ }
+
+ /// 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 ConnectedClusterBgpPeerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ConnectedClusterBgpPeerProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
+ {
+ Properties = properties;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// The resource-specific properties for this resource.
+ public ConnectedClusterBgpPeerProperties Properties { get; set; }
+ }
+}
diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerResource.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerResource.Serialization.cs
new file mode 100644
index 000000000000..c9b1f1e68a34
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerResource.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.ContainerOrchestratorRuntime
+{
+ public partial class ConnectedClusterBgpPeerResource : IJsonModel
+ {
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options);
+
+ ConnectedClusterBgpPeerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options);
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options);
+
+ ConnectedClusterBgpPeerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options);
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options);
+ }
+}
diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerResource.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerResource.cs
new file mode 100644
index 000000000000..39df17ebc2f4
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerResource.cs
@@ -0,0 +1,349 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Core.Pipeline;
+
+namespace Azure.ResourceManager.ContainerOrchestratorRuntime
+{
+ ///
+ /// A Class representing a ConnectedClusterBgpPeer along with the instance operations that can be performed on it.
+ /// If you have a you can construct a
+ /// from an instance of using the GetConnectedClusterBgpPeerResource method.
+ /// Otherwise you can get one from its parent resource using the GetConnectedClusterBgpPeer method.
+ ///
+ public partial class ConnectedClusterBgpPeerResource : ArmResource
+ {
+ /// Generate the resource identifier of a instance.
+ /// The resourceUri.
+ /// The bgpPeerName.
+ public static ResourceIdentifier CreateResourceIdentifier(string resourceUri, string bgpPeerName)
+ {
+ var resourceId = $"{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ private readonly ClientDiagnostics _connectedClusterBgpPeerBgpPeersClientDiagnostics;
+ private readonly BgpPeersRestOperations _connectedClusterBgpPeerBgpPeersRestClient;
+ private readonly ConnectedClusterBgpPeerData _data;
+
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "Microsoft.KubernetesRuntime/bgpPeers";
+
+ /// Initializes a new instance of the class for mocking.
+ protected ConnectedClusterBgpPeerResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal ConnectedClusterBgpPeerResource(ArmClient client, ConnectedClusterBgpPeerData 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 ConnectedClusterBgpPeerResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _connectedClusterBgpPeerBgpPeersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerOrchestratorRuntime", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string connectedClusterBgpPeerBgpPeersApiVersion);
+ _connectedClusterBgpPeerBgpPeersRestClient = new BgpPeersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, connectedClusterBgpPeerBgpPeersApiVersion);
+#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 ConnectedClusterBgpPeerData 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 BgpPeer
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName}
+ ///
+ /// -
+ /// Operation Id
+ /// BgpPeers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _connectedClusterBgpPeerBgpPeersClientDiagnostics.CreateScope("ConnectedClusterBgpPeerResource.Get");
+ scope.Start();
+ try
+ {
+ var response = await _connectedClusterBgpPeerBgpPeersRestClient.GetAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ConnectedClusterBgpPeerResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a BgpPeer
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName}
+ ///
+ /// -
+ /// Operation Id
+ /// BgpPeers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using var scope = _connectedClusterBgpPeerBgpPeersClientDiagnostics.CreateScope("ConnectedClusterBgpPeerResource.Get");
+ scope.Start();
+ try
+ {
+ var response = _connectedClusterBgpPeerBgpPeersRestClient.Get(Id.Parent, Id.Name, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ConnectedClusterBgpPeerResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete a BgpPeer
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName}
+ ///
+ /// -
+ /// Operation Id
+ /// BgpPeers_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// 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 = _connectedClusterBgpPeerBgpPeersClientDiagnostics.CreateScope("ConnectedClusterBgpPeerResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = await _connectedClusterBgpPeerBgpPeersRestClient.DeleteAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false);
+ var uri = _connectedClusterBgpPeerBgpPeersRestClient.CreateDeleteRequestUri(Id.Parent, Id.Name);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new ContainerOrchestratorRuntimeArmOperation(response, rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete a BgpPeer
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName}
+ ///
+ /// -
+ /// Operation Id
+ /// BgpPeers_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// 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 = _connectedClusterBgpPeerBgpPeersClientDiagnostics.CreateScope("ConnectedClusterBgpPeerResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = _connectedClusterBgpPeerBgpPeersRestClient.Delete(Id.Parent, Id.Name, cancellationToken);
+ var uri = _connectedClusterBgpPeerBgpPeersRestClient.CreateDeleteRequestUri(Id.Parent, Id.Name);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new ContainerOrchestratorRuntimeArmOperation(response, rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletionResponse(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create a BgpPeer
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName}
+ ///
+ /// -
+ /// Operation Id
+ /// BgpPeers_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// Resource create parameters.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> UpdateAsync(WaitUntil waitUntil, ConnectedClusterBgpPeerData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _connectedClusterBgpPeerBgpPeersClientDiagnostics.CreateScope("ConnectedClusterBgpPeerResource.Update");
+ scope.Start();
+ try
+ {
+ var response = await _connectedClusterBgpPeerBgpPeersRestClient.CreateOrUpdateAsync(Id.Parent, Id.Name, data, cancellationToken).ConfigureAwait(false);
+ var operation = new ContainerOrchestratorRuntimeArmOperation(new ConnectedClusterBgpPeerOperationSource(Client), _connectedClusterBgpPeerBgpPeersClientDiagnostics, Pipeline, _connectedClusterBgpPeerBgpPeersRestClient.CreateCreateOrUpdateRequest(Id.Parent, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create a BgpPeer
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName}
+ ///
+ /// -
+ /// Operation Id
+ /// BgpPeers_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// Resource create parameters.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual ArmOperation Update(WaitUntil waitUntil, ConnectedClusterBgpPeerData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _connectedClusterBgpPeerBgpPeersClientDiagnostics.CreateScope("ConnectedClusterBgpPeerResource.Update");
+ scope.Start();
+ try
+ {
+ var response = _connectedClusterBgpPeerBgpPeersRestClient.CreateOrUpdate(Id.Parent, Id.Name, data, cancellationToken);
+ var operation = new ContainerOrchestratorRuntimeArmOperation(new ConnectedClusterBgpPeerOperationSource(Client), _connectedClusterBgpPeerBgpPeersClientDiagnostics, Pipeline, _connectedClusterBgpPeerBgpPeersRestClient.CreateCreateOrUpdateRequest(Id.Parent, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerCollection.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerCollection.cs
new file mode 100644
index 000000000000..a724f2f76bd1
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerCollection.cs
@@ -0,0 +1,483 @@
+// 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.Threading;
+using System.Threading.Tasks;
+using Autorest.CSharp.Core;
+using Azure.Core;
+using Azure.Core.Pipeline;
+
+namespace Azure.ResourceManager.ContainerOrchestratorRuntime
+{
+ ///
+ /// A class representing a collection of and their operations.
+ /// Each in the collection will belong to the same instance of .
+ /// To get a instance call the GetConnectedClusterLoadBalancers method from an instance of .
+ ///
+ public partial class ConnectedClusterLoadBalancerCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _connectedClusterLoadBalancerLoadBalancersClientDiagnostics;
+ private readonly LoadBalancersRestOperations _connectedClusterLoadBalancerLoadBalancersRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected ConnectedClusterLoadBalancerCollection()
+ {
+ }
+
+ /// 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 ConnectedClusterLoadBalancerCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _connectedClusterLoadBalancerLoadBalancersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerOrchestratorRuntime", ConnectedClusterLoadBalancerResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ConnectedClusterLoadBalancerResource.ResourceType, out string connectedClusterLoadBalancerLoadBalancersApiVersion);
+ _connectedClusterLoadBalancerLoadBalancersRestClient = new LoadBalancersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, connectedClusterLoadBalancerLoadBalancersApiVersion);
+ }
+
+ ///
+ /// Create a LoadBalancer
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of the LoadBalancer.
+ /// Resource create parameters.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string loadBalancerName, ConnectedClusterLoadBalancerData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(loadBalancerName, nameof(loadBalancerName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _connectedClusterLoadBalancerLoadBalancersClientDiagnostics.CreateScope("ConnectedClusterLoadBalancerCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = await _connectedClusterLoadBalancerLoadBalancersRestClient.CreateOrUpdateAsync(Id, loadBalancerName, data, cancellationToken).ConfigureAwait(false);
+ var operation = new ContainerOrchestratorRuntimeArmOperation(new ConnectedClusterLoadBalancerOperationSource(Client), _connectedClusterLoadBalancerLoadBalancersClientDiagnostics, Pipeline, _connectedClusterLoadBalancerLoadBalancersRestClient.CreateCreateOrUpdateRequest(Id, loadBalancerName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create a LoadBalancer
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of the LoadBalancer.
+ /// Resource create parameters.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string loadBalancerName, ConnectedClusterLoadBalancerData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(loadBalancerName, nameof(loadBalancerName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _connectedClusterLoadBalancerLoadBalancersClientDiagnostics.CreateScope("ConnectedClusterLoadBalancerCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = _connectedClusterLoadBalancerLoadBalancersRestClient.CreateOrUpdate(Id, loadBalancerName, data, cancellationToken);
+ var operation = new ContainerOrchestratorRuntimeArmOperation(new ConnectedClusterLoadBalancerOperationSource(Client), _connectedClusterLoadBalancerLoadBalancersClientDiagnostics, Pipeline, _connectedClusterLoadBalancerLoadBalancersRestClient.CreateCreateOrUpdateRequest(Id, loadBalancerName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a LoadBalancer
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the LoadBalancer.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetAsync(string loadBalancerName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(loadBalancerName, nameof(loadBalancerName));
+
+ using var scope = _connectedClusterLoadBalancerLoadBalancersClientDiagnostics.CreateScope("ConnectedClusterLoadBalancerCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = await _connectedClusterLoadBalancerLoadBalancersRestClient.GetAsync(Id, loadBalancerName, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ConnectedClusterLoadBalancerResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a LoadBalancer
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the LoadBalancer.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Get(string loadBalancerName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(loadBalancerName, nameof(loadBalancerName));
+
+ using var scope = _connectedClusterLoadBalancerLoadBalancersClientDiagnostics.CreateScope("ConnectedClusterLoadBalancerCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = _connectedClusterLoadBalancerLoadBalancersRestClient.Get(Id, loadBalancerName, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ConnectedClusterLoadBalancerResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// List LoadBalancer resources by parent
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancer_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// 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) => _connectedClusterLoadBalancerLoadBalancersRestClient.CreateListRequest(Id);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _connectedClusterLoadBalancerLoadBalancersRestClient.CreateListNextPageRequest(nextLink, Id);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ConnectedClusterLoadBalancerResource(Client, ConnectedClusterLoadBalancerData.DeserializeConnectedClusterLoadBalancerData(e)), _connectedClusterLoadBalancerLoadBalancersClientDiagnostics, Pipeline, "ConnectedClusterLoadBalancerCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// List LoadBalancer resources by parent
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancer_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// 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) => _connectedClusterLoadBalancerLoadBalancersRestClient.CreateListRequest(Id);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _connectedClusterLoadBalancerLoadBalancersRestClient.CreateListNextPageRequest(nextLink, Id);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ConnectedClusterLoadBalancerResource(Client, ConnectedClusterLoadBalancerData.DeserializeConnectedClusterLoadBalancerData(e)), _connectedClusterLoadBalancerLoadBalancersClientDiagnostics, Pipeline, "ConnectedClusterLoadBalancerCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the LoadBalancer.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> ExistsAsync(string loadBalancerName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(loadBalancerName, nameof(loadBalancerName));
+
+ using var scope = _connectedClusterLoadBalancerLoadBalancersClientDiagnostics.CreateScope("ConnectedClusterLoadBalancerCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = await _connectedClusterLoadBalancerLoadBalancersRestClient.GetAsync(Id, loadBalancerName, 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
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the LoadBalancer.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Exists(string loadBalancerName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(loadBalancerName, nameof(loadBalancerName));
+
+ using var scope = _connectedClusterLoadBalancerLoadBalancersClientDiagnostics.CreateScope("ConnectedClusterLoadBalancerCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = _connectedClusterLoadBalancerLoadBalancersRestClient.Get(Id, loadBalancerName, 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
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the LoadBalancer.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetIfExistsAsync(string loadBalancerName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(loadBalancerName, nameof(loadBalancerName));
+
+ using var scope = _connectedClusterLoadBalancerLoadBalancersClientDiagnostics.CreateScope("ConnectedClusterLoadBalancerCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = await _connectedClusterLoadBalancerLoadBalancersRestClient.GetAsync(Id, loadBalancerName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new ConnectedClusterLoadBalancerResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the LoadBalancer.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual NullableResponse GetIfExists(string loadBalancerName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(loadBalancerName, nameof(loadBalancerName));
+
+ using var scope = _connectedClusterLoadBalancerLoadBalancersClientDiagnostics.CreateScope("ConnectedClusterLoadBalancerCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = _connectedClusterLoadBalancerLoadBalancersRestClient.Get(Id, loadBalancerName, cancellationToken: cancellationToken);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new ConnectedClusterLoadBalancerResource(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/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerData.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerData.Serialization.cs
new file mode 100644
index 000000000000..ee1281295541
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerData.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.ContainerOrchestratorRuntime.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.ContainerOrchestratorRuntime
+{
+ public partial class ConnectedClusterLoadBalancerData : 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(ConnectedClusterLoadBalancerData)} does not support writing '{format}' format.");
+ }
+
+ base.JsonModelWriteCore(writer, options);
+ if (Optional.IsDefined(Properties))
+ {
+ writer.WritePropertyName("properties"u8);
+ writer.WriteObjectValue(Properties, options);
+ }
+ }
+
+ ConnectedClusterLoadBalancerData 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(ConnectedClusterLoadBalancerData)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeConnectedClusterLoadBalancerData(document.RootElement, options);
+ }
+
+ internal static ConnectedClusterLoadBalancerData DeserializeConnectedClusterLoadBalancerData(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ ConnectedClusterLoadBalancerProperties 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 = ConnectedClusterLoadBalancerProperties.DeserializeConnectedClusterLoadBalancerProperties(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 ConnectedClusterLoadBalancerData(
+ 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(ConnectedClusterLoadBalancerData)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ ConnectedClusterLoadBalancerData 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);
+ return DeserializeConnectedClusterLoadBalancerData(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(ConnectedClusterLoadBalancerData)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerData.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerData.cs
new file mode 100644
index 000000000000..a60a5c3712ba
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerData.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.ContainerOrchestratorRuntime.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.ContainerOrchestratorRuntime
+{
+ ///
+ /// A class representing the ConnectedClusterLoadBalancer data model.
+ /// A LoadBalancer resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters)
+ ///
+ public partial class ConnectedClusterLoadBalancerData : ResourceData
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ public ConnectedClusterLoadBalancerData()
+ {
+ }
+
+ /// 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 ConnectedClusterLoadBalancerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ConnectedClusterLoadBalancerProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
+ {
+ Properties = properties;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// The resource-specific properties for this resource.
+ public ConnectedClusterLoadBalancerProperties Properties { get; set; }
+ }
+}
diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerResource.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerResource.Serialization.cs
new file mode 100644
index 000000000000..336ca9b2de4e
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerResource.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.ContainerOrchestratorRuntime
+{
+ public partial class ConnectedClusterLoadBalancerResource : IJsonModel
+ {
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options);
+
+ ConnectedClusterLoadBalancerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options);
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options);
+
+ ConnectedClusterLoadBalancerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options);
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options);
+ }
+}
diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerResource.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerResource.cs
new file mode 100644
index 000000000000..feb298313a85
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerResource.cs
@@ -0,0 +1,349 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Core.Pipeline;
+
+namespace Azure.ResourceManager.ContainerOrchestratorRuntime
+{
+ ///
+ /// A Class representing a ConnectedClusterLoadBalancer along with the instance operations that can be performed on it.
+ /// If you have a you can construct a
+ /// from an instance of using the GetConnectedClusterLoadBalancerResource method.
+ /// Otherwise you can get one from its parent resource using the GetConnectedClusterLoadBalancer method.
+ ///
+ public partial class ConnectedClusterLoadBalancerResource : ArmResource
+ {
+ /// Generate the resource identifier of a instance.
+ /// The resourceUri.
+ /// The loadBalancerName.
+ public static ResourceIdentifier CreateResourceIdentifier(string resourceUri, string loadBalancerName)
+ {
+ var resourceId = $"{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ private readonly ClientDiagnostics _connectedClusterLoadBalancerLoadBalancersClientDiagnostics;
+ private readonly LoadBalancersRestOperations _connectedClusterLoadBalancerLoadBalancersRestClient;
+ private readonly ConnectedClusterLoadBalancerData _data;
+
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "Microsoft.KubernetesRuntime/loadBalancers";
+
+ /// Initializes a new instance of the class for mocking.
+ protected ConnectedClusterLoadBalancerResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal ConnectedClusterLoadBalancerResource(ArmClient client, ConnectedClusterLoadBalancerData 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 ConnectedClusterLoadBalancerResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _connectedClusterLoadBalancerLoadBalancersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerOrchestratorRuntime", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string connectedClusterLoadBalancerLoadBalancersApiVersion);
+ _connectedClusterLoadBalancerLoadBalancersRestClient = new LoadBalancersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, connectedClusterLoadBalancerLoadBalancersApiVersion);
+#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 ConnectedClusterLoadBalancerData 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 LoadBalancer
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _connectedClusterLoadBalancerLoadBalancersClientDiagnostics.CreateScope("ConnectedClusterLoadBalancerResource.Get");
+ scope.Start();
+ try
+ {
+ var response = await _connectedClusterLoadBalancerLoadBalancersRestClient.GetAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ConnectedClusterLoadBalancerResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a LoadBalancer
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using var scope = _connectedClusterLoadBalancerLoadBalancersClientDiagnostics.CreateScope("ConnectedClusterLoadBalancerResource.Get");
+ scope.Start();
+ try
+ {
+ var response = _connectedClusterLoadBalancerLoadBalancersRestClient.Get(Id.Parent, Id.Name, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ConnectedClusterLoadBalancerResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete a LoadBalancer
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// 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 = _connectedClusterLoadBalancerLoadBalancersClientDiagnostics.CreateScope("ConnectedClusterLoadBalancerResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = await _connectedClusterLoadBalancerLoadBalancersRestClient.DeleteAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false);
+ var uri = _connectedClusterLoadBalancerLoadBalancersRestClient.CreateDeleteRequestUri(Id.Parent, Id.Name);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new ContainerOrchestratorRuntimeArmOperation(response, rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete a LoadBalancer
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// 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 = _connectedClusterLoadBalancerLoadBalancersClientDiagnostics.CreateScope("ConnectedClusterLoadBalancerResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = _connectedClusterLoadBalancerLoadBalancersRestClient.Delete(Id.Parent, Id.Name, cancellationToken);
+ var uri = _connectedClusterLoadBalancerLoadBalancersRestClient.CreateDeleteRequestUri(Id.Parent, Id.Name);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new ContainerOrchestratorRuntimeArmOperation(response, rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletionResponse(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create a LoadBalancer
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// Resource create parameters.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> UpdateAsync(WaitUntil waitUntil, ConnectedClusterLoadBalancerData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _connectedClusterLoadBalancerLoadBalancersClientDiagnostics.CreateScope("ConnectedClusterLoadBalancerResource.Update");
+ scope.Start();
+ try
+ {
+ var response = await _connectedClusterLoadBalancerLoadBalancersRestClient.CreateOrUpdateAsync(Id.Parent, Id.Name, data, cancellationToken).ConfigureAwait(false);
+ var operation = new ContainerOrchestratorRuntimeArmOperation(new ConnectedClusterLoadBalancerOperationSource(Client), _connectedClusterLoadBalancerLoadBalancersClientDiagnostics, Pipeline, _connectedClusterLoadBalancerLoadBalancersRestClient.CreateCreateOrUpdateRequest(Id.Parent, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create a LoadBalancer
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// Resource create parameters.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual ArmOperation Update(WaitUntil waitUntil, ConnectedClusterLoadBalancerData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _connectedClusterLoadBalancerLoadBalancersClientDiagnostics.CreateScope("ConnectedClusterLoadBalancerResource.Update");
+ scope.Start();
+ try
+ {
+ var response = _connectedClusterLoadBalancerLoadBalancersRestClient.CreateOrUpdate(Id.Parent, Id.Name, data, cancellationToken);
+ var operation = new ContainerOrchestratorRuntimeArmOperation(new ConnectedClusterLoadBalancerOperationSource(Client), _connectedClusterLoadBalancerLoadBalancersClientDiagnostics, Pipeline, _connectedClusterLoadBalancerLoadBalancersRestClient.CreateCreateOrUpdateRequest(Id.Parent, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceCollection.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceCollection.cs
new file mode 100644
index 000000000000..6e23faa75c37
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceCollection.cs
@@ -0,0 +1,487 @@
+// 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.Threading;
+using System.Threading.Tasks;
+using Autorest.CSharp.Core;
+using Azure.Core;
+using Azure.Core.Pipeline;
+
+namespace Azure.ResourceManager.ContainerOrchestratorRuntime
+{
+ ///
+ /// A class representing a collection of and their operations.
+ /// Each in the collection will belong to the same instance of .
+ /// To get a instance call the GetConnectedClusterServices method from an instance of .
+ ///
+ public partial class ConnectedClusterServiceCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _connectedClusterServiceServicesClientDiagnostics;
+ private readonly ServicesRestOperations _connectedClusterServiceServicesRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected ConnectedClusterServiceCollection()
+ {
+ }
+
+ /// 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 ConnectedClusterServiceCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _connectedClusterServiceServicesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerOrchestratorRuntime", ConnectedClusterServiceResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ConnectedClusterServiceResource.ResourceType, out string connectedClusterServiceServicesApiVersion);
+ _connectedClusterServiceServicesRestClient = new ServicesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, connectedClusterServiceServicesApiVersion);
+ }
+
+ ///
+ /// Create a ServiceResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName}
+ ///
+ /// -
+ /// Operation Id
+ /// Services_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of the the service.
+ /// Resource create parameters.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string serviceName, ConnectedClusterServiceData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _connectedClusterServiceServicesClientDiagnostics.CreateScope("ConnectedClusterServiceCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = await _connectedClusterServiceServicesRestClient.CreateOrUpdateAsync(Id, serviceName, data, cancellationToken).ConfigureAwait(false);
+ var uri = _connectedClusterServiceServicesRestClient.CreateCreateOrUpdateRequestUri(Id, serviceName, data);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new ContainerOrchestratorRuntimeArmOperation(Response.FromValue(new ConnectedClusterServiceResource(Client, response), response.GetRawResponse()), rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create a ServiceResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName}
+ ///
+ /// -
+ /// Operation Id
+ /// Services_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of the the service.
+ /// Resource create parameters.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string serviceName, ConnectedClusterServiceData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _connectedClusterServiceServicesClientDiagnostics.CreateScope("ConnectedClusterServiceCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = _connectedClusterServiceServicesRestClient.CreateOrUpdate(Id, serviceName, data, cancellationToken);
+ var uri = _connectedClusterServiceServicesRestClient.CreateCreateOrUpdateRequestUri(Id, serviceName, data);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new ContainerOrchestratorRuntimeArmOperation(Response.FromValue(new ConnectedClusterServiceResource(Client, response), response.GetRawResponse()), rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a ServiceResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName}
+ ///
+ /// -
+ /// Operation Id
+ /// Services_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the the service.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetAsync(string serviceName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName));
+
+ using var scope = _connectedClusterServiceServicesClientDiagnostics.CreateScope("ConnectedClusterServiceCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = await _connectedClusterServiceServicesRestClient.GetAsync(Id, serviceName, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ConnectedClusterServiceResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a ServiceResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName}
+ ///
+ /// -
+ /// Operation Id
+ /// Services_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the the service.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Get(string serviceName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName));
+
+ using var scope = _connectedClusterServiceServicesClientDiagnostics.CreateScope("ConnectedClusterServiceCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = _connectedClusterServiceServicesRestClient.Get(Id, serviceName, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ConnectedClusterServiceResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// List ServiceResource resources by parent
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services
+ ///
+ /// -
+ /// Operation Id
+ /// ServiceResource_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// 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) => _connectedClusterServiceServicesRestClient.CreateListRequest(Id);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _connectedClusterServiceServicesRestClient.CreateListNextPageRequest(nextLink, Id);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ConnectedClusterServiceResource(Client, ConnectedClusterServiceData.DeserializeConnectedClusterServiceData(e)), _connectedClusterServiceServicesClientDiagnostics, Pipeline, "ConnectedClusterServiceCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// List ServiceResource resources by parent
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services
+ ///
+ /// -
+ /// Operation Id
+ /// ServiceResource_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// 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) => _connectedClusterServiceServicesRestClient.CreateListRequest(Id);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _connectedClusterServiceServicesRestClient.CreateListNextPageRequest(nextLink, Id);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ConnectedClusterServiceResource(Client, ConnectedClusterServiceData.DeserializeConnectedClusterServiceData(e)), _connectedClusterServiceServicesClientDiagnostics, Pipeline, "ConnectedClusterServiceCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName}
+ ///
+ /// -
+ /// Operation Id
+ /// Services_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the the service.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> ExistsAsync(string serviceName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName));
+
+ using var scope = _connectedClusterServiceServicesClientDiagnostics.CreateScope("ConnectedClusterServiceCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = await _connectedClusterServiceServicesRestClient.GetAsync(Id, serviceName, 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
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName}
+ ///
+ /// -
+ /// Operation Id
+ /// Services_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the the service.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Exists(string serviceName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName));
+
+ using var scope = _connectedClusterServiceServicesClientDiagnostics.CreateScope("ConnectedClusterServiceCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = _connectedClusterServiceServicesRestClient.Get(Id, serviceName, 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
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName}
+ ///
+ /// -
+ /// Operation Id
+ /// Services_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the the service.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetIfExistsAsync(string serviceName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName));
+
+ using var scope = _connectedClusterServiceServicesClientDiagnostics.CreateScope("ConnectedClusterServiceCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = await _connectedClusterServiceServicesRestClient.GetAsync(Id, serviceName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new ConnectedClusterServiceResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName}
+ ///
+ /// -
+ /// Operation Id
+ /// Services_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the the service.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual NullableResponse GetIfExists(string serviceName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName));
+
+ using var scope = _connectedClusterServiceServicesClientDiagnostics.CreateScope("ConnectedClusterServiceCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = _connectedClusterServiceServicesRestClient.Get(Id, serviceName, cancellationToken: cancellationToken);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new ConnectedClusterServiceResource(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/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceData.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceData.Serialization.cs
new file mode 100644
index 000000000000..a057f3831122
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceData.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.ContainerOrchestratorRuntime.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.ContainerOrchestratorRuntime
+{
+ public partial class ConnectedClusterServiceData : 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(ConnectedClusterServiceData)} does not support writing '{format}' format.");
+ }
+
+ base.JsonModelWriteCore(writer, options);
+ if (Optional.IsDefined(Properties))
+ {
+ writer.WritePropertyName("properties"u8);
+ writer.WriteObjectValue(Properties, options);
+ }
+ }
+
+ ConnectedClusterServiceData 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(ConnectedClusterServiceData)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeConnectedClusterServiceData(document.RootElement, options);
+ }
+
+ internal static ConnectedClusterServiceData DeserializeConnectedClusterServiceData(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ ConnectedClusterServiceProperties 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 = ConnectedClusterServiceProperties.DeserializeConnectedClusterServiceProperties(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 ConnectedClusterServiceData(
+ 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(ConnectedClusterServiceData)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ ConnectedClusterServiceData 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);
+ return DeserializeConnectedClusterServiceData(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(ConnectedClusterServiceData)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceData.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceData.cs
new file mode 100644
index 000000000000..cc86f87ed5d5
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceData.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.ContainerOrchestratorRuntime.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.ContainerOrchestratorRuntime
+{
+ ///
+ /// A class representing the ConnectedClusterService data model.
+ /// A Service resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters)
+ ///
+ public partial class ConnectedClusterServiceData : ResourceData
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ public ConnectedClusterServiceData()
+ {
+ }
+
+ /// 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 ConnectedClusterServiceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ConnectedClusterServiceProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
+ {
+ Properties = properties;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// The resource-specific properties for this resource.
+ public ConnectedClusterServiceProperties Properties { get; set; }
+ }
+}
diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceResource.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceResource.Serialization.cs
new file mode 100644
index 000000000000..9d6e34cb7fd6
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceResource.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.ContainerOrchestratorRuntime
+{
+ public partial class ConnectedClusterServiceResource : IJsonModel
+ {
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options);
+
+ ConnectedClusterServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options);
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options);
+
+ ConnectedClusterServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options);
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options);
+ }
+}
diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceResource.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceResource.cs
new file mode 100644
index 000000000000..a329e88f01e8
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceResource.cs
@@ -0,0 +1,353 @@
+// 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.ContainerOrchestratorRuntime
+{
+ ///
+ /// A Class representing a ConnectedClusterService along with the instance operations that can be performed on it.
+ /// If you have a you can construct a
+ /// from an instance of using the GetConnectedClusterServiceResource method.
+ /// Otherwise you can get one from its parent resource using the GetConnectedClusterService method.
+ ///
+ public partial class ConnectedClusterServiceResource : ArmResource
+ {
+ /// Generate the resource identifier of a instance.
+ /// The resourceUri.
+ /// The serviceName.
+ public static ResourceIdentifier CreateResourceIdentifier(string resourceUri, string serviceName)
+ {
+ var resourceId = $"{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ private readonly ClientDiagnostics _connectedClusterServiceServicesClientDiagnostics;
+ private readonly ServicesRestOperations _connectedClusterServiceServicesRestClient;
+ private readonly ConnectedClusterServiceData _data;
+
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "Microsoft.KubernetesRuntime/services";
+
+ /// Initializes a new instance of the class for mocking.
+ protected ConnectedClusterServiceResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal ConnectedClusterServiceResource(ArmClient client, ConnectedClusterServiceData 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 ConnectedClusterServiceResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _connectedClusterServiceServicesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerOrchestratorRuntime", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string connectedClusterServiceServicesApiVersion);
+ _connectedClusterServiceServicesRestClient = new ServicesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, connectedClusterServiceServicesApiVersion);
+#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 ConnectedClusterServiceData 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 ServiceResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName}
+ ///
+ /// -
+ /// Operation Id
+ /// Services_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _connectedClusterServiceServicesClientDiagnostics.CreateScope("ConnectedClusterServiceResource.Get");
+ scope.Start();
+ try
+ {
+ var response = await _connectedClusterServiceServicesRestClient.GetAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ConnectedClusterServiceResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a ServiceResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName}
+ ///
+ /// -
+ /// Operation Id
+ /// Services_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using var scope = _connectedClusterServiceServicesClientDiagnostics.CreateScope("ConnectedClusterServiceResource.Get");
+ scope.Start();
+ try
+ {
+ var response = _connectedClusterServiceServicesRestClient.Get(Id.Parent, Id.Name, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ConnectedClusterServiceResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete a ServiceResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName}
+ ///
+ /// -
+ /// Operation Id
+ /// Services_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// 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 = _connectedClusterServiceServicesClientDiagnostics.CreateScope("ConnectedClusterServiceResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = await _connectedClusterServiceServicesRestClient.DeleteAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false);
+ var uri = _connectedClusterServiceServicesRestClient.CreateDeleteRequestUri(Id.Parent, Id.Name);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new ContainerOrchestratorRuntimeArmOperation(response, rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete a ServiceResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName}
+ ///
+ /// -
+ /// Operation Id
+ /// Services_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// 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 = _connectedClusterServiceServicesClientDiagnostics.CreateScope("ConnectedClusterServiceResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = _connectedClusterServiceServicesRestClient.Delete(Id.Parent, Id.Name, cancellationToken);
+ var uri = _connectedClusterServiceServicesRestClient.CreateDeleteRequestUri(Id.Parent, Id.Name);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new ContainerOrchestratorRuntimeArmOperation(response, rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletionResponse(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create a ServiceResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName}
+ ///
+ /// -
+ /// Operation Id
+ /// Services_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// Resource create parameters.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> UpdateAsync(WaitUntil waitUntil, ConnectedClusterServiceData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _connectedClusterServiceServicesClientDiagnostics.CreateScope("ConnectedClusterServiceResource.Update");
+ scope.Start();
+ try
+ {
+ var response = await _connectedClusterServiceServicesRestClient.CreateOrUpdateAsync(Id.Parent, Id.Name, data, cancellationToken).ConfigureAwait(false);
+ var uri = _connectedClusterServiceServicesRestClient.CreateCreateOrUpdateRequestUri(Id.Parent, Id.Name, data);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new ContainerOrchestratorRuntimeArmOperation(Response.FromValue(new ConnectedClusterServiceResource(Client, response), response.GetRawResponse()), rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create a ServiceResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName}
+ ///
+ /// -
+ /// Operation Id
+ /// Services_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// Resource create parameters.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual ArmOperation Update(WaitUntil waitUntil, ConnectedClusterServiceData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _connectedClusterServiceServicesClientDiagnostics.CreateScope("ConnectedClusterServiceResource.Update");
+ scope.Start();
+ try
+ {
+ var response = _connectedClusterServiceServicesRestClient.CreateOrUpdate(Id.Parent, Id.Name, data, cancellationToken);
+ var uri = _connectedClusterServiceServicesRestClient.CreateCreateOrUpdateRequestUri(Id.Parent, Id.Name, data);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new ContainerOrchestratorRuntimeArmOperation(Response.FromValue(new ConnectedClusterServiceResource(Client, response), response.GetRawResponse()), rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassCollection.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassCollection.cs
new file mode 100644
index 000000000000..3c5aa7d35373
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassCollection.cs
@@ -0,0 +1,483 @@
+// 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.Threading;
+using System.Threading.Tasks;
+using Autorest.CSharp.Core;
+using Azure.Core;
+using Azure.Core.Pipeline;
+
+namespace Azure.ResourceManager.ContainerOrchestratorRuntime
+{
+ ///
+ /// A class representing a collection of and their operations.
+ /// Each in the collection will belong to the same instance of .
+ /// To get a instance call the GetConnectedClusterStorageClasses method from an instance of .
+ ///
+ public partial class ConnectedClusterStorageClassCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _connectedClusterStorageClassStorageClassClientDiagnostics;
+ private readonly StorageClassRestOperations _connectedClusterStorageClassStorageClassRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected ConnectedClusterStorageClassCollection()
+ {
+ }
+
+ /// 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 ConnectedClusterStorageClassCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _connectedClusterStorageClassStorageClassClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerOrchestratorRuntime", ConnectedClusterStorageClassResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ConnectedClusterStorageClassResource.ResourceType, out string connectedClusterStorageClassStorageClassApiVersion);
+ _connectedClusterStorageClassStorageClassRestClient = new StorageClassRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, connectedClusterStorageClassStorageClassApiVersion);
+ }
+
+ ///
+ /// Create a StorageClassResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName}
+ ///
+ /// -
+ /// Operation Id
+ /// StorageClass_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of the the storage class.
+ /// Resource create parameters.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string storageClassName, ConnectedClusterStorageClassData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(storageClassName, nameof(storageClassName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _connectedClusterStorageClassStorageClassClientDiagnostics.CreateScope("ConnectedClusterStorageClassCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = await _connectedClusterStorageClassStorageClassRestClient.CreateOrUpdateAsync(Id, storageClassName, data, cancellationToken).ConfigureAwait(false);
+ var operation = new ContainerOrchestratorRuntimeArmOperation(new ConnectedClusterStorageClassOperationSource(Client), _connectedClusterStorageClassStorageClassClientDiagnostics, Pipeline, _connectedClusterStorageClassStorageClassRestClient.CreateCreateOrUpdateRequest(Id, storageClassName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create a StorageClassResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName}
+ ///
+ /// -
+ /// Operation Id
+ /// StorageClass_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of the the storage class.
+ /// Resource create parameters.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string storageClassName, ConnectedClusterStorageClassData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(storageClassName, nameof(storageClassName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _connectedClusterStorageClassStorageClassClientDiagnostics.CreateScope("ConnectedClusterStorageClassCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = _connectedClusterStorageClassStorageClassRestClient.CreateOrUpdate(Id, storageClassName, data, cancellationToken);
+ var operation = new ContainerOrchestratorRuntimeArmOperation(new ConnectedClusterStorageClassOperationSource(Client), _connectedClusterStorageClassStorageClassClientDiagnostics, Pipeline, _connectedClusterStorageClassStorageClassRestClient.CreateCreateOrUpdateRequest(Id, storageClassName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a StorageClassResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName}
+ ///
+ /// -
+ /// Operation Id
+ /// StorageClass_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the the storage class.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetAsync(string storageClassName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(storageClassName, nameof(storageClassName));
+
+ using var scope = _connectedClusterStorageClassStorageClassClientDiagnostics.CreateScope("ConnectedClusterStorageClassCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = await _connectedClusterStorageClassStorageClassRestClient.GetAsync(Id, storageClassName, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ConnectedClusterStorageClassResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a StorageClassResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName}
+ ///
+ /// -
+ /// Operation Id
+ /// StorageClass_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the the storage class.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Get(string storageClassName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(storageClassName, nameof(storageClassName));
+
+ using var scope = _connectedClusterStorageClassStorageClassClientDiagnostics.CreateScope("ConnectedClusterStorageClassCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = _connectedClusterStorageClassStorageClassRestClient.Get(Id, storageClassName, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ConnectedClusterStorageClassResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// List StorageClassResource resources by parent
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses
+ ///
+ /// -
+ /// Operation Id
+ /// StorageClassResource_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// 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) => _connectedClusterStorageClassStorageClassRestClient.CreateListRequest(Id);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _connectedClusterStorageClassStorageClassRestClient.CreateListNextPageRequest(nextLink, Id);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ConnectedClusterStorageClassResource(Client, ConnectedClusterStorageClassData.DeserializeConnectedClusterStorageClassData(e)), _connectedClusterStorageClassStorageClassClientDiagnostics, Pipeline, "ConnectedClusterStorageClassCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// List StorageClassResource resources by parent
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses
+ ///
+ /// -
+ /// Operation Id
+ /// StorageClassResource_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// 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) => _connectedClusterStorageClassStorageClassRestClient.CreateListRequest(Id);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _connectedClusterStorageClassStorageClassRestClient.CreateListNextPageRequest(nextLink, Id);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ConnectedClusterStorageClassResource(Client, ConnectedClusterStorageClassData.DeserializeConnectedClusterStorageClassData(e)), _connectedClusterStorageClassStorageClassClientDiagnostics, Pipeline, "ConnectedClusterStorageClassCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName}
+ ///
+ /// -
+ /// Operation Id
+ /// StorageClass_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the the storage class.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> ExistsAsync(string storageClassName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(storageClassName, nameof(storageClassName));
+
+ using var scope = _connectedClusterStorageClassStorageClassClientDiagnostics.CreateScope("ConnectedClusterStorageClassCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = await _connectedClusterStorageClassStorageClassRestClient.GetAsync(Id, storageClassName, 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
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName}
+ ///
+ /// -
+ /// Operation Id
+ /// StorageClass_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the the storage class.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Exists(string storageClassName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(storageClassName, nameof(storageClassName));
+
+ using var scope = _connectedClusterStorageClassStorageClassClientDiagnostics.CreateScope("ConnectedClusterStorageClassCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = _connectedClusterStorageClassStorageClassRestClient.Get(Id, storageClassName, 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
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName}
+ ///
+ /// -
+ /// Operation Id
+ /// StorageClass_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the the storage class.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetIfExistsAsync(string storageClassName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(storageClassName, nameof(storageClassName));
+
+ using var scope = _connectedClusterStorageClassStorageClassClientDiagnostics.CreateScope("ConnectedClusterStorageClassCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = await _connectedClusterStorageClassStorageClassRestClient.GetAsync(Id, storageClassName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new ConnectedClusterStorageClassResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName}
+ ///
+ /// -
+ /// Operation Id
+ /// StorageClass_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the the storage class.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual NullableResponse GetIfExists(string storageClassName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(storageClassName, nameof(storageClassName));
+
+ using var scope = _connectedClusterStorageClassStorageClassClientDiagnostics.CreateScope("ConnectedClusterStorageClassCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = _connectedClusterStorageClassStorageClassRestClient.Get(Id, storageClassName, cancellationToken: cancellationToken);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new ConnectedClusterStorageClassResource(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/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassData.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassData.Serialization.cs
new file mode 100644
index 000000000000..0a775d108c05
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassData.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.ContainerOrchestratorRuntime.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.ContainerOrchestratorRuntime
+{
+ public partial class ConnectedClusterStorageClassData : 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(ConnectedClusterStorageClassData)} does not support writing '{format}' format.");
+ }
+
+ base.JsonModelWriteCore(writer, options);
+ if (Optional.IsDefined(Properties))
+ {
+ writer.WritePropertyName("properties"u8);
+ writer.WriteObjectValue(Properties, options);
+ }
+ }
+
+ ConnectedClusterStorageClassData 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(ConnectedClusterStorageClassData)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeConnectedClusterStorageClassData(document.RootElement, options);
+ }
+
+ internal static ConnectedClusterStorageClassData DeserializeConnectedClusterStorageClassData(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ ConnectedClusterStorageClassProperties 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 = ConnectedClusterStorageClassProperties.DeserializeConnectedClusterStorageClassProperties(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 ConnectedClusterStorageClassData(
+ 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(ConnectedClusterStorageClassData)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ ConnectedClusterStorageClassData 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);
+ return DeserializeConnectedClusterStorageClassData(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(ConnectedClusterStorageClassData)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassData.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassData.cs
new file mode 100644
index 000000000000..681dfac412f0
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassData.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.ContainerOrchestratorRuntime.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.ContainerOrchestratorRuntime
+{
+ ///
+ /// A class representing the ConnectedClusterStorageClass data model.
+ /// A StorageClass resource for an Arc connected cluster (Microsoft.Kubernetes/connectedClusters)
+ ///
+ public partial class ConnectedClusterStorageClassData : ResourceData
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ public ConnectedClusterStorageClassData()
+ {
+ }
+
+ /// 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 ConnectedClusterStorageClassData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ConnectedClusterStorageClassProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
+ {
+ Properties = properties;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// The resource-specific properties for this resource.
+ public ConnectedClusterStorageClassProperties Properties { get; set; }
+ }
+}
diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassResource.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassResource.Serialization.cs
new file mode 100644
index 000000000000..6eb02c25c194
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassResource.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.ContainerOrchestratorRuntime
+{
+ public partial class ConnectedClusterStorageClassResource : IJsonModel
+ {
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options);
+
+ ConnectedClusterStorageClassData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options);
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options);
+
+ ConnectedClusterStorageClassData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options);
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options);
+ }
+}
diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassResource.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassResource.cs
new file mode 100644
index 000000000000..c9858413d246
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassResource.cs
@@ -0,0 +1,346 @@
+// 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.ContainerOrchestratorRuntime.Models;
+
+namespace Azure.ResourceManager.ContainerOrchestratorRuntime
+{
+ ///
+ /// A Class representing a ConnectedClusterStorageClass along with the instance operations that can be performed on it.
+ /// If you have a you can construct a
+ /// from an instance of using the GetConnectedClusterStorageClassResource method.
+ /// Otherwise you can get one from its parent resource using the GetConnectedClusterStorageClass method.
+ ///
+ public partial class ConnectedClusterStorageClassResource : ArmResource
+ {
+ /// Generate the resource identifier of a instance.
+ /// The resourceUri.
+ /// The storageClassName.
+ public static ResourceIdentifier CreateResourceIdentifier(string resourceUri, string storageClassName)
+ {
+ var resourceId = $"{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ private readonly ClientDiagnostics _connectedClusterStorageClassStorageClassClientDiagnostics;
+ private readonly StorageClassRestOperations _connectedClusterStorageClassStorageClassRestClient;
+ private readonly ConnectedClusterStorageClassData _data;
+
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "Microsoft.KubernetesRuntime/storageClasses";
+
+ /// Initializes a new instance of the class for mocking.
+ protected ConnectedClusterStorageClassResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal ConnectedClusterStorageClassResource(ArmClient client, ConnectedClusterStorageClassData 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 ConnectedClusterStorageClassResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _connectedClusterStorageClassStorageClassClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerOrchestratorRuntime", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string connectedClusterStorageClassStorageClassApiVersion);
+ _connectedClusterStorageClassStorageClassRestClient = new StorageClassRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, connectedClusterStorageClassStorageClassApiVersion);
+#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 ConnectedClusterStorageClassData 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 StorageClassResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName}
+ ///
+ /// -
+ /// Operation Id
+ /// StorageClass_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _connectedClusterStorageClassStorageClassClientDiagnostics.CreateScope("ConnectedClusterStorageClassResource.Get");
+ scope.Start();
+ try
+ {
+ var response = await _connectedClusterStorageClassStorageClassRestClient.GetAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ConnectedClusterStorageClassResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a StorageClassResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName}
+ ///
+ /// -
+ /// Operation Id
+ /// StorageClass_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using var scope = _connectedClusterStorageClassStorageClassClientDiagnostics.CreateScope("ConnectedClusterStorageClassResource.Get");
+ scope.Start();
+ try
+ {
+ var response = _connectedClusterStorageClassStorageClassRestClient.Get(Id.Parent, Id.Name, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ConnectedClusterStorageClassResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete a StorageClassResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName}
+ ///
+ /// -
+ /// Operation Id
+ /// StorageClass_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// 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 = _connectedClusterStorageClassStorageClassClientDiagnostics.CreateScope("ConnectedClusterStorageClassResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = await _connectedClusterStorageClassStorageClassRestClient.DeleteAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false);
+ var operation = new ContainerOrchestratorRuntimeArmOperation(_connectedClusterStorageClassStorageClassClientDiagnostics, Pipeline, _connectedClusterStorageClassStorageClassRestClient.CreateDeleteRequest(Id.Parent, 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 StorageClassResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName}
+ ///
+ /// -
+ /// Operation Id
+ /// StorageClass_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// 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 = _connectedClusterStorageClassStorageClassClientDiagnostics.CreateScope("ConnectedClusterStorageClassResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = _connectedClusterStorageClassStorageClassRestClient.Delete(Id.Parent, Id.Name, cancellationToken);
+ var operation = new ContainerOrchestratorRuntimeArmOperation(_connectedClusterStorageClassStorageClassClientDiagnostics, Pipeline, _connectedClusterStorageClassStorageClassRestClient.CreateDeleteRequest(Id.Parent, Id.Name).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletionResponse(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Update a StorageClassResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName}
+ ///
+ /// -
+ /// Operation Id
+ /// StorageClass_Update
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// 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, ConnectedClusterStorageClassPatch patch, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(patch, nameof(patch));
+
+ using var scope = _connectedClusterStorageClassStorageClassClientDiagnostics.CreateScope("ConnectedClusterStorageClassResource.Update");
+ scope.Start();
+ try
+ {
+ var response = await _connectedClusterStorageClassStorageClassRestClient.UpdateAsync(Id.Parent, Id.Name, patch, cancellationToken).ConfigureAwait(false);
+ var operation = new ContainerOrchestratorRuntimeArmOperation(new ConnectedClusterStorageClassOperationSource(Client), _connectedClusterStorageClassStorageClassClientDiagnostics, Pipeline, _connectedClusterStorageClassStorageClassRestClient.CreateUpdateRequest(Id.Parent, 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 StorageClassResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName}
+ ///
+ /// -
+ /// Operation Id
+ /// StorageClass_Update
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// 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, ConnectedClusterStorageClassPatch patch, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(patch, nameof(patch));
+
+ using var scope = _connectedClusterStorageClassStorageClassClientDiagnostics.CreateScope("ConnectedClusterStorageClassResource.Update");
+ scope.Start();
+ try
+ {
+ var response = _connectedClusterStorageClassStorageClassRestClient.Update(Id.Parent, Id.Name, patch, cancellationToken);
+ var operation = new ContainerOrchestratorRuntimeArmOperation(new ConnectedClusterStorageClassOperationSource(Client), _connectedClusterStorageClassStorageClassClientDiagnostics, Pipeline, _connectedClusterStorageClassStorageClassRestClient.CreateUpdateRequest(Id.Parent, 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/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Extensions/ContainerOrchestratorRuntimeExtensions.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Extensions/ContainerOrchestratorRuntimeExtensions.cs
new file mode 100644
index 000000000000..493e4ab2687b
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Extensions/ContainerOrchestratorRuntimeExtensions.cs
@@ -0,0 +1,484 @@
+// 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.ContainerOrchestratorRuntime.Mocking;
+
+namespace Azure.ResourceManager.ContainerOrchestratorRuntime
+{
+ /// A class to add extension methods to Azure.ResourceManager.ContainerOrchestratorRuntime.
+ public static partial class ContainerOrchestratorRuntimeExtensions
+ {
+ private static MockableContainerOrchestratorRuntimeArmClient GetMockableContainerOrchestratorRuntimeArmClient(ArmClient client)
+ {
+ return client.GetCachedClient(client0 => new MockableContainerOrchestratorRuntimeArmClient(client0));
+ }
+
+ ///
+ /// Gets a collection of ConnectedClusterStorageClassResources in the ArmClient.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The scope that the resource will apply against.
+ /// is null.
+ /// An object representing collection of ConnectedClusterStorageClassResources and their operations over a ConnectedClusterStorageClassResource.
+ public static ConnectedClusterStorageClassCollection GetConnectedClusterStorageClasses(this ArmClient client, ResourceIdentifier scope)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterStorageClasses(scope);
+ }
+
+ ///
+ /// Get a StorageClassResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName}
+ ///
+ /// -
+ /// Operation Id
+ /// StorageClass_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The scope that the resource will apply against.
+ /// The name of the the storage class.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static async Task> GetConnectedClusterStorageClassAsync(this ArmClient client, ResourceIdentifier scope, string storageClassName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return await GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterStorageClassAsync(scope, storageClassName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get a StorageClassResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName}
+ ///
+ /// -
+ /// Operation Id
+ /// StorageClass_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The scope that the resource will apply against.
+ /// The name of the the storage class.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static Response GetConnectedClusterStorageClass(this ArmClient client, ResourceIdentifier scope, string storageClassName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterStorageClass(scope, storageClassName, cancellationToken);
+ }
+
+ ///
+ /// Gets a collection of ConnectedClusterLoadBalancerResources in the ArmClient.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The scope that the resource will apply against.
+ /// is null.
+ /// An object representing collection of ConnectedClusterLoadBalancerResources and their operations over a ConnectedClusterLoadBalancerResource.
+ public static ConnectedClusterLoadBalancerCollection GetConnectedClusterLoadBalancers(this ArmClient client, ResourceIdentifier scope)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterLoadBalancers(scope);
+ }
+
+ ///
+ /// Get a LoadBalancer
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The scope that the resource will apply against.
+ /// The name of the LoadBalancer.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static async Task> GetConnectedClusterLoadBalancerAsync(this ArmClient client, ResourceIdentifier scope, string loadBalancerName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return await GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterLoadBalancerAsync(scope, loadBalancerName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get a LoadBalancer
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The scope that the resource will apply against.
+ /// The name of the LoadBalancer.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static Response GetConnectedClusterLoadBalancer(this ArmClient client, ResourceIdentifier scope, string loadBalancerName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterLoadBalancer(scope, loadBalancerName, cancellationToken);
+ }
+
+ ///
+ /// Gets a collection of ConnectedClusterBgpPeerResources in the ArmClient.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The scope that the resource will apply against.
+ /// is null.
+ /// An object representing collection of ConnectedClusterBgpPeerResources and their operations over a ConnectedClusterBgpPeerResource.
+ public static ConnectedClusterBgpPeerCollection GetConnectedClusterBgpPeers(this ArmClient client, ResourceIdentifier scope)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterBgpPeers(scope);
+ }
+
+ ///
+ /// Get a BgpPeer
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName}
+ ///
+ /// -
+ /// Operation Id
+ /// BgpPeers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The scope that the resource will apply against.
+ /// The name of the BgpPeer.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static async Task> GetConnectedClusterBgpPeerAsync(this ArmClient client, ResourceIdentifier scope, string bgpPeerName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return await GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterBgpPeerAsync(scope, bgpPeerName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get a BgpPeer
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/bgpPeers/{bgpPeerName}
+ ///
+ /// -
+ /// Operation Id
+ /// BgpPeers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The scope that the resource will apply against.
+ /// The name of the BgpPeer.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static Response GetConnectedClusterBgpPeer(this ArmClient client, ResourceIdentifier scope, string bgpPeerName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterBgpPeer(scope, bgpPeerName, cancellationToken);
+ }
+
+ ///
+ /// Gets a collection of ConnectedClusterServiceResources in the ArmClient.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The scope that the resource will apply against.
+ /// is null.
+ /// An object representing collection of ConnectedClusterServiceResources and their operations over a ConnectedClusterServiceResource.
+ public static ConnectedClusterServiceCollection GetConnectedClusterServices(this ArmClient client, ResourceIdentifier scope)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterServices(scope);
+ }
+
+ ///
+ /// Get a ServiceResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName}
+ ///
+ /// -
+ /// Operation Id
+ /// Services_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The scope that the resource will apply against.
+ /// The name of the the service.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static async Task> GetConnectedClusterServiceAsync(this ArmClient client, ResourceIdentifier scope, string serviceName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return await GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterServiceAsync(scope, serviceName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get a ServiceResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/services/{serviceName}
+ ///
+ /// -
+ /// Operation Id
+ /// Services_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The scope that the resource will apply against.
+ /// The name of the the service.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static Response GetConnectedClusterService(this ArmClient client, ResourceIdentifier scope, string serviceName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterService(scope, serviceName, cancellationToken);
+ }
+
+ ///
+ /// 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 ConnectedClusterStorageClassResource GetConnectedClusterStorageClassResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterStorageClassResource(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 ConnectedClusterLoadBalancerResource GetConnectedClusterLoadBalancerResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterLoadBalancerResource(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 ConnectedClusterBgpPeerResource GetConnectedClusterBgpPeerResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterBgpPeerResource(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 ConnectedClusterServiceResource GetConnectedClusterServiceResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableContainerOrchestratorRuntimeArmClient(client).GetConnectedClusterServiceResource(id);
+ }
+ }
+}
diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Extensions/MockableContainerOrchestratorRuntimeArmClient.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Extensions/MockableContainerOrchestratorRuntimeArmClient.cs
new file mode 100644
index 000000000000..e116a985d93d
--- /dev/null
+++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/Extensions/MockableContainerOrchestratorRuntimeArmClient.cs
@@ -0,0 +1,376 @@
+// 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.ContainerOrchestratorRuntime.Mocking
+{
+ /// A class to add extension methods to ArmClient.
+ public partial class MockableContainerOrchestratorRuntimeArmClient : ArmResource
+ {
+ /// Initializes a new instance of the class for mocking.
+ protected MockableContainerOrchestratorRuntimeArmClient()
+ {
+ }
+
+ /// 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 MockableContainerOrchestratorRuntimeArmClient(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ }
+
+ internal MockableContainerOrchestratorRuntimeArmClient(ArmClient client) : this(client, ResourceIdentifier.Root)
+ {
+ }
+
+ private string GetApiVersionOrNull(ResourceType resourceType)
+ {
+ TryGetApiVersion(resourceType, out string apiVersion);
+ return apiVersion;
+ }
+
+ /// Gets a collection of ConnectedClusterStorageClassResources in the ArmClient.
+ /// The scope that the resource will apply against.
+ /// An object representing collection of ConnectedClusterStorageClassResources and their operations over a ConnectedClusterStorageClassResource.
+ public virtual ConnectedClusterStorageClassCollection GetConnectedClusterStorageClasses(ResourceIdentifier scope)
+ {
+ return new ConnectedClusterStorageClassCollection(Client, scope);
+ }
+
+ ///
+ /// Get a StorageClassResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName}
+ ///
+ /// -
+ /// Operation Id
+ /// StorageClass_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The scope that the resource will apply against.
+ /// The name of the the storage class.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual async Task> GetConnectedClusterStorageClassAsync(ResourceIdentifier scope, string storageClassName, CancellationToken cancellationToken = default)
+ {
+ return await GetConnectedClusterStorageClasses(scope).GetAsync(storageClassName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get a StorageClassResource
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/storageClasses/{storageClassName}
+ ///
+ /// -
+ /// Operation Id
+ /// StorageClass_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The scope that the resource will apply against.
+ /// The name of the the storage class.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual Response GetConnectedClusterStorageClass(ResourceIdentifier scope, string storageClassName, CancellationToken cancellationToken = default)
+ {
+ return GetConnectedClusterStorageClasses(scope).Get(storageClassName, cancellationToken);
+ }
+
+ /// Gets a collection of ConnectedClusterLoadBalancerResources in the ArmClient.
+ /// The scope that the resource will apply against.
+ /// An object representing collection of ConnectedClusterLoadBalancerResources and their operations over a ConnectedClusterLoadBalancerResource.
+ public virtual ConnectedClusterLoadBalancerCollection GetConnectedClusterLoadBalancers(ResourceIdentifier scope)
+ {
+ return new ConnectedClusterLoadBalancerCollection(Client, scope);
+ }
+
+ ///
+ /// Get a LoadBalancer
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.KubernetesRuntime/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-03-01
+ ///
+ /// -
+ /// Resource
+ ///